killing a hung up process with a script
Ok here is my situation, In our shipping warehouse I have a print server running CUPS. Every once in awhile ghostscript get hung up and it puts a halt to everything until we can kill gs and restart cupsd. My boss wants me to make a script that will check everyfew minutes to see if gs is hung up or not and if so kill it and restart cupsd. now I know how to kill it without using a pid through my script from searching the forums but how can i get it to check how long, let's say i want it to kill it if it has been running for more than 3 minutes. any ideas?
|