On Friday, June 14, 2002, at 10:28 , Ramprasad A Padmanabhan wrote:
> I want to run a script on my LTSP server that will find all orphaned > processes and clean them up regularly. > > There are scripts ( good Shell scripts ) availbale but they require the > name of the process to be known. In my case I want these processes to be > found automatically detected. think of a part of the problem you are looking at. We had the 'idle user' problem discussed recently here - but that would of course really annoy myFascistHouseMate who keeps one window open on almost all of the machines, all of which are idle.... So to 'fully automate' the process of 'orphaned process harvesting' you rather do want to know/define/resolve a) what do we mean by orphaned b) how to manage the 'normal children of init' One way to look at solving the simpler side of the process would be say: http://www.wetware.com/drieux/pbl/Sys/psTree.txt where you correlate the User's to their PID's as well as the 'chains' of PID's to PPID's - another approach would be: http://www.wetware.com/drieux/pbl/Sys/psGrovellor.txt { you can download that as a PM at http://www.wetware.com/drieux/CS/Proj/PID/ } The reason that most of the 'good Shell scripts' require the 'name of the process' - is they do not wish to be let loose and randomly slaughtering off things - as root - that really should not be killed.... Hence on the one hand you can a) translate those 'good Shell Scripts' into perl so as to streamline the process b) resolve for yourself which processes you really want to designate as b1: orphaned and automatically killable b2: probably orphaned, hence reportable ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]