Create remoteload.sh

This commit is contained in:
Ankam Ravi Kumar
2019-02-24 21:44:26 +05:30
committed by GitHub
parent 583da457ee
commit 998e510f6c

20
remoteload.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
##################################################
# #
# Author: Ankam Ravi Kumar #
# Website: server-computer.com #
# Date: 23-02-2019 16:59:56 #
# Purpose: Capture and Store System Load Average #
# CPU Usage and Memory Usage #
##################################################
# Log File Path
LOGFILE=/var/log/systemload.log
echo "" > /tmp/remotelog
for i in `cat /opt/hostnames`;
do
cat /root/systemload.sh | ssh $i >> /tmp/remotelog
done
cat /tmp/remotelog |grep -vE "^Last|^There" >> $LOGFILE