Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

ShellScript to monitor available disk space on AIX

tpatil created the topic: ShellScript to monitor available disk space on AIX
#!/bin/ksh

# This script monitors available disk space.
# This script emails an alert when a locally mounted partition crosses a given threshold.
# Set your threshold percentage (do not include the % sign), email address, and excluded mount points, then add to crontab
# TPatil 03/12/10
#
# Add this to crontab -e for root
# Diskspace monitoring script
#0 6 * * 1-5 /bin/diskMonitor.sh >/dev/null 2>&1

THRESHOLD="90"
EMAIL="abc@abc.com"
# Excluded mount points *must* be pipe delimited
# "/proc|/export/home|Mounted" should always be included
EXCLUDE="/proc|/export/home|Mounted"

df -k | awk '{print $7"\t"$4}' |egrep -v "(${EXCLUDE})" | while read LINE; do
PERC=`echo $LINE |awk '{print $2}' |cut -d"%" -f1`
if [ $PERC -gt $THRESHOLD ]; then
echo "${PERC}% ALERT" | /usr/bin/mail -s "Disk Space Alert: ${LINE} used on `hostname`" $EMAIL
fi
done

scmjobs replied the topic: Re: ShellScript to monitor available disk space on AIX
thanks

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Chmod: Change File Permissions Recursively

Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked…

Read More

Shell Bash Scripting: Assignment & Excercise – 14

Write a Shell Bash Script for convert Decimal Number to Binary Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing…

Read More

Shell Bash Scripting: Assignment & Excercise – 13

Write a Shell Bash Script for test if a number being entered is a Fibonacci or not Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and…

Read More

Shell Bash Scripting: Assignment & Excercise – 12

Write a Shell Bash Script for check if a number is prime or not Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert…

Read More

Shell Bash Scripting: Assignment & Excercise – 11

Write a Shell Bash Script for check if a provided number is Armstrong or not Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering…

Read More

Shell Bash Scripting: Assignment & Excercise – 10

Write a Shell Bash Script for check if a number input from standard input is odd or even Rajesh KumarI’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud,…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x