-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrm.sh
30 lines (30 loc) · 1.36 KB
/
rm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
#starting resource monitor
echo "***starting Resource monitor***"
for i in {1..5..1}
do
#RAM Usage
echo "***********-----------------------------------------------------************">>log.txt
echo "RAM Usage">>log.txt
echo "***********-----------------------------------------------------************">>log.txt
free -h >> log.txt
echo "***********-----------------------------------------------------************">>log.txt
#Hard drive Usage
echo "***********-----------------------------------------------------************">>log.txt
echo "HDD Usage">>log.txt
echo "***********-----------------------------------------------------************">>log.txt
du -h >> log.txt
echo "***********-----------------------------------------------------************">>log.txt
echo "HDD free space">>log.txt
echo "***********-----------------------------------------------------************">>log.txt
df -h >> log.txt
echo "***********-----------------------------------------------------************">>log.txt
#CPU Usage
echo "***********-----------------------------------------------------************">>log.txt
echo "CPU Usage">>log.txt
echo "***********-----------------------------------------------------************">>log.txt
w >> log.txt
echo "***********-----------------------------------------------------************">>log.txt
done
cat log.txt
echo "***Ending Resource Monitor***"