Xref: utzoo comp.unix.xenix:4788 comp.unix.wizards:14517 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!rochester!pt.cs.cmu.edu!cadre!pitt!amanue!oglvee!jr From: jr@oglvee.UUCP (Jim Rosenberg) Newsgroups: comp.unix.xenix,comp.unix.wizards Subject: Re: Errors in PS Message-ID: <464@oglvee.UUCP> Date: 4 Feb 89 00:18:59 GMT References: <19496@lll-winken.LLNL.GOV> <341@belltec.UUCP> <667@pcrat.UUCP> Reply-To: jr@.UUCP (Jim Rosenberg) Distribution: na Organization: Oglevee Computer Systems, Connellsville, Pa Lines: 42 In article <667@pcrat.UUCP> rick@pcrat.UUCP (Rick Richardson) writes: >In article <19496@lll-winken.LLNL.GOV>, vijay@lll-winken.LLNL.GOV (Vijay Subramaniam) writes: >> Has anyone else been having trouble with PS giving a ps: seek error? >This may be related. Or not. I just saw a "ps: seek error" under >ISC 386/ix version 1.0.6 (first and only one time this happened). >The situation was a coding error (mine!) which started a program doing >infinite recursion. While the stack was growing in leaps and bounds [...] >The system was very sluggish, >with almost continuous disk activity going on. The "ps" printed >a few lines and then gave the "ps: seek error". I probably shouldn't jump into this, since I've never had the privilege of breaking the bonds of second class citizenship in the UNIX world by having access to source code, so I'm only speculating. (A euphemism for bs'ing!) It appears that ps needs to do i/o on /dev/swap in order to fill in some of the fields it needs, depending on the state of the process it's listing. Exactly why this should be true on a 386, which *OUGHT* to be a paging system rather than a swapping system, I can't say, but I know that on our Xenix System V (**not** V.3, alas) ps needs read permission on /dev/swap. I believe even on a paging system it pages out to /dev/swap, or the like, right? Rick's machine probably started thrashing when he got uncontrolled stack growth. Could it be that the paging code somehow stepped on the toes of an lseek ps was doing on /dev/swap? The way that ps works is an utter abortion, IMHO. Many, many, many operating systems have a system call to yield up process table entries. While I surely place great weight on those wise souls who argue that both System V and BSD are bloated as it is & the last thing we need is more system calls, don't we really need *something* more than reading /dev/mem and fishing things out of the name list just to get something the kernel should hand us for the asking? When ps has to go to the extreme of pawing its way through /dev/swap it seems to me something is drastically wrong. I should be able to read section 2 of the man pages and bang out a respectable ps without that much work. -- Jim Rosenberg pitt Oglevee Computer Systems >--!amanue!oglvee!jr 151 Oglevee Lane cgh Connellsville, PA 15425 #include