Home  |  Linux  | Mysql  | PHP  | XML
From:newbie01 perl Date:Wed Mar 10 00:15:53 2010
Subject:Windows Services and Logical Volume Monitoring Script ....
Hi all,

Am trying to write a script that will simply list all Windows Services and
its Status, i.e Started or Not Started and the percent used and percent
available space of logical volumes on Windows, is there anyone on this group
that may already have a script similar to this that he/she is willing to
share?

I've found some on Google and currently tweaking them ...

Sorry for being lazy ... :-) Am kinda trying not to re-invent the wheel if
someone from the group may already have one that he/she is willing to share.

Thanks in advance.

Again my apologies for being lazy, am just currently short on time as well
and need to get this one by the end of the day or should I say night in my
timezone ...

So far this is what I have:

=========================

use Win32::Service;
my ($key, %service, %status, $part);

Win32::Service::GetServices('',\%services);

foreach $key (sort keys %services)
{
print "Display Name \t : $key, $services{$key}\n";
Win32::Service::GetStatus( '',$services{$key}, \%status);
print "CurrentState : $status{CurrentState} \n";
sleep 2;
}

=========================

Still need to workout the various values of CurrentState and what they means
and then the next one is to list the Logical Volumes and their percent used
space.

Navigate in group perl.beginners at sever nntp.perl.org
Previous Next


Your recent visits
Re: 1-line text file with numbers, need to add to them
Re: 1-line text file with numbers, need to add to them
Re: running stats on a file
Re: Lingua::Stem 0.83 module installation problem
Re: running stats on a file



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants