Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

To monitor windows processes using Perl

by msk_0984 (Friar)
on Jun 23, 2008 at 12:13 UTC ( [id://693502]=perlquestion: print w/replies, xml ) Need Help??

msk_0984 has asked for the wisdom of the Perl Monks concerning the following question:

Respected Monks,

I have been in a development project to monitor linux and solaris processes ( Third Party Processes ). As it was for monitoring linux/solaris we used to login to the machines using Net::SSH2 (secure ssh connection protocol) to login, perform the required operations and check the health status of the processes running.

This product has been successfully deployed on a linux box and is working very well at the client place and is able to monitor linux/solaris processes effectively. Satisfied with this requirement, client also wanted to monitor the processes running in Windows. So, in order to meet the requirement when searched in perlmonks. In most postings I could see that we can monitor the processes in Windows but the script is placed on the Windows system itself. The client want the script to be installed on the linux box and monitor the Windows processes.

So just to make it simple and break down the above explaination -

I want to first try out by developing a simple perl script on linux box and be able to monitor Windows processes. If yes, please let me know how it can be possible or else any work around solution.

Thanks in Advance.

Sushil Kumar
  • Comment on To monitor windows processes using Perl

Replies are listed 'Best First'.
Re: To monitor windows processes using Perl
by Corion (Patriarch) on Jun 23, 2008 at 12:18 UTC

    You can use the WMI to monitor Windows machines, respectively the WBEM, which is the same thing except under a different name.

Re: To monitor windows processes using Perl
by moritz (Cardinal) on Jun 23, 2008 at 12:21 UTC
    I want to first try out by developing a simple perl script on linux box and be able to monitor Windows processes.

    So how do you plan to communicate between Linux and Windows? If you continue to use ssh (there are ssh servers for windows too), you have to run a program on the windows machine. If you chose to write that program in perl, consider using Win32::Process::Info.

Re: To monitor windows processes using Perl
by bingos (Vicar) on Jun 24, 2008 at 08:49 UTC

    You could use SNMP. There is an SNMP agent that comes with Windows and perl modules for SNMP that will certainly work on Linux

    Alternatively, the Nagios project have several ways to monitor processes on Windows boxen. One way is with NSClient, which is an agent that is installed on Windows and queried from a Linux box using the check_nt plugin. You don't necessarily have to install the full Nagios product, just use the Nagios plugin from a perl script checking the exit status of the plugin.

    There may also be some useful scripts on Nagios Exchange:

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://693502]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-19 20:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found