check disk space of multiple computers in a network
Hi,
Can I get the output of df -h of multiple systems in the network by a command or a script rather than checking each system. For eg: Specifying the range of ip addresses viz..192.168.1.x to 192.168.1.x ...something like that. Thanks, Linuxque |
to get remote df you can do : ssh $REMOTE_IP $COMMAND, for example ssh 192.168.0.2 df -h
|
For just one time checking and if you can enter password each time with ssh command, you can:
Code:
#!/bin/bash |
Wheel reinvention-wise there's tools dealing with ^whatever.on.*multiple hosts like ClusterSSH, Dsh, Fanout / Fanterm, Tentakel, Shocto, SwitchTower, MUC, Parallel SSH and RGANG. Going a whole different route getting stats without even requiring SSH or password-less logins is possible too with a simple (X)inetd-based script or using SNMP.
|
Additionally, one can simply set up a network monitoring program such as Nagios or Zenoss to check the status and health of multiple computers, send alerts, etc. Ultimately, this is the most scalable solution, but it requires a bit more work up front to get going.
|
+1 nagios. I'm running a few servers (backup server, DNS servers, web Servers, Monitor servers) and I have 1 simple login to nagios which gives me the load, diskspace, login users, etc on a charge through nrpe plugin.
its simple to install but may be a little tough to configure at first but once you understand it becomes easy and highly configurable. It will all email notifications such as low diskspace. nagios doesn't use much resources at all either. |
All times are GMT -5. The time now is 07:08 PM. |