How to extract system load through SSH

Hi , with some research I have written these simple scripts which can extract only load average part from uptime command.

these scripts you can use for getting information you requested from remote systems through SSH.

Script #1

#!/bin/bash

for i in localhost 
do
ssh raja@$i $'uptime | awk \'{print $6 $7 $8 $9 $10}\' '
done

Script #2
#!/bin/bash

for i in localhost 
do
ssh raja@$i $'uptime | grep -o "load.*"'
done

0 Comments