- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- hp-ux 10.20 wtmp & btmp
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
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
11-05-2001 11:37 PM
11-05-2001 11:37 PM
hp-ux 10.20 wtmp & btmp
I'd like to know, how to handle those two files. I have so huge wtmp file, that lastb -command is not working. Causes core if I try.
How to cut the size and then limit also?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 12:04 AM
11-06-2001 12:04 AM
Re: hp-ux 10.20 wtmp & btmp
#> wtmp
#>btmp
Regards
Animesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 12:06 AM
11-06-2001 12:06 AM
Re: hp-ux 10.20 wtmp & btmp
do not use rm to remove the file.Make it null by
# cat /dev/null > /var/adm/wtmp
to make the file null.
to look into the contents and change the binary to ASCII.
# /usr/sbin/acct/fwtmp < /var/adm/wtmp > /tmp/wtmp
Again to change the file to binary
# /usr/sbin/acct/fwtmp -ic < /tmp/wtmp > /var/adm/wtmp
Thanks
G Manikandan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 12:12 AM
11-06-2001 12:12 AM
Re: hp-ux 10.20 wtmp & btmp
You could trim your wtmp file using something like:
fwtmp < /var/adm/wtmp | tail -100 > /tmp/wtmp.new
fwtmp -ic < /tmp/wtmp.new > /var/adm/wtmp
or else zero it with:
cp /dev/null /var/adm/wtmp
Do not remove it, because it won't be created automatically.
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 12:21 AM
11-06-2001 12:21 AM
Re: hp-ux 10.20 wtmp & btmp
as correctly stated, use
> logfile
and not
rm logfile
touch logfile
since the permissions will be set incorrectly.
You can also do this using SAM. Go to Routine tasks, and System log files. From here you can zero or trim any logfile you want.
HTH,
Vince
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 12:27 AM
11-06-2001 12:27 AM
Re: hp-ux 10.20 wtmp & btmp
The command last(1) dumps core if the wtmp file is corrupted.
1. The wtmp file can be viewed with the following command:
# cat /var/adm/wtmp | /usr/sbin/acct/fwtmp | more
2. If the wtmp file is scrutinized as part of normal system
administrator procedures, consider using wtmpfix(1M) in an effort to
repair the file.
NOTE: See the man page wtmpfix(1M).
# /usr/sbin/acct/wtmpfix wtmp.old > wtmp.old.fix
3. Examine the contents of the new wtmp.old.fix.
# cat /var/adm/wtmp.old.fix | /usr/sbin/acct/fwtmp | more
4. If examining the file does not return an error, move the current wtmp to a
new name and replace it with the fixed version.
# mv /var/adm/wtmp /var/adm/wtmp.old
# mv /var/adm/wtmp.old.fix /var/adm/wtmp
5. If examining the file results in an error, clear the contents of wtmp:
# > /var/adm/wtmp
Regards
Animesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 03:37 AM
11-06-2001 03:37 AM
Re: hp-ux 10.20 wtmp & btmp
thanks a lot, I did not succeed fix the wtmp file but instead managed to empty it. And now commands #last will works fine! And dir /var was almost full, thanks for help.
Regards, Sami