From 998e510f6ccd30b4d9f7b2f04dd67e6556c8322a Mon Sep 17 00:00:00 2001 From: Ankam Ravi Kumar Date: Sun, 24 Feb 2019 21:44:26 +0530 Subject: [PATCH] Create remoteload.sh --- remoteload.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 remoteload.sh diff --git a/remoteload.sh b/remoteload.sh new file mode 100644 index 0000000..83da24b --- /dev/null +++ b/remoteload.sh @@ -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