neil@man.psy.UUCP (Neil Todd at UK.AC.MAN.CS.UX) (01/30/86)
When I need to kill off a rogue process at the moment I need to use ps, and from that figure out what is the pid of the rogue. This is especially difficult when the program concerned is forking children like mad. I remember using a program called "zap" on v7 that would allow me to "zap" processes belonging to a certain user, or associated with a particular terminal. Is there anything like "zap" (or better than it) around for BSD 4.[23] ? Neil Todd JANET:- neil@uk.ac.man.cs.ux UUCP :- ...!mcvax!ukc!man.cs.ux!neil ARPA :- neil%uk.ac.man.cs.ux@ucl.cs.arpa
mouse@mcgill-vision.UUCP (der Mouse) (02/03/86)
> When I need to kill off a rogue process at the moment I need to > use ps, and from that figure out what is the pid of the rogue. > This is especially difficult when the program concerned is forking > children like mad. What I usually do with programs like this is to send STOP signals. Eventually all problem processes are stopped and hence not forking. *Then* start killing. -- der Mouse USA: {ihnp4,decvax,akgua,etc}!utcsri!mcgill-vision!mouse philabs!micomvax!musocs!mcgill-vision!mouse Europe: mcvax!decvax!utcsri!mcgill-vision!mouse mcvax!seismo!cmcl2!philabs!micomvax!musocs!mcgill-vision!mouse Hacker: One who accidentally destroys / Wizard: One who recovers it afterward
neil@man.psy.UUCP (Neil Todd at UK.AC.MAN.CS.UX) (02/05/86)
Thanks to everybody who replied to my query about killing processes. There seem to be a number of schools of thought on this matter :- 1) Send a STOP to the process, then kill it at your leisure. 2) If you're using >= 4.2, renice the offending user and processes down to 20, this gives you more time to catch processes that are busy forking. The trouble with these two is that you've still got to do a "ps", which was the thing that was bugging me in the first place - especially if the system is slow. 3) Use something along the lines of the zap program given in "The Unix Programming Environment", this does the "ps" for for and asks you process by process whether you want to kill them off. 4) Introduce a new system call that can "kill-by-uid". This is nice and quick, but will kill off EVERY process belonging to that uid. I've opted for a combination of 3 and 4. The new system call went in with very little effort, thanks to Ken Lalonde at University of Waterloo for the basic code for 4.2. Neil Todd JANET:- neil@uk.ac.man.cs.ux UUCP :- ...!mcvax!ukc!man.cs.ux!neil ARPA :- neil%uk.ac.man.cs.ux@ucl.cs.arpa [ Please use the ARPA route rather than UUCP if you can]