- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to view the current runlevel in hp-ux
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2009 05:43 AM
тАО05-23-2009 05:43 AM
In Redhat and suse linux. we can use following command to view the current run level.
Ex:
suse10tst: # runlevel
N 5
We can see the default runlevel in /etc/inittab.
but i want to know current runlevel of hpux.
is it possible.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2009 05:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2009 05:58 AM
тАО05-23-2009 05:58 AM
Re: how to view the current runlevel in hp-ux
you can check the current run level in all hpux flavour with
who -r
also check man who will get more detail help, thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2009 07:29 AM
тАО05-23-2009 07:29 AM
Re: how to view the current runlevel in hp-ux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2009 09:12 AM
тАО05-23-2009 09:12 AM
Re: how to view the current runlevel in hp-ux
You can get the runlevel by "who -r" command as shown:
root> who -r
. run-level 3 May 22 17:22 3 0 2
Here the server is in runlevel 3
-r Indicates the current run-level of the init process. The last three fields contain the current state of init, the number of times that state has been previously entered, and the previous state. These fields are updated each time init changes to a different run state.
Regds,
R.K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2009 09:12 AM
тАО05-23-2009 09:12 AM
Re: how to view the current runlevel in hp-ux
# who -r ==> will show you current runlevel of hpux.
Thanks,
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2009 09:28 AM
тАО05-23-2009 09:28 AM
Re: how to view the current runlevel in hp-ux
Does anyone READ what has already been posted? Endlessly repeating the same answer adds NOTHING!
NO POINTS FOR THIS COMMENT.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2009 09:41 AM
тАО05-23-2009 09:41 AM
Re: how to view the current runlevel in hp-ux
Repeating the same answer by different user (for sake of adding points to own account)will add NO VALUES to this forum rather makes it quite boring to read...
Thanks!!
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2009 04:04 PM
тАО05-23-2009 04:04 PM
Re: how to view the current runlevel in hp-ux
Why do you need it? Is is for some rc(1m) script?
>JRF: Does anyone READ what has already been posted?
It's not enough to read the man page and the current thread. You need to read other threads and you'll find out that "who -r" doesn't work at all.
The result of who(1) is nearly the same as "echo 3".
There was mention of getrunlvl but that may not work either:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1325385
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1239710
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1238202
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2009 07:54 PM
тАО05-23-2009 07:54 PM
Re: how to view the current runlevel in hp-ux
who -r gives current run level
/etc/inittab
Hp-UX has the following Run levels:
s single user
2 multi-user; no NFS server capabilities
3 multi-user with NFS server
4 same as 3, but with HP VUE
To change runlevels:
/sbin/shutdown -y 0 # to go to single user state
/sbin/init # bring the system up in the new runlevel
Rgds-Kranti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2009 02:05 PM
тАО11-06-2009 02:05 PM
Re: how to view the current runlevel in hp-ux
these commands will show that run level.
It is a bit strange but when the rc1.d and rc2.d scripts are executed they are techincally running at run level 3. If you want to know what stage of startup a system is at I have used the following logic in the rc scripts
RUN_LEVEL=$(echo $0 | awk -F/ '{print $3}')
This should return the directory the script is running from .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-06-2009 08:38 PM
тАО11-06-2009 08:38 PM
Re: how to view the current runlevel in hp-ux
who -r will show you the current run levels of HP-UX. HPUX has the following run levels:
0--System halted
S--Single-User mode, booted to system console only, with only root filesystem mounted (as read-only)
s--Single-User mode, identical to S except the current terminal acts as the system console
1--Single-User mode with local filesystems mounted (read-write)
2--Multi-User mode with most daemons started and Common Desktop Environment launched
3--Identical to runlevel 2 with NFS exported
4--Multi-User mode with VUE started instead of CDE
5, 6--Not used/User-definable
Rgds-Kranti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-07-2009 09:46 PM
тАО11-07-2009 09:46 PM
Re: how to view the current runlevel in hp-ux
Again I suggest you read all the replies so you know that "who -r" is broken and doesn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-08-2009 01:13 AM
тАО11-08-2009 01:13 AM
Re: how to view the current runlevel in hp-ux
if the stop start scripts are used you can check the /etc/rc.log and the old log.
the last entery is the last this that is stopped/started.
don't worry about the run level, yust see what processes/deamons are running...
why:
if you stop everyting till run level 2, it will not look the same as you start everyting untill level 2, why, yous stop scrips will not stop everyting...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-08-2009 03:54 AM
тАО11-08-2009 03:54 AM
Re: how to view the current runlevel in hp-ux
So do you mean, who -r is not a guaranteed command to know, it is not dynamic response , because it just read from file and if it files is not guaranteed situation when it read.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-08-2009 04:01 AM
тАО11-08-2009 04:01 AM
Re: how to view the current runlevel in hp-ux
See links above. It reads it from utmp(4) and that only has a value if 3 or larger. It may have smaller values if you use init(1m) to reduce the run level.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-08-2009 11:47 PM
тАО11-08-2009 11:47 PM
Re: how to view the current runlevel in hp-ux
bash-4.0# getrunlvl
New_level 3 Old_level S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2009 02:11 AM
тАО11-09-2009 02:11 AM
Re: how to view the current runlevel in hp-ux
Check this link out for getrunlvl ,you can see what Dennis exactly want to say;
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=217851&admit=109447626+1257761270117+28353475
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2009 03:12 AM
тАО11-09-2009 03:12 AM
Re: how to view the current runlevel in hp-ux
> Does anyone READ what has already been posted? Endlessly repeating the same answer adds NOTHING!
They must read it, Jim. These morons wouldn't know the answer otherwise!
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2009 05:03 AM
тАО11-09-2009 05:03 AM
Re: how to view the current runlevel in hp-ux
> Does anyone READ what has already been posted? Endlessly repeating the same answer adds NOTHING!
That is the reasion I told to Senthil please close the thread once he got the correct answer.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-16-2010 01:23 AM
тАО03-16-2010 01:23 AM