Skip to content

Commit 9f91fa2

Browse files
committed
seccommit
1 parent 1949250 commit 9f91fa2

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Disk-Usage-Alert.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
THRESHOLD=80
3+
USAGE=$(df / | tail -1 | awk '{print $5}' | sed 's/%//')
4+
if [ $USAGE -gt $THRESHOLD ]
5+
then
6+
echo "Warning : Disk Usage above $THRESHOLD%"
7+
else
8+
echo "Disk Usage is Normal"
9+
fi

0 commit comments

Comments
 (0)