Run shell script on multiple linux servers
Hi There,
RHEL I want a script that will check disk space on multiple servers. I can do a df -h with : PHP Code:
PHP Code:
|
I remember I saw this script, and I also remember I gave you a one liner instead of this terrible code.
So I suggest you to use a much simple script and you will be able to use that with ssh: http://www.linuxquestions.org/questi...9/#post4659230 Code:
cmd="this is a one line long script" |
I agree with pan64. Using a simple command is far simpler. In addition, to avoid the quotes headache you might run the df command remotely and parse it locally, e.g.
Code:
#!/bin/sh Moreover, notice that usually you don't need to run grep, awk and sed together, since awk can do it all! :jawa: |
Hi,
Ok I used the "lighter script" : PHP Code:
|
No filesystem with usage > 95%? What is the difference between the two servers in terms of OS, shell, awk version and so on?
|
I would simplify it:
Code:
for i in <server list> |
All times are GMT -5. The time now is 03:07 PM. |