14 March, 2018

Drozd CPU monitor in AHK

Continued from the network monitor post.
I made this CPU monitor, not only because of the need to get rid off the Vista sidebar dependency. I used to use this great gadget All CPU Meter, but I had some issues with it. I wanted to make a single bar for the CPU usage. I didn't want many bars for multi-core processor. That's too much unnecessary info, takes too much space. I added date and time, so I don't have to use another gadget and take more space.
The first one below is the simpler version.
BTW. This may be used as an example of how to use tic's Gdip library for new people.



I gradually made an extended version of the script that I use now.
I added CPU monitoring for two chosen processes and one for memory. It's good to know if one of the browsers is doing something suspicious. Or to check for memory leak.
Now the first extra bar monitors processes from a test list (or all processes) and shows the one that uses the most CPU.
I also used a timer for idle time. I didn't remove it from the script here, because I would have to change too much. I used it to check when some Windows background processes (on Windows 8) start doing some weird things. Also trojans activate during idle time or when monitor turns off, etc.



Drozd network monitor in AHK

Monitoring the CPU usage and network traffic is vital for keeping one's computer secure. If a program uses 50-100% of processor power for long time, it's important for the user to notice it. Whether it's a hanged program or a data encrypting ransomware. It's important to see the network traffic in case suspicious programs upload or download data.

There should always be indicators available in the operating system for the user to achieve this task. Unfortunately, Microsoft is not giving this option. Whether it's because of ineptitude or by choice as an NSA front (the Windows 8 design was an obvious attempt to deny the user control over his own operating system and making the users get used to "apps" connecting to the internet uncontrollably).
Firewall, network and CPU monitoring are as vital as dashboard in a car.

I had to make this network monitor, since I had some problems with the Network Meter gadget  in Vista sidebar. Network Meter is still very good and, as far as I know, the only gadget like that, btw.

I didn't want to be dependent on the sidebar, even though one can still get on the net the sidebar working on the newer shoddy versions of Windows (even on the Windows 8 abomination).
I needed separate history graphs for download and upload, because the same scale for both is not informative enough. I had some problems with readability, too. Anyway, it's always better to be able to customize a program to one's needs.
So this script does it. It depends on the great Gdip library by tic (graphics functions) and XNET module by SKAN for calculating traffic. AHK is about a team work so I have to link to Sean who started the work on this problem.

I copied the necessary functions in the script itself, so to save the trouble.
AHK limitation: program is suspended while the right click context menu is on. It's worth to remember.




Also posted on AutoHotkey forum here

Save the file in Unicode.
 

Stopper/timer in AHK



Alarm Timer in AHK

Some older AutoHotkey scripts.
First: Alarm Timer. Second script below is an auto alarm timer, run from another script.