On 27 January 2014 17:43, Pol Hallen <de...@fuckaround.org> wrote: > 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
Might be overkill but take a look at ps-watcher package if it is available in your Debian version. -- rob -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOZWb-r+dTVUmfCvLsgX4-duSA7P=dk+-zqwh9+unk9z6ag...@mail.gmail.com