thad@cup.portal.com (Thad P Floryan) (12/15/89)
Anyone ever see UNIX operating withOUT being in a run-level? Seriously. Had a major power failure here, and the UPS on two systems pooped-out before I could get to the systems and perform an orderly shutdown. Rebooting after power was restored caused the systems to undergo a forced second reboot each time, and attempts to shutdown afterwards WOULDN'T shutdown and, instead, left me at a "pseudo" root prompt but still logged-in under the username I was just-prior logged in as (sic). Entering a ^D then forced a prompt for "Enter run level: " (as from ``init''), but things still weren't right afterwards. 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 $ which it became (again) after the 5th (or so) reboot. The OTHER weird occurrence (until the system automagically re-acquired a run-level), was that logging in via any method (console, RS-232, StarLAN, on-board modem) would cause the following display (and the parameters, as displayed, do NOT exist in ANY .profile on the systems or in /etc/profile or in /etc/localprofile ): Welcome to ThadLABS System #2, AT&T UNIX System V, Release 3.51 Please login: thad Password: EDITOR=/bin/ed FCEDIT=/bin/ed HOME=/u/thad IFS= LOGNAME=thad MAIL=/usr/mail/thad MAILCHECK=600 PATH=:/bin:/usr/bin PPID=351 PS2=> PS3=#? RANDOM=28844 SECONDS=2 SHELL=/bin/ksh TMOUT=0 _=3 Please type the terminal name and press RETURN: dt80 1% of the storage space is available. ksh 351/352> Except for the "lack" of a runlevel (before the problem cleared up) and the weird output during login, the systems otherwise "felt" like they were acting normally except for the troublesome shutdowns and reboots. Any ideas as to what might have caused this and why several shutdown & reboot cyles would have cleared up the symptoms? The systems that experienced these anomalies were UNIXPCs (aka 7300 aka 3B1) running versions 3.51 and 3.51a of the SysV kernel (for the UNIXPC). Thad Floryan [ thad@cup.portal.com (OR) ..!sun!portal!cup.portal.com!thad ]
jr@amanue.UUCP (Jim Rosenberg) (12/18/89)
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! /