XWidgetSoft Forum https://www.bbs.xwidget.com/ |
|
Indicator for reading and writing of data https://www.bbs.xwidget.com/viewtopic.php?f=3&t=3005 |
Page 1 of 1 |
Author: | Cov [ April 29th, 2013, 7:35 pm ] |
Post subject: | Indicator for reading and writing of data |
Hello, can I please request to implement the following feature into one of the next versions of xwidget? There is a little program called HDD LED (444 KB) ▶ click. It shows a little rectangular box for each storage device (SSD, HDD, USB Key, etc) attached to the PC. Everytime the device is reading, the color changes to (for example) green and when it's writing, it becomes red. It would be awesome, if future xwidgets could have this feature. By the way, there is also a Windows Standard Gadget existing, that shows Disk Activity ▶ click. Thank you! ![]() |
Author: | cyxw [ May 24th, 2013, 7:07 am ] |
Post subject: | Alternative Suggestion: Performance Monitor counters |
I used to do this using the so-called "Performance Monitor" under Samurize, and still am trying to figure it out how I can do this with XWidgets. Performance Monitor meters are very powerful and give you not only this information, but a lot more too. To monitor disk activity, you could use "\PhysicalDisk(_Total)\% Disk Time", or "\PhysicalDisk(1 C:)\% Disk Time" for only first HDD, or "\Paging File(*)\% Usage" for total swap file usage, etc. If I may suggest a new feature to the developers, then it would be definitely the general-purpose "PerfMon counters". |
Author: | cyxw [ May 25th, 2013, 2:35 am ] |
Post subject: | Re: Indicator for reading and writing of data |
Not knowing Chinese made things a bit hard but I figured it out ![]() Put a new timer core into your widget and set it to update every sec. Then a chart control. The JS code will query WMI to get the disk activity and add the value to the chart. In my case it's a percentage (0-100) where 100% would mean the hard disk is spending 100% of its time with read or write, doesn't matter which. Of course you can convert it to a LED or a progress bar, include other drives (instance names are machine-specific but you can use where name="_Total" for all), set up alerts (e.g. if activity > 50 do something), etc. Unfortunately I don't know any easy-to-use WMI tool for experimentation. I used BGInfo and Samurize's own WMI explorers. Code: var wmi = GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2"); function timercore1OnUpdate(Sender) { var perc_val = new Enumerator(wmi.ExecQuery("SELECT PercentDiskTime FROM Win32_PerfFormattedData_PerfDisk_PhysicalDisk where Name = '1 C: D:'")); metDiskActivity.add(perc_val.item().PercentDiskTime); } Check out the attached file. Attachment:
|
Author: | Cov [ May 25th, 2013, 2:48 am ] |
Post subject: | Re: Indicator for reading and writing of data |
Hello cyxw, I just downloaded your sample widget: ![]() This is like thin hair and I fail to see any changes. Could you possibly make it more visible please? Thanks ![]() |
Author: | cyxw [ May 25th, 2013, 3:41 am ] | ||
Post subject: | Re: Indicator for reading and writing of data | ||
Well I wasn't trying to supply a fully usable widget and I'm definitely not a good graphics designer ![]() This is what I see in my config (work in progress, with many layers). Note the red chart in background is the disk activity; dark blue in foreground is CPU and upper vertical bar is the free memory with some tiny little fonts for net traffic and IP.
|
Author: | Cov [ May 25th, 2013, 3:48 am ] |
Post subject: | Re: Indicator for reading and writing of data |
Ah, now I see. |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |