View Single Post
Old 09-13-2002, 08:39 AM   #2 (permalink)
technobard
Centurion Nova Prime
 
technobard's Avatar
 
Join Date: May 2002
Location: Oak Park, IL (USA)
Posts: 287
technobard is on a distinguished road
Admin, you can cron a shell script using the output from "uptime" to do this.

Something like:
Code:
#!/bin/ksh

MAXLOAD=8.5

loadavg=`uptime | awk '{print $11}' | awk -F"," '{print $1}'`

if [ $loadavg -eq $MAXLOAD ]
then
     mailx ......  # send email notification
     # optionally, restart Samba process
fi
If you go this route, check the format of uptime on your system to make sure you "awk" the correct column.

Of course this only fixes the symptom. I'd post the problem to the samba newsgroup (assuming there is one).
technobard is offline   Reply With Quote