- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- `who -b ` does not produce any information
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
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
10-03-2008 08:08 AM
10-03-2008 08:08 AM
`who -b ` does not produce any information
Has anybody seen this, before. Is there a patch or something which is need to fix this? I run the who -b command and it comes back to the prompt without any results. More detals pasted below:
# who -b
# uptime
12:04pm up 138 days, 19:56, 6 users, load average: 0.19, 0.18, 0.18
# uname -a
HP-UX newhostit B.11.11 U 9000/800 1611884041 unlimited-user license
# ls -lrt /etc/ut*
-rw-r--r-- 1 root root 660 Oct 3 12:05 /etc/utmp
-rw-r--r-- 1 root root 1540 Oct 3 12:05 /etc/utmpx
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2008 08:24 AM
10-03-2008 08:24 AM
Re: `who -b ` does not produce any information
If you do not have the last ( latest ) bundle then it should be put on as it may just be the last.
Problem may just go away.
Are you at anything close to current ?
The latest is June '08.
swlist -l bundle|grep GOLDBASE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2008 08:25 AM
10-03-2008 08:25 AM
Re: `who -b ` does not produce any information
Does the last command work ?
How about who -a ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2008 08:31 AM
10-03-2008 08:31 AM
Re: `who -b ` does not produce any information
Is here a way to find out if my /etc/utmp and /var/adm/wtmp are corrupt?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2008 08:43 AM
10-03-2008 08:43 AM
Re: `who -b ` does not produce any information
Where are you at with a patch bundle rev ?
or better yet.
# what /usr/bin/who
/usr/bin/who:
$Revision: B.11.11_LR
Fri Oct 27 00:32:29 PDT 2000 $
Looks like the who command has not changed in quite awhile. So probably not a patch issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2008 08:50 AM
10-03-2008 08:50 AM
Re: `who -b ` does not produce any information
A minor point but I would tend to disagree with your characterization that "11.11 is getting close to desupport". End of support is still 4 years and 2 months away:
http://www.hp.com/softwarereleases/releases-media2/history/slide2.html
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2008 09:13 AM
10-03-2008 09:13 AM
Re: `who -b ` does not produce any information
emptying the files will not corrupt them, merely make the previous information unavailable, although if users are logged in at the time, they may get some ugly messages when they log out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2008 01:52 PM
10-03-2008 01:52 PM
Re: `who -b ` does not produce any information
Right. "last reboot" should also show the last reboot time, if the data is in wtmp.
Are all of the /var/adm/wtmp* files emptied?
Otherwise you can use last with -x and/or -f to select the others.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2008 08:30 PM
10-05-2008 08:30 PM
Re: `who -b ` does not produce any information
Thanks
SKR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2008 02:07 AM
10-06-2008 02:07 AM
Re: `who -b ` does not produce any information
ressnxp2(nm93572):/home/nm93572:$ last reboot | head -10
reboot system boot Sat May 17 16:10 still logged in
reboot system boot Sat May 17 15:23 - 16:10 (00:46)
reboot system boot Thu Nov 15 00:08 - 15:23 (184+14:15)
reboot system boot Mon Mar 19 15:15 - 00:08 (240+09:52)
reboot system boot Mon Mar 19 13:04 - 15:15 (02:11)
reboot system boot Mon Mar 19 12:13 - 13:04 (00:50)
reboot system boot Mon Mar 19 05:19 - 12:13 (06:53)
reboot system boot Sun Jun 11 02:09 - 05:19 (281+03:10)
reboot system boot Sun Jun 11 01:38 - 02:09 (00:30)
reboot system boot Sun Jun 11 00:13 - 01:38 (01:24)
ressnxp2(nm93572):/home/nm93572:$ who -b
ressnxp2(nm93572):/home/nm93572:$
-Kennedy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2008 02:54 AM
10-06-2008 02:54 AM
Re: `who -b ` does not produce any information
who -b /var/adm/wtmp
Thanks
SKR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2008 03:36 AM
10-06-2008 03:36 AM
Re: `who -b ` does not produce any information
root:/:# who -b /var/adm/wtmp | head -10
. system boot Aug 24 11:47
. system boot Aug 25 17:47
. system boot Aug 27 14:24
. system boot Aug 27 15:54
. system boot Aug 27 16:31
. system boot Aug 27 16:42
. system boot Aug 30 13:18
. system boot Aug 30 15:58
. system boot Aug 30 18:26
. system boot Aug 31 12:43
root:/:#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2008 04:57 AM
10-06-2008 04:57 AM
Re: `who -b ` does not produce any information
Ok, this data source is working.
>who -b /var/adm/wtmp | head -10
And this data source. (You really need tail -10.)
What is your real problem?
It appears that out of utmp/utmpx, utmpd, wtmp* some of those files have been truncated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2008 05:02 AM
10-06-2008 05:02 AM
Re: `who -b ` does not produce any information
My DBA Teams have "who -b" embedded in many of their automated scripts. Since it is not working now, all their scripts trigger off unwanted alerts. I know, if I reboot his server it may start working again without any issues. I just need to know if I can avoid a reboot. I also want to ensure that this is not any patch related issue which can be resolved without a reboot. (And you are correct, I should have done a tail -10 instead of head -10).
-Kennedy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2008 05:43 AM
10-06-2008 05:43 AM
Re: `who -b ` does not produce any information
Ah, the real problem.
>if I reboot his server it may start working again without any issues. I just need to know if I can avoid a reboot.
The first thing to do would be to figure out where "who -b" is getting its data. You could use tusc to figure this out. This would be helpful so you know what not to do next time, truncate file?
Then you have several choices:
1) Reboot
2) Live with it until you until the other choices fix it.
3) Change the scripts to use "uptime" or "who -b /var/adm/wtmp" if "who -b" fails. Or just have it read the info from some manually created file in /etc/.
4) Write a program to fiddle with the data source.
Obviously 1) is pretty simple. 3) would be next.
>I also want to ensure that this is not any patch related issue which can be resolved without a reboot.
I seriously doubt that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2008 10:16 PM
10-06-2008 10:16 PM
Re: `who -b ` does not produce any information
I used tusc and on 11.11 it seems that "who -b" (and so does uptime) opens /etc/utmp directly and reads it. So if this file has been truncated, you lost that info. I have no idea how uptime can give you some info?
We haven't asked you to do:
last -f /etc/utmp reboot
Using who -b /var/adm/wtmp would give info for users that aren't still logged on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2008 05:12 AM
10-07-2008 05:12 AM
Re: `who -b ` does not produce any information
To fix who -b issue:
Perform as root:
1) Create the ASCII version of utmp
# /usr/sbin/acct/fwtmp < /etc/utmp > /etc/utmp.ASCII
2) Edit the ASCII version
# vi /etc/utmp.ASCII
search for the system boot line (which probably isn't there) so add it!
duplicate the run-level line for the system boot line
ie. copy
run-level 3 0 1 0063 0123 850661195 Dec 15 08:46:35 1996
to look like
system boot 0 2 0000 0000 850661195 Dec 15 08:46:35 1996
3) Convert the ASCII back to BINARY
# /usr/sbin/acct/fwtmp -ic < /etc/utmp.ASCII > /etc/utmp.BIN
4) Save the original
# cp /etc/utmp /etc/utmp.SAVE
5) Make the new file active
# cp /etc/utmp.BIN /etc/utmp
6) Verify dates and who command
# who -b
I got this solution by opening up a ticket with the response center. I didnt find this solution when I searched at ITRC though.
Regards,
-Kennedy