Asim Ansari wrote:
Hi Folks,
Running Red Hat Linux 8.0.
I need to get email alert when RAM utilization on my server is above 80% and
free disk space is 30%, I don't have any SMTP service running on this
machine, I want to send this email through smtp server running on another
machine in my LAN.
Asim
for user in $(users); do
cpu=$(ps h -U $user -o pcpu|paste -sd+|bc)
[[ ${cpu/./} -gt 100 ]] && \
echo "Fsck off, you're eating my cpu!"|mail -s "READ NOW !!!" $user
done
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list