home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / aix / 8919 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  3.7 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!mips!sdd.hp.com!uakari.primate.wisc.edu!ames!riacs!pioneer.arc.nasa.gov!lamaster
  2. From: lamaster@pioneer.arc.nasa.gov (Hugh LaMaster)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: runaway processes (was Re: Vi is still broken)
  5. Message-ID: <1992Aug19.163218.11786@riacs.edu>
  6. Date: 19 Aug 92 16:32:18 GMT
  7. References: <1992Aug17.163739.29534@APS.Atex.Kodak.COM> <133789@lll-winken.LLNL.GOV> <1992Aug19.132117.5939@msc.cornell.edu> <1992Aug19.145808.2342@murdoch.acc.Virginia.EDU>
  8. Sender: news@riacs.edu
  9. Organization: RIACS, NASA Ames Research Center
  10. Lines: 65
  11.  
  12. In article <1992Aug19.145808.2342@murdoch.acc.Virginia.EDU>, scl@sasha.acc.Virginia.EDU (Steve Losen) writes:
  13. |> [ complaints about runaway processes eating up cpu time ]
  14. |> 
  15. |> In article <1992Aug19.132117.5939@msc.cornell.edu>,
  16. |> |> 
  17. |> |> Yup.  We see this kind of thing frequently.  Since we are about to start
  18. |> |> chargeback accounting, this will be a severe pain.
  19. |> |> 
  20. |> |> Our most recent method of producing the problem is to close a window in
  21. |> |> which a process which is on the receiving end of a pipe is running.
  22. |> |> 
  23. |> |> This has been going on for years but has lately become intolerable.  I
  24. |> |> must now try to come up with a reproducible example and phone up IBM
  25. |> |> to see if it's a 'supported defect' :-}
  26. |> 
  27. |> We've had this problem since day one way back at AIX 3.1.  No AIX upgrade
  28. |> has fixed it yet.  In our case, the runaways are all interactive jobs such
  29. |> as editors, mail readers, news readers, etc., and they all seem to happen
  30. |> when a telnet session ends abnormally.
  31.  
  32.  
  33. I assumed that this was a problem since way back, probably in 4.2 BSD.  
  34. I have seen it for years.  Mail readers seem especially
  35. vulnerable.  I have experienced the same or a similar problem on SunOS and 
  36. Ultrix as well, including very recently (SunOS 4.1.1 and Ultrix 4.2).
  37.  
  38. |> 
  39. |> Very early on I wrote a perl script that runs "ps caux" every few minutes
  40. |> and looks for runaways.  I have a "hit list" of interactive commands that
  41. |> are known to runaway, including vi, jove, more, less, telnetd, rlogind,
  42. |> mail, mush, etc.  The script kills off any of these commands if ps
  43. |> indicates that it is using over 9% of the cpu and has accumulated 2
  44. |> minutes of cpu time.  I just pulled these heuristics out of thin air, but
  45. |> they have worked well on several loaded 540s and 550s.
  46. |> 
  47. |> Sure beats getting called up several times a day to kill these things off.
  48. |> 
  49. |> I would post the perl script, but it has grown very large because it does
  50. |> a whole lot of other stuff such as renicing long running cpu burners,
  51. |> detecting when a user is running >1 cpu burner at a time, etc.  Also, I
  52. |> will have to fix the script to run under 3.2.  IBM has changed the output
  53. |> format of ps.  Thankfully the new format is easier to parse.  Under 3.1.5,
  54. |> some of the fields can run together.  I think under 3.2, you are always
  55. |> guaranteed at least one space of separation.
  56.  
  57. This sounds useful.  If you are feeling generous, you might post it to
  58. comp.sources.something one of these days.  A systematic, generic problem
  59. like this ought to be cleaned up by the vendors if they expect to be able
  60. to market clusters of Unix boxes as alternatives to mainframes.  In a
  61. production shop you can't very well just go killing off processes which
  62. happen to exceed the confines of a heuristic, but for now, it could be
  63. very useful.
  64.  
  65.  
  66. |> 
  67. |> --
  68. |> Steve Losen                     scl@virginia.edu
  69. |> 
  70. |> University of Virginia Academic Computing Center
  71.  
  72. -- 
  73.   Hugh LaMaster, M/S 233-9,     UUCP:      ames!lamaster
  74.   NASA Ames Research Center     Internet:  lamaster@ames.arc.nasa.gov
  75.   Moffett Field, CA 94035-1000  Or:        lamaster@george.arc.nasa.gov 
  76.   Phone:  415/604-1056                     #include <usenet/std_disclaimer.h> 
  77.