Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!pyramid!ut-sally!seismo!mcvax!boring!jack From: jack@boring.uucp (Jack Jansen) Newsgroups: net.unix-wizards Subject: Re: Why do ps, uptime (& probably others) check vmunix version? Message-ID: <6773@boring.UUCP> Date: Fri, 14-Feb-86 08:56:01 EST Article-I.D.: boring.6773 Posted: Fri Feb 14 08:56:01 1986 Date-Received: Mon, 17-Feb-86 05:26:52 EST References: <457@ur-helheim.UUCP> Reply-To: jack@mcvax.UUCP (Jack Jansen) Organization: AMOEBA project, CWI, Amsterdam Lines: 25 Apparently-To: rnews@mcvax In article <457@ur-helheim.UUCP> badri@ur-helheim.UUCP (Badri Lokanathan) writes: >Since /vmunix was linked to the old version of vmunix, naturally it barfed. >So, here is my question. Why should ps (and any other program) examine the >name of vmunix? This is particularly aggravating if a new kernel is being >tested - I do not want to make too many changes, just in case. It has to check. It gets the addresses of kernel variables by looking in the namelist of /vmunix, and those variables are likely to be on different addresses if you run another kernel. V7 didn't check anything, which meant that 'ps' gave you lots of garbage when you ran it if you had booted from a different kernel (it tried to interpret random junk as, for instance, the process table. This is likely to produce dissapointing results). Something I was thinking of is teaching the boot program about symbolic links. That way, you can have /vmunix.1, /vmunix.2, etc. Now, as soon as the system comes up, some program, probably /etc/init, will setup a symbolic link from the currently running unix to /vmunix. So, besides the fact that 'ps' works as expected, you will automatically have the effect that a reboot will automatically reboot the currently running kernel. To get a different kernel running, you just ask for a reboot by name. -- Jack Jansen, jack@mcvax.UUCP The shell is my oyster.