[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kernel command line

From: Marcus Brinkmann
Subject: Re: kernel command line
Date: Tue, 8 May 2001 08:05:02 +0200
User-agent: Mutt/1.3.15i

On Mon, May 07, 2001 at 06:19:42PM -0700, Thomas Bushnell, BSG wrote:
> Roland McGrath <roland@gnu.org> writes:
> > > Makes perfect sense.  Looking at the output of ps to get the kernel 
> > > command
> > > line is a natural thing to do, and much better than /proc/cmdline indeed.
> > > I don't see any explicit need for a fancier programmable interface either.
> > 
> > Well, I'm not entirely sanguine about the "PID 2 is the kernel" convention.
> > It is not actually a convention, it is just happenstance.
> I agree with Roland.  
> "PID 2 is the kernel; just look at ps" is to "read a good
> /proc/cmdline" as "skill" is to "kill `cat /var/run/foo.pid`".

We don't need to rely on the PID 2 info:

/gnu/root/D1:    2    -  7  153M 9.67M  0:00.00  0:12.43 /boot/gnumach.gz 

So, the kernel is clearly identified by the program name at least.
This can save you if, for example, one day the kernel is not task 2 but task
3 or 1.

If we want something better, we should make sure that it also works for
sub-Hurds in the sense that I see the arguments to the boot command and not
the arguments to the parent system.  It seems to make sense to provide an
interface for the boot string in proc to query it then (and to set it, the
already existing hack could be used).  The interface could be used by
/proc/cmdline, or by a small C program.

BTW, what output can we expect from a pstree on the Hurd? Will the hierarchy
of a sub-Hurd shown in the parent system, or is this information lost?
Where do I have to look to find out how proc is informed about arbitrary mach
tasks that are not registered voluntarily?


`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]