[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

notify if a process take more than X time



Hi all,

I need add to my script a notify if a process take more than X time, so using ps I can see what time take a process:

ps -ao cmd,etime|grep backup
/bin/sh ./backup    03:44:55

what's the easy way to do a notify by email?

redirect output of ps to file and use sed for analize the past time, next verify with if/then or there's a better way?

any idea?

thanks for help!

Pol


Reply to: