blackadder has asked for the wisdom of the Perl Monks concerning the following question:
and the out put that I got is:$|++; use strict; use diagnostics; use Win32::Service; use vars qw/$machine %SSvcLst/; $machine = "\\\\". $ARGV[0]; if (Win32::Service::GetServices($machine,\ %SSvcLst)) { print "\nObtaining list of running services\n"; for my $item (sort ( keys ( %SSvcLst ))) { print "$SSvcLst{$item} = $item\n"; if (Win32::Service::GetStatus($machine ,$SSvcLst{$item},\ my +%status)) { for my $item2 (keys ( %status)) { print "\t\t$item2 = $status{$item2}\n"; } } } }
I assume that the current status is what I am after, however the out put is just an Integer,...can some please tell me what are those numbers equate to?Obtaining list of running services Alerter = Alerter CurrentState = 4 ServiceType = 32 CheckPoint = 0 ServiceSpecificExitCode = 0 WaitHint = 0 Win32ExitCode = 0 ControlsAccepted = 1 SeagateAgentBrowser = Backup Exec (TM) 7.0 Agent Browser CurrentState = 4 ServiceType = 16 CheckPoint = 0 ServiceSpecificExitCode = 0 WaitHint = 0 Win32ExitCode = 0 ControlsAccepted = 1 Seagate Alert Server = Backup Exec (TM) 7.0 Alert Server CurrentState = 4 ServiceType = 16 CheckPoint = 0 ServiceSpecificExitCode = 0 WaitHint = 0 Win32ExitCode = 0 ControlsAccepted = 1 Seagate Device & Media Service = Backup Exec (TM) 7.0 Device & Media S +ervice CurrentState = 4 ServiceType = 16 CheckPoint = 0 ServiceSpecificExitCode = 0 WaitHint = 0 Win32ExitCode = 0 ControlsAccepted = 5 Seagate Job Engine = Backup Exec (TM) 7.0 Job Engine CurrentState = 4 ServiceType = 16 CheckPoint = 0 ServiceSpecificExitCode = 0 WaitHint = 0 Win32ExitCode = 0 ControlsAccepted = 5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Remote NT services
by Mr. Muskrat (Canon) on Aug 12, 2003 at 18:28 UTC | |
by blackadder (Hermit) on Aug 12, 2003 at 18:59 UTC | |
by blackadder (Hermit) on Aug 12, 2003 at 19:23 UTC | |
by Mr. Muskrat (Canon) on Aug 12, 2003 at 20:31 UTC | |
|
Re: Remote NT services
by Mr. Muskrat (Canon) on Aug 12, 2003 at 19:49 UTC |