Host Monitor Driver

Modified on 2010/12/15 10:50 by Administrator — Categorized as: Driver

Provides information on the host machine and operating system, including memory and cpu usage, drive usage, and more.

Manufacturer: N/A


Configuration Settings

Events

Ready State Changed

The device's running and ready state changed.

Whenever Filter:

none

EventArgs:


Instance Properties

ProcessorCount

Gets the number of processor cores on the machine.

Accessibility : Read Only

Type: Number

MachineName

Gets the NetBIOS name of the machine.

Accessibility : Read Only

Type: String

OSVersion

Gets the operating system platform identfier and version number running on the machine.

Accessibility : Read Only

Type: String

ProcessorUsage

Gets the instant percentage of time that the CPU is working on the machine.

Accessibility : Read Only

Type: Number

PhysicalMemoryUsage

Gets the approximate percentage of physical memory that is in use (0 indicates no memory use and 100 indicates full memory use).

Accessibility : Read Only

Type: Number

TotalPhysicalMemory

Gets the total amount of physical memory on the machine, in bytes.

Accessibility : Read Only

Type: Number

TotalPageFile

Gets the current committed memory limit, in bytes.

Accessibility : Read Only

Type: Number

FreePhysicalMemory

Gets the amount of physical memory currently available on the machine, in bytes.

Accessibility : Read Only

Type: Number

FreePageFile

Gets the maximum amount of memory the current process can commit, in bytes. This value is equal to or smaller than the system-wide available commit value.

Accessibility : Read Only

Type: Number

TotalMemoryUsage

Gets the approximate percentage of memory that is in use including physical memory and page file (0 indicates no memory use and 100 indicates full memory use).

Accessibility : Read Only

Type: Number

ProcessorInformation

Gets the cpu information on the machine.

Accessibility : Read Only

Type: String

SystemStartupTime

Gets the date and time of when the system was started.

Accessibility : Read Only

Type: DateTime

DeviceDisplayName

The display name for this device.

Accessibility : Read Only

Type: String

DeviceStartTime

The date and time when this device was started.

Accessibility : Read Only

Type: DateTime

DeviceLifecycleStage

The current lifecycle stage of the device. The stages in order are: Pending Start, Starting, Running, Stopping

Accessibility : Read Only

Type: Number

DeviceIsRunningAndReady

Indicates if the device is ready for use, ie it is in the Running lifecycle stage and all properties are valid and all methods are ready to be used.

Accessibility : Read Only

Type: Boolean

Instance Methods

GarbageCollect

This method is for diagnostics use only and releases unused memory used by the driver service which is running this driver.

Syntax

void GarbageCollect( )

Parameters

none

GetDriveUsage ( String )

Gets the percent usage of a specified logical drive.

Syntax

Number GetDriveUsage( String driveLetter )

Parameters

driveLetter : The drive letter of the logical drive.

ShutdownWindowsOS ( Boolean )

Shutdown the Windows OS.

Syntax

void ShutdownWindowsOS( Boolean force )

Parameters

force : true to force the shutdown immediately; false to cause Windows to send a shutdown request to every application.

RestartWindowsOS ( Boolean )

Restart the Windows OS.

Syntax

void RestartWindowsOS( Boolean force )

Parameters

force : true to force the a restart immediately; false to cause Windows to send a restart request to every application.

HibernateWindowsOS ( Boolean, Boolean )

Hibernate the Windows OS.

Syntax

void HibernateWindowsOS( Boolean force, Boolean disableWakeEvent )

Parameters

force : true to force the hibernation mode immediately; false to cause Windows to send a hibernation request to every application.
disableWakeEvent : true to disable restoring the system's power status to active on a wake event, false to enable restoring the system's power status to active on a wake event.

SuspendWindowsOS ( Boolean, Boolean )

Suspend the Windows OS.

Syntax

void SuspendWindowsOS( Boolean force, Boolean disableWakeEvent )

Parameters

force : true to force the suspended mode immediately; false to cause Windows to send a suspend request to every application.
disableWakeEvent : true to disable restoring the system's power status to active on a wake event, false to enable restoring the system's power status to active on a wake event.

SetPropertyForDuration ( String, TimeSpan, Object, Object )

Sets a property for a duration of time and then sets the property to a subequent value asynchronously. This action returns after setting the first value and the timer and subsequent property set run in the background. Subsequent sets of the same property will reset the timer if the subsequent value has not yet been set. This is an advanced feature, be sure to set the property name correctly.

Syntax

void SetPropertyForDuration( String propertyName, unknown duration, Object initialValue, Object finalValue )

Parameters

propertyName : The name of the property to set.
duration : The amount of time to wait after setting the initial value to set the subsequent value.
initialValue : The value to set the property to initially.
finalValue : The value to set the property to after the duration of time has passed.

SetPropertyForDuration ( String, Number, TimeSpan, Object, Object )

Sets a property for a duration of time and then sets the property to a subequent value asynchronously. This action returns after setting the first value and the timer and subsequent property set run in the background. Subsequent sets of the same property will reset the timer if the subsequent value has not yet been set. This is an advanced feature, be sure to set the property name correctly.

Syntax

void SetPropertyForDuration( String propertyName, Number arrayIndex, unknown duration, Object initialValue, Object finalValue )

Parameters

propertyName : The name of the property to set.
arrayIndex : The property's array index to set.
duration : The amount of time to wait after setting the initial value to set the subsequent value.
initialValue : The value to set the property to initially.
finalValue : The value to set the property to after the duration of time has passed.