Re: What is a 'run-level' in Solaris 10?
- From: ubyt3m3 <ubyt3m3@xxxxxxxxx>
- Date: Fri, 2 May 2008 21:35:30 -0700 (PDT)
On May 2, 2:23 pm, Wayne <nos...@xxxxxxxxxxxxxx> wrote:
ubyt3m3 wrote:
On May 1, 10:27 pm, Rich Teer <rich.t...@xxxxxxxxxxxxxx> wrote:
On Thu, 1 May 2008, ubyt3m3 wrote:
Yes, but you'd get the answer quicker if you did your own research. run-level 3 Nov 29 10:59 3 0 Scan anyone tell me what each field (output fromwho -r) represents?
(hint: man who).
--
Rich Teer, SCSA, SCNA, SCSECA
CEO,
My Online Home Inventory
URLs:http://www.rite-group.com/rich
http://www.linkedin.com/in/richteer
http://www.myonlinehomeinventory.com
uh... i already checked the man page and there is no explanation for
each field so i'm asking in this group.
who -rH produces below output:
# who -rH
NAME LINE TIME IDLE PID COMMENTS
. run-level 3 Oct 23 18:22 3 0 S
But this doesn't make sense to me. PID = 0 and COMMENTS = S? I know -
H gives just general headings.
I'm curious what they represents.
Those headers don't apply when using -r. You're right the output
isn't documented, but I'm pretty sure the first part is
the current run-level ("3") and the date the run-level was last changed.
The previous run-level ("S") must be4 that last value, but I don't know
what the "3" and "0" in the middle mean, it isn't documented anywhere.
I tried reading the source code for who athttp://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/who...
(and also utmp.h). But a cursory read doesn't show what that output
means:
675 /*
676 * Handle RUN_LVL process - If no alt. file - Only one!
677 */
678 if (utmpp->ut_type == RUN_LVL) {
679 (void) printf(" %c %5ld %c", pterm, utmpp->ut_pid,
680 pexit);
681 if (optcnt == 1 && !validtype[USER_PROCESS]) {
682 (void) printf("\n");
683 exit(0);
684 }
685 }
This appears to be where the final "3 0 S" are printed from,
but without any comments one would have to read and understand more than
this to interpret those values.
A little work with Google reveals this is a common question. I only
found one answer to it, at:
http://unix.derkeiler.com/Newsgroups/comp.unix.solaris/2003-09/1484.html
From: Senthilraja R (sruthrap_at_cisco.com)
Date: 09/12/03
#who -r
. run level 3 Jun 9 08:30 3 0 S
3- Current run level
0- Number of times at this run level since last reboot
S- Previous run level
But there is no indication that this answer is authoritative.
This really should be considered a bug in the documentation and
could be easily fixed by someone knowledgeable about who.c.
Would one of the Sun people reading this take care of this long
standing omission please, and update the who(1) man page?
Thanks!
-Wayne- Hide quoted text -
- Show quoted text -
Thanks for the info, Wayne.
.
- References:
- Re: What is a 'run-level' in Solaris 10?
- From: ubyt3m3
- Re: What is a 'run-level' in Solaris 10?
- From: Rich Teer
- Re: What is a 'run-level' in Solaris 10?
- From: ubyt3m3
- Re: What is a 'run-level' in Solaris 10?
- From: Wayne
- Re: What is a 'run-level' in Solaris 10?
- Prev by Date: Re: Autofs issue with home directory on AIX.- anyone?
- Next by Date: Re: JNIC146x FC Card migrate to Qlogic QLA2200 card
- Previous by thread: Re: What is a 'run-level' in Solaris 10?
- Next by thread: Re: What is a 'run-level' in Solaris 10?
- Index(es):
Relevant Pages
|