[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: who -r
Re: who -r
Sat, 15 Apr 2006 22:58:45 -0600
ray h wrote:
> I was trying to find out what the result of "who -r" means, I underatand
> it prints the current and previous runlevel, however "info who" yeilds no
> explanation of what "S" means for the previous runlevel.
> run-level 5 Apr 15 20:33 last=S
You did not say what system you are using. The results are somewhat
The who command digs information from the system utmp file. (In old
systems this used to be /etc/utmp and various information was logged
there. In modern systems that is usually /var/run/utmp or other
"var"iable location.) On my Debian system some documentation on utmp
may be found in the Linux Programmer's Manual (e.g. man utmp).
The 'who -r' command reports information logged to utmp about the run
level. The run level logged to utmp indicates the state of the "init"
process. The init process logs its runlevel to the utmp file whenever
it changes. Information about init may be found in the init man page.
> The runlevel command does not print "S" for the last runlevel, it prints
> N. Why are these different and can we have the switch added to the
The "S" runlevel is the single user mode runlevel. It is meant for
The runlevel manual says:
If there is no previous system runlevel, the letter N will be
The who command prints "S" if the last runlevel is "N". This is most
likely for compatibility with legacy Unix systems which print S for
the previous runlevel. [But it may be the legacy systems tend to boot
to Single user mode first and from there continue to multiuser.]
- who -r, ray h, 2006/04/16
- Re: who -r,
Bob Proulx <=