Slow HP-UX Logins

By | September 7, 2013

A while ago we were experiencing an odd issue on one of our HP-UX nodes. Users who logged in via ssh were having extremely slow login times. We run a two node cluster and only one was affected so we weren’t quite sure what to look for. Oddly users who logged in via telnet did not seem to be affected. A few calls around and we were able to diagnose that the wtmps file was huge (didn’t record how large exactly). Every time a user logs in ssh parses the wtmps file to check for your last login. Obviously the bigger the file the longer it takes to log in.

The fix is to reduce the size of the file. You don’t want to delete this file as it will cause problems in the future. But here is the quick emergency fix:

cd /var/adm
cp wtmps wtmps.bak
cp /dev/null /var/adm/wtmps

For a more permanent fix you can create a custom crontab entry (what we did). But there seems to be a lot of people suggesting logrotate as a way to manage all of your system logs on HP-UX. You may wish to give that a look.

MWguy

2 thoughts on “Slow HP-UX Logins

  1. Ruby

    It’s hard to find your posts in google. I found it
    on 21 spot, you should build quality backlinks , it will help you to rank to google top 10.
    I know how to help you, just type in google – k2 seo tricks

    Reply
    1. MWguy Post author

      Javier,

      I’m not particularly interested in increasing SEO. If someone else has a better guide on how to do a particular thing I’d rather that result be the number one hit.

      MWGUY

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *