Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I monitor a service on NT/2000 which is in a paused state?

Status
Not open for further replies.

akbart

Technical User
Oct 5, 2000
11
US
Hi,
We have a service in NT/2000 that has start/stop/pause. How can I monitor this service with DM when it goes in a pause state?

Thanks
 
You can't for the moment.
It's an undocumented api from M$.

The only thing you can do is try to access the application (if this is possible for the application you want to monitor)
 
If you were really in need of this, and you have perl installed on the endpoint (with the Win32::Service module) it is certainly possible using a custom script (if they haven't already added this feature). Look at something like to get examples of how to use the module.

A simple test using Win32::Service.

--FTP Publishing service is stopped:
Display Name : FTP Publishing Service, MSFTPSVC
CurrentState : 1

--FTP Publishing service is started:
Display Name : FTP Publishing Service, MSFTPSVC
CurrentState : 4

--FTP Publishing service is paused:
Display Name : FTP Publishing Service, MSFTPSVC
CurrentState : 7

So, it's quite possible to detect the state of the service in this manner. Just write a script that looks at the CurrentState, have DM run it, and check the result.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top