in reply to process status on windows
A Bit off the perl topic but you get pulist.exe and pstat.exe from the WinNT and 2000 Resource kit.
Or you can try this (Although it wont give you the Mem utilisation but it might be a start)... ALL CREDIT must go to Dave Roth whose site and books have become sacred to me..
There are a ton of REALLY helpful admin scripts for the Win32 platform on his site -----# ProcList.pl # ----------- # This script will display the list of current processes along with # the process's PID and binary path. # Syntax: # perl ProcList.pl [Machine Name] # # Examples: # perl ProcTree # perl ProcTree.pl \\server # # 2002.01.20 rothd@roth.net # # Permission is granted to redistribute and modify this code as long + as # the below copyright is included. # # Copyright © 2002 by Dave Roth # Courtesty of Roth Consulting # http://www.roth.net/ use Win32::OLE qw( in ); use Win32::OLE::Variant; $Machine = "\\\\."; $Machine = shift @ARGV if( $ARGV[0] =~ /^\\\\/ ); # WMI Win32_Process class $CLASS = "winmgmts:{impersonationLevel=impersonate}$Machine\\Root\\cim +v2"; $WMI = Win32::OLE->GetObject( $CLASS ) || die; foreach my $Proc ( sort {lc $a->{Name} cmp lc $b->{Name}} in( $WMI->In +stancesOf( "Win32_Process" ) ) ) { printf( "% 5d) %s ", $Proc->{ProcessID}, "\u$Proc->{Name}" ); print "( $Proc->{ExecutablePath} )" if( "" ne $Proc->{ExecutablePath +} ); print "\n"; }
|
|---|