🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.4bsd
Article #1378

Re: ps arg+env limit of 1016 characters

#1378
From: Guy Harris
Date: Tue, 18 Apr 1989 18:51
22 lines
1640 bytes
>	As I have no root access I can't analyze the problem. However,
>	since a local process reporter (sps(1)) shows similar symptoms,
>	the problem may lie in /dev/*mem rather than /bin/ps.

Not likely.  "/dev/mem" wouldn't know an argument list or environment
list if it came up and bit it in the ass; it just hands you data from
physical memory.  However, the 4.3BSD "ps" *does* quite explicitly limit
the amount of argument/environment data it'll print to CLSIZE*NBPG
(i.e., one "operating system's notion of a page", or 1024 bytes) minus
a couple or so longwords of other stuff, which accounts quite nicely for
the 1016.

"sps" probably either lifted much of the code from "ps", or works
similarly to "ps", which would account for it having a similar
limitation.

Printing more of the argument list may or may not be a win (especially
on systems such as SunOS 4.0, with a "max arg list" size of about 1
megabyte - no, that's not a typo); after a while, it'd probably be like
reading the phone book.  It might be nice if it could avoid getting
fouled up by large environments, although it might be a bit more effort
to read in more than one page of the stack. 
Technical Details
Message-ID: <1462@auspex.auspex.com>
Path: arc1-ca.pugleaf.net!utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!auspex!guy
References: <7721@phoenix.Princeton.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!auspex!guy
From: guy@auspex.auspex.com (Guy Harris)
Newsgroups: comp.bugs.4bsd
Subject: Re: ps arg+env limit of 1016 characters
Message-ID: <1462@auspex.auspex.com>
Date: 18 Apr 89 18:51:10 GMT
References: <7721@phoenix.Princeton.EDU>
Reply-To: guy@auspex.auspex.com (Guy Harris)
Distribution: usa
Organization: Auspex Systems, Santa Clara
Lines: 22