Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

df -h script to 10 servers and append the printout into one file

by sabas (Acolyte)
on Nov 15, 2018 at 01:07 UTC ( [id://1225831]=perlquestion: print w/replies, xml ) Need Help??

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

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on df -h script to 10 servers and append the printout into one file

Replies are listed 'Best First'.
Re: df -h script to 10 servers and append the printout into one file
by kcott (Archbishop) on Nov 15, 2018 at 05:38 UTC
Re: df -h script to 10 servers and append the printout into one file
by salva (Canon) on Nov 15, 2018 at 15:07 UTC
    Congratulations, you have won the following dirty one-liner as part of the monastery pre Black Friday give away!!!
    perl -e 'system(qq(ssh $_ "hostname && df -h")) for @ARGV' host1 host2 + host3 ...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-23 10:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found