- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: who -r command echoes no data, just prompt
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
Forums
Discussions
Discussions
Discussions
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
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
02-11-2002 09:24 AM
02-11-2002 09:24 AM
who -r command echoes no data, just prompt
When I type in who -r it doesn't tell me the run level, just returns with the prompt.
Any help/insite would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 09:28 AM
02-11-2002 09:28 AM
Re: who -r command echoes no data, just prompt
Is your system running? Just kidding. How about the output of any other command, like just regular who??
Also, have you checked the patches?
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 09:32 AM
02-11-2002 09:32 AM
Re: who -r command echoes no data, just prompt
The problem could be with your /etc/utmp file. Do a init 3 and then run the who command once again and try,
init 3
who -r
Hope this helps.
regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 09:34 AM
02-11-2002 09:34 AM
Re: who -r command echoes no data, just prompt
# rm ./-r
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 09:42 AM
02-11-2002 09:42 AM
Re: who -r command echoes no data, just prompt
another possible solution would be an alias set to the "who -r"- command which delivers this silly output. You can find out by the command "alias" which shows a list of all defined aliases. Or is your computer running Linux, then the command would be "runlevel"...
:-)
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 09:43 AM
02-11-2002 09:43 AM
Re: who -r command echoes no data, just prompt
Try entering who -r, and when you get the prompt back enter
"echo $?". This gives you back the return code for the last command.
If it returns "0", the who command was successful.
Anything else (1,127,etc.) is a failure, not found, and so on.
Check /usr/bin/who for permissions as well, but that's a stab in the dark....
HTH
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 09:58 AM
02-11-2002 09:58 AM
Re: who -r command echoes no data, just prompt
autoload='typeset -fu'
command='command '
functions='typeset -f'
grep=/usr/bin/grep
history='fc -l'
integer='typeset -i'
local=typeset
ls=/usr/bin/ls
nohup='nohup '
r='fc -e -'
stop='kill -STOP'
suspend='kill -STOP $$'
type='whence -v'
who=/usr/bin/who
Here is the output of my alias command. I'm wondering about the r= 'fc -e -'(I don't know what it means)
Also, what's the result of running init 3 on a production server running several Oracle databases. Will it affect anything?
who -r is the only command that doesn't work. ie, who -R, who works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 10:16 AM
02-11-2002 10:16 AM
Re: who -r command echoes no data, just prompt
does the file /tmp/utmp exist on your system? what about /var/adm/wtmp? the info show in who -r is stored in one of these files, and if it is missing, then there is nothing to display.
HTH
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 10:17 AM
02-11-2002 10:17 AM
Re: who -r command echoes no data, just prompt
"fc -e" trys to open your history file and shows you the contents. So you don't have to wonder about that. In the file /etc/inittab there is an entry ( normally the first line ) with the "initdefault", which is by default "3". This field is read by init to find out the default runlevel. The system runs up to the defined runlevel. Normally Oracle databases are started also in runlevel 3. You can find out this by having a look into the /sbin/rc3.d- directory with ls -l. The output shows you some links of start- and stop- scripts. If any changes for oracle databases are made, you should see a script, beginning with S (startscript) or K (killscript), a pass number after that and the name of the service to be started or stopped. So you can find out what will be happen!
One more thing you could try is to copy a who- command from another computer (same HP-UX-version! ) to your computer and try it again.
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 10:40 AM
02-11-2002 10:40 AM
Re: who -r command echoes no data, just prompt
Also, looked at /var/adm/utmp and on the second line it has run-level 4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 11:11 AM
02-11-2002 11:11 AM
Re: who -r command echoes no data, just prompt
runlevel 4 was a previous runlevel for systems who worked with HP VUE. At the time now the runlevel 4 is no longer defined in a HP-UX system. You could take a look into the rc4.d- directory for the start- and stop-scripts if your oracle- databases are posted there. If not, you should be able to run a init 3 without any danger. Please post here, if your command shows the normal output then. If not, the /var/adm/wtmp and utmp-file seem to be corrupted.
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 11:23 AM
02-11-2002 11:23 AM
Re: who -r command echoes no data, just prompt
I am still looking into these /var/adm/wtmp and /etc/utmp files. Is there an easy way to re-create them without doing any harm to the system?
Thank you ALL for your time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 11:39 AM
02-11-2002 11:39 AM
Re: who -r command echoes no data, just prompt
Check this out, it will defenitely help you:
http://us-support2.external.hp.com/cki/bin/doc.pl/sid=0a60f5301749b6fd0b/screen=ckiDisplayDocument?docId=200000058669431
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 11:48 AM
02-11-2002 11:48 AM
Re: who -r command echoes no data, just prompt
it seems like there is a solution to repair the files:
i found two commands which you can use-
/usr/sbin/acct/fwtmp ( -ic )
/usr/sbin/acct/wtmpfix ( files )
the first command translates the entrys to ASCII which makes it easier to find errors. The second one is able to translate ASCII input into binary output. Please read the manpages for those commands. If this doesn't help you should pray you have a support contract, because in ITO there exists also a tool to repair these files. You should do a call then...
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 11:54 AM
02-11-2002 11:54 AM
Re: who -r command echoes no data, just prompt
i forgot to tell you to read the manpage for utmp/wtmp to understand the entries in those files. A friend of mine just told me, that the previously mentioned ITO- command would be the best way...
Allways stay on the bright side of life!
Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2002 12:13 PM
02-11-2002 12:13 PM
Re: who -r command echoes no data, just prompt
I'm not familiar with ITO command?
Will look into man pages for fwtmp and wtmpfix.
Thanks. :)