*BSD News Article 5703


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!spool.mu.edu!caen!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry
From: terry@cs.weber.edu (A Wizard of Earth C)
Subject: Re: [386BSD] fixing ps: major/minor numbers for /dev/console wrong?
Message-ID: <1992Sep28.155609.21636@fcom.cc.utah.edu>
Sender: news@fcom.cc.utah.edu
Reply-To: terry@icarus.weber.edu
Organization: Weber State University  (Ogden, UT)
References: <1992Sep27.155125.2160@drycas.club.cc.cmu.edu> <wutcd.717632941@hadrian> <1992Sep27.222353.2163@drycas.club.cc.cmu.edu>
Date: Mon, 28 Sep 92 15:56:09 GMT
Lines: 53

In article <1992Sep27.222353.2163@drycas.club.cc.cmu.edu> ghod@drycas.club.cc.cmu.edu writes:
>In article <wutcd.717632941@hadrian>, wutcd@chemnitz.guug.de (Joerg Wunsch) 
>writes:
>> ghod@drycas.club.cc.cmu.edu writes:
>>> [1) some names not found...]
>>>Problem #1 is not, ps's fault: it's the kernel. The stock kernel in the 0.1
>>>...
>> Okay, it's quiet clear: the dist kernel had to fit onto a diskette:-)
>> 
>
>Actually, this was a true honest to goodness bug, not an attempt to whittle
>the kernel down to fit onto the distrubution diskette. The kernel on dist.fs
>is slightly larger than 400 Kbytes. The one I ftp'ed from
>rachel.ibmpcug.co.uk was about 380 Kbytes, and included more drivers than the
>stock kernel. Go figure. :)

This is the difference between the kernel being stripped or unstripped, and
stripping *is* the result of an attempt to fit it on the dist.fs.

>Also, upon further investigation, ps's inability to print command line args
>doesn't appear to be due to a bug in its code. The call used to get the 
>arguments from the kernel is kvm_getargs(), which I'm assuming is related
>to the kvm_getcmd() call in SunOS. kvm_getargs() seems to return only the
>command name, not the command line args, so I guess the solution will indeed
>lie in some kernel hacking. Unfortunately, I don't have the space to build
>a new kernel (and with only a 16Mhz 386SX it would probably take days :)
>so I guess I'll just have to wait for the next release or patch.

I you haven't rebuilt the kernel, you won't have the symbol information in
to to look up the arguments from.  You *must* rebuild the kernel after
installing to make "ps" and other utilities happy ("route get", "arp -a",
"netstat", etc.).

That being said, there is code missing that returns the command line
arguments for commands.  This has been disabled, apparently to avoid a
crash when you read from /dev/drum, rather than as a real fix to the
problem (which is fixing the uninitialized pointer to allow reading from
/dev/drum without a crash.  There was a patch posted here (comp.unix.bsd)
for the problem, but it was marked as a first attempt and subject to
rewrite.  Look it up and install it if you dare...


					Terry Lambert
					terry_lambert@npd.novell.com
					terry@icarus.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.
-- 
-------------------------------------------------------------------------------
                                        "I have an 8 user poetic license" - me
 Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
-------------------------------------------------------------------------------