Current Run-Level: How can you tell?
Peter da Silva
peter at ficc.ferranti.com
Thu Apr 25 08:52:48 AEST 1991
In article <1991Apr23.024433.10460 at srwic.UUCP> sralston at srwic.UUCP (Steve Ralston) writes:
> Sorry as I'm sure this is a FAQ or RTFM question, but, I've looked quite
> a few places and can't find a way to tell what the current run level of
> a Unix system is (i.e. "init" level).
Assuming you're using System V (which is the only place I know of run
levels in anyway)...
% who -r
. run-level 3 Apr 22 08:26 3 0 S
%
Bobs-your-uncle!
In C, you could easily grovel through /etc/utmp if you don't want to
fork a popen.
--
Peter da Silva. `-_-' peter at ferranti.com
+1 713 274 5180. 'U` "Have you hugged your wolf today?"
More information about the Comp.unix.questions
mailing list