Getting load information via SSH

I have tried so many ways but finally happy with this

#!/bin/bash
for i in localhost 127.0.01
do
ssh raja@$i 'uptime | grep -o load.*'
done
The above script will produce load average from a remote system.


Comments