- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HP-UX 11V3 Itanium and PARISC last -f /var/adm/wtm...
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
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
тАО01-07-2010 05:11 AM
тАО01-07-2010 05:11 AM
MY hosts seem to be corrupting the /var/adm/wtmp and wtmps files.
I get the following issue
hptest1131:/var/adm#last -f /var/adm/wtmp
zaopsman pts/3 Thu Jan 1 02:00 still logged in
pid exceeds MAXPID: wtmp file corrupted
hptest1131:/var/adm#last -f /var/adm/wtmps
reboot Thu Jan 1 02:00 still logged in
pid exceeds MAXPID: wtmp file corrupted
I have tried all the standard fixes
(after making backup copies of the files of course)
/sbin/init.d/utmpd stop
> /var/adm/wtmp
> /var/adm/wtmps
> /var/adm/btmp
> /var/adm/btmps
then touch the files again.
/sbin/init.d/utmpd
the first couple of times that I do a last -f /var/adm/wtmps it is fine.
After a minute or so the files show as corrupt again .
However to confuse the issue the last command without the -f switch shows the correct data with no mention of corruption.
I then tried some more desperate measures.
/sbin/init.d/utmpd stop
> /var/adm/wtmp
> /var/adm/wtmps
> /var/adm/btmp
> /var/adm/btmps
> /var/adm/wtmpx
rm /etc/utmp /etc/utmps /etc/utmpx
touch /etc/utmp /etc/utmps /etc/utmpx
/sbin/init.d/utmpd start
same behaviour , fine for a minute or two , then the file shows as corrupt.
the same behaviour results if you issue the last-f command against a copy of the file.
If I do a fuser against the copied file nothing as it open.
I have also searched for patches for this issue , I could see none that applied.
Any suggestions would be appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2010 05:47 AM
тАО01-07-2010 05:47 AM
Re: HP-UX 11V3 Itanium and PARISC last -f /var/adm/wtmps fails
Any guesses as to why this might be happening? What is MAXPID set to?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2010 06:00 AM
тАО01-07-2010 06:00 AM
Re: HP-UX 11V3 Itanium and PARISC last -f /var/adm/wtmps fails
Have a look at this thread.
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1003618
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2010 06:06 AM
тАО01-07-2010 06:06 AM
Re: HP-UX 11V3 Itanium and PARISC last -f /var/adm/wtmps fails
hptest1131:/var/adm#kctune kctune process_id_max
Tunable Value Expression Changes
process_id_max 30000 Default Auto
hptest1131:/var/adm#kctune process_id_min
Tunable Value Expression Changes
process_id_min 0 Default Auto
hptest1131:/var/adm#kctune nproc
Tunable Value Expression Changes
nproc 30000 30000 Immed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2010 06:14 AM
тАО01-07-2010 06:14 AM
Re: HP-UX 11V3 Itanium and PARISC last -f /var/adm/wtmps fails
the files appear to be corrupt , as most of the entries have a date of Jan 1 1970
username 0 0 0000 0000 0 Jan 1 02:00:00 1970
fwtmpfix , on a system with a large enough /tmp , breaks halfway through.
Even if I wipe all the files and start from scratch , as per the entry above , the new file is corrupted within a minute.
this is happening on 4 seperate hosts all running the same OS revision.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2010 06:19 AM
тАО01-07-2010 06:19 AM
Re: HP-UX 11V3 Itanium and PARISC last -f /var/adm/wtmps fails
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2010 06:22 AM
тАО01-07-2010 06:22 AM
Re: HP-UX 11V3 Itanium and PARISC last -f /var/adm/wtmps fails
The issue would not be visible until you tried to access a old wtmps file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-07-2010 06:35 AM
тАО01-07-2010 06:35 AM
Re: HP-UX 11V3 Itanium and PARISC last -f /var/adm/wtmps fails
/usr/sbin/acct/wtmpfix /STATIC/wtmpfiles/wtmps > wtmps.fixed
Unable to write record to output file. Exiting ...
ll wtmps.fixed
-rw-r----- 1 root sys 371714980 Jan 7 16:18 wtmps.fixed
last -f STATIC/wtmpfiles
pid exceeds MAXPID: wtmp file corrupted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-08-2010 01:30 AM
тАО01-08-2010 01:30 AM
Re: HP-UX 11V3 Itanium and PARISC last -f /var/adm/wtmps fails
This should work but typically this file only has "system boot" in it.
>last command without the -f switch
There are three types of wtmp files.
last(1) looks at wtmps. With -f it looks at wtmp. And with -X wtmps.
If you don't have the right options, the file will look corrupt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-08-2010 02:45 AM
тАО01-08-2010 02:45 AM
Re: HP-UX 11V3 Itanium and PARISC last -f /var/adm/wtmps fails
The -X option does not report corruption , but it also gives no data back.
last -X /var/adm/wtmps
WTMPS_FILE begins at Sat Jan 12 22:27:43
when combined with -f it comes back with invalid record size.
last -f /SCRATCH/wtmpfx/wtmp -X /SCRATCH/wtmpfx/wtmps
Invalid record size. Unable to continue ...
However If I replace the existing wtmps file with the restored one the last command reports on all the data as expected.
That will suffice , as i can then restore the file to a test system, get the data , and remove the old one once I have the data required.