Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How to automate login to different servers via ssh and check is some specific processes are running or not.

by keszler (Priest)
on Dec 12, 2014 at 15:37 UTC ( [id://1110180]=note: print w/replies, xml ) Need Help??


in reply to How to automate login to different servers via ssh and check is some specific processes are running or not.

You might want to look into Rex, and specifically Rex HowTo: Listing all running processes.
use Rex::Commands::Process; user "my-user"; password "my-password"; pass_auth; group myserver => "mywebserver", "mymailserver", "myfileserver"; desc "List all running processes"; task "ps", group => "myserver", sub { for my $process ( ps() ) { say "command: " . $process->{"command"}; say "pid : " . $process->{"pid"}; say "user : " . $process->{"user"}; } };
  • Comment on Re: How to automate login to different servers via ssh and check is some specific processes are running or not.
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1110180]
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-20 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found