Skip to content

Commit 0a35a1e

Browse files
committed
initail
1 parent 5e3350f commit 0a35a1e

3 files changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
echo "Enter Your Name : "
3+
read username
4+
5+
if id "$username" &>/dev/null
6+
then
7+
echo "User Already Exists"
8+
else
9+
sudo useradd $username
10+
sudo passwd $username
11+
echo "User $username created successfully "
12+
fi

System-admin/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

System-admin/SysMonitoring.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
echo"================== System Monitoring ==================="
3+
4+
echo"================= Memory Usage ========================"
5+
echo "Memory Usage is : $(free -h)"
6+
7+
echo "=============== Disk Usage =========================="
8+
echo "Disk Usage is : $(df -h)"
9+
10+
echo "==================== UPTIME ===================="
11+
echo "UpTime is : $(uptime)"
12+
echo "On Date $(date)"
13+
14+
echo "============= Running Processes ==============="
15+
echo "Running Processes Are : $(top | head -6)"
16+
17+
echo "========================== Monitoring Completed ======================================"

0 commit comments

Comments
 (0)