Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I am looking for a way to monitor if a process has stopped responding on a server, I cannot seem to find anything that will help me with this and I really need it, could someone please point me to something that I can use that will help with this? further information, Operating system is windows server 2003, process is mercury loadrunner, it spawns some subprocesses as well as the main executable which is called vugen.exe, namely mmdrv.exe and thumbprocess.exe occasionally it will hang (stop responding) and my scripts will stall. The purpose of the server is to monitor website performance of a custom application. I run the script on the server via remote desktop, I use windows script to restart the process if it has ended succesfully, the script itself in vuserend calls and executes a batch file using process.exe to kill itself then it calls a vbscript which is to restart the application and set focus and finally call a perlscript using win32guitest to get the window id and sendkeys to the application to restart it. I notice that thumbprocess.exe appears to be causing the hang, and if I kill it the application will sometimes start responding again. I am looking for a solution, I downloaded win32 process and win32 process info yesterday but am not sure what to do to solve this problem and was hoping for some guidance. I am reading about win32process info but I don't understand how to get anything out of it. I looked at planetscapes hash tutorial and now I am able to print out the info for a process but I am looking to do something with the information, which I am not clear on how to do with this module, any suggestions? oh and here is the code I have so far, I know its not much but it does at least display some info.
use Win32::Process::Info; use Data::Dumper; $pi = Win32::Process::Info->new (); $pi->Set (elapsed_in_seconds => 0); # In clunks, not seconds. @pids = $pi->ListPids (); # Get all known PIDs @info = $pi->GetProcInfo (); # Get the max %subs = $pi->Subprocesses (); # Figure out subprocess relationships. @info = grep {$_->{Name} =~ m/perl/} $pi->GetProcInfo (); # All processes with 'perl' in name. #print $info; #print $pi; foreach(@info) { print $_; } my $href=\%subs; print Dumper $href; print Dumper @info;

In reply to monitor process by grashoper

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-19 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found