Skip to content

Commit 998e510

Browse files
author
Ankam Ravi Kumar
authored
Create remoteload.sh
1 parent 583da45 commit 998e510

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

remoteload.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
##################################################
3+
# #
4+
# Author: Ankam Ravi Kumar #
5+
# Website: server-computer.com #
6+
# Date: 23-02-2019 16:59:56 #
7+
# Purpose: Capture and Store System Load Average #
8+
# CPU Usage and Memory Usage #
9+
##################################################
10+
# Log File Path
11+
LOGFILE=/var/log/systemload.log
12+
13+
echo "" > /tmp/remotelog
14+
15+
for i in `cat /opt/hostnames`;
16+
do
17+
cat /root/systemload.sh | ssh $i >> /tmp/remotelog
18+
done
19+
20+
cat /tmp/remotelog |grep -vE "^Last|^There" >> $LOGFILE

0 commit comments

Comments
 (0)