Hard Drive Activity Light
Monday, May 22, 2006 by RomanDA | Discussion: DesktopX
IE: Any Hard Drive Activity?
If this is already out there please forgive me, im just having some issue and wanted to see if i could monitor the hard drive activity.
thanks.
Reply #2 Thursday, July 13, 2006 5:49 PM
Reply #3 Thursday, July 13, 2006 7:22 PM
Try creating a performance meter object. Set the Data Source as a System Performance Meter. Change the Performance Object to to Physical Disk, and select %Disk Time from the counters list.
I'm not 100 percent sure of the accuracy of that, but it's a starting point.
I set one to monitor my C drive and ran disk defragmenter. I seemed to be working for me without doing any customization on the object. I just set it as a horizontal bar with 30x30 dimensions.
Reply #6 Thursday, July 13, 2006 7:38 PM
The Drive object provides access to the various properties of the local or remote disk drive.
The following code uses the GetDrive method of the FileSystemObject object to get the Drive object for drive "c".
Code:
"Set filesys = CreateObject("Scripting.FileSystemObject")
Set drv = filesys.GetDrive("c")
Set Drivestate = drv.object.IsReady
Look at the IsReady property listed below.
PROPERTIES
AvailableSpace Property
Returns the amount of space available on the specified local or remote disk drive.
Syntax: object.AvailableSpace
DriveLetter Property
Returns the dirve letter of the specified local or remote disk drive. Read only.
Syntax: object.DriveLetter
DriveType Property
Returns an integer indicating the type of the drive.
Syntax: object.DriveType
FileSystem Property
This property returns the file system type that is in use on the specified drive.
Syntax: object.FileSystem
FreeSpace Property
Returns the amount of free space available to a user on the specified local or remote drive.
Syntax: object.FreeSpace
IsReady Property
This property is a Boolean whose value is True if the specified drive is available for use and False otherwise.
Syntax: object.IsReady
Path Property
Returns the path for a specified file, folder or drive.
Syntax: object.Path
RootFolder Property
Returns a Folder object that represents the root folder of the specified drive.
Syntax: object.RootFolder
SerialNumberProperty
Returns the decimal serial number for the specified drive. This number can be used to uniquely identify a disk volume.
Syntax: object.SerialNumber
ShareName Property
Returns the network name in Universal Naming Convention (UNC) for the remote disk drive. Used only when working with a remote drive (DriveType property is 3).
Syntax: object.ShareName
TotalSize Property
Returns the total space, in bytes, of the specified drive.
Syntax: object.TotalSize
VolumeName Property
Sets or returns the volume name of the specified drive.
Syntax: object. VolumeName [ = newname]
Please notice above the IsReady property. Whenever the drive is reading or writing the above property will be false. Whenever the drive is inactive IsReady will be true.
Based on the above code you could then create an object whose state would change based on the above created boolean value of Drivestate.
This should work 100% in DesktopX. I hope that helps.
Reply #7 Friday, July 14, 2006 1:10 PM
Reply #8 Friday, July 14, 2006 6:39 PM
Reply #9 Friday, July 14, 2006 6:41 PM
I am unfamiliar with how DX handles these meters. Is there a way to access the values, or can we only display the graphs available by default?
If the values can be accessed from a script, a closer approximation to an activity light could be made. Judge averages the percentage over a period of time, and returns values analagous to inactive, somewhat active, fully active, in his script for the Active Disk docklet. Which I used with permisssion and a some degree of success
in my Blister Pack.With that shameless plug out of the way, how do these meters work? Can we access them directly via script or do we need a dll type interface as provided by SysStats or the DX Meters Plug-In? BigDog's approach seems to have quite a bit of potential.
Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!







Reply #1 Thursday, July 13, 2006 5:45 PM
Diskmon
This is a free utility from Sysinternals, some of the best utilities can be found there. Turn off the logging and hit ctrl-m to put it in the tray.