UNIXPC operating sans run-level; HOW?

Jim Rosenberg jr at amanue.UUCP
Mon Dec 18 06:28:43 AEST 1989


In article <25060 at cup.portal.com> thad at cup.portal.com (Thad P Floryan) writes:
>Anyone ever see UNIX operating withOUT being in a run-level?  Seriously.
>
>ONLY after about 5 rapid shutdowns and reboots did things appear to return to
>normal (and no files lost), but EVERY time before things returned to normal I
>noticed the following:
>
>	$ who -r
>	$
>
>Yes, that's correct, NO runlevel! The output should have been something like:
>
>	$ who -r
>	   .      run-level 2  Dec 12 19:43    2   0   S

I've never had the pleasure of access to source code, so I thereby don't
qualify as a true wizard; count what I'm saying as speculation -- but it may be
right anyway.  :-)

My impression is that who is nothing but a nice front end to show the status of
/etc/utmp, and utmp *CAN* become hosed.  In fact utmp corruption seems to be
one of the major risk factors for power loss without graceful shutdown.  I
would guess that who -r, rather than actually "talking to" init to find out the
run level, is simply reporting from /etc/utmp the utmp entry for run level that
it *EXPECTS* to be there.  The run level is really an internal state of init.
The fact that who -r is not reporting the run level does not really mean you're
running "without" a run level.  It just means that who can't find out what the
run level is.

I believe that communication with init is pretty much one-way:  init receives
information from user processes by signals.  I don't believe there's a way to
establish a channel to init to have it actually tell you what the run level is.
All you can do is hope to pick up the right information on the *LOGGING* of the
run level.  And if your file system is damaged ...
-- 
 Jim Rosenberg
     CIS: 71515,124                         decvax!idis! \
     WELL: jer                                   allegra! ---- pitt!amanue!jr
     BIX: jrosenberg                  uunet!cmcl2!cadre! /



More information about the Unix-pc.general mailing list