Xref: utzoo unix-pc.general:4369 comp.sys.att:8297 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!cadre.dsl.pitt.edu!pitt!amanue!jr From: jr@amanue.UUCP (Jim Rosenberg) Newsgroups: unix-pc.general,comp.sys.att Subject: Re: UNIXPC operating sans run-level; HOW? Message-ID: <466@amanue.UUCP> Date: 17 Dec 89 19:28:43 GMT References: <25060@cup.portal.com> Reply-To: jr@amanue.UUCP (Jim Rosenberg) Organization: Amanuensis Inc., Grindstone, PA Lines: 39 In article <25060@cup.portal.com> thad@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! /