cancel
Showing results for 
Search instead for 
Did you mean: 

HPUX slow login

SOLVED
Go to solution
TalH
Advisor

HPUX slow login

Hi,

I have HPUX 11.31 on IA64 that during login (with any user, simple or root, local or NIS) after I type the password and press enter it takes more than 2 minutes to get command prompt.

Any idea what can cause it and how can I solve it?

 

Thanks,

Tal

20 REPLIES
Dennis Handly
Acclaimed Contributor

Re: HP-UX slow login

How busy is your system?

TalH
Advisor

Re: HP-UX slow login

0.01% cpu load... the system is not doing anything.

 

Dennis Handly
Acclaimed Contributor

Re: HP-UX slow login

Can you check to see if nslookup on that machine can find itself?

Steven Schweda
Honored Contributor

Re: HP-UX slow login

 
pradeep m
Respected Contributor

Re: HPUX slow login

Check the  /etc/nsswitch.conf file for the password entry. Make sure if you have the correct entry specified for "passwd" as per your server configuration

 

Example:

# cat /etc/nsswitch.conf
#
passwd: files --> in this case password use files for resolving
group: files
hosts:  dns files
ipnodes:  files
services:  files

Regards,
Pradeep

I am an HP Employee
A quick resolution to technical issues for your HP Enterprise products is just a click away HP Support Center Knowledge-base
See Self Help Post for more details


TalH
Advisor

Re: HPUX slow login

When I run nslookup I get the correct results for forward & reverse lookup.

The "/etc/nsswitch.conf" file is configured correctly same as on other servers on our network.

pradeep m
Respected Contributor

Re: HPUX slow login

How do you login to the server? SSH or telnet.

Do you face the slow login issue in both telnet and ssh??

Regards,
Pradeep

I am an HP Employee
A quick resolution to technical issues for your HP Enterprise products is just a click away HP Support Center Knowledge-base
See Self Help Post for more details


Steven Schweda
Honored Contributor

Re: HPUX slow login

 
TalH
Advisor

Re: HPUX slow login

I use ssh, with telnet the response time is fine and I get the command prompt without delay.

 

Solution

Re: HPUX slow login

I think you asked same in another thread too .

check the size of /var/adm/wtmp and btmp .

big size of these files sometimes makes ssh slow .



Sachin Rajput
===============


Sachin Rajput
================
TalH
Advisor

Re: HPUX slow login

Thanks! that was it!

Re: HPUX slow login

ThAnks without Kudos ??????

How to assign points? Click the KUDOS! star! .....


Sachin Rajput
================
TalH
Advisor

Re: HPUX slow login

Sorry, i'm a bit new to this system... 

 

HPUX-newbie
Occasional Advisor

Re: HPUX slow login


Sachin - I found that I needed to delete wtmps and btmps, as they were the HUGE files.  Now the bigger question...  How the heck do I keep these files from getting that large in the first place?  Do you know if there is a configuration somewhere that can prevent them growing out of control?

Might be a stupid question, but I am VERY new to HP-UX !

Thanks much!
Sachin Rajput wrote:
I think you asked same in another thread too .

check the size of /var/adm/wtmp and btmp .

big size of these files sometimes makes ssh slow .



Sachin Rajput
===============

 

Dennis Handly
Acclaimed Contributor

Re: HP-UX slow login (wtmps)

>How the heck do I keep these files from getting that large in the first place?  Do you know if there is a configuration somewhere that can prevent them growing out of control?

 

These files grow based on logins.  I doubt you want to restrict those.  ;-)

You need to archive these files elsewhere and reset the EOF when they grow big.

I.e. you need to create a crontab script to do this.  Or tell you to do it manually.

HPUX-newbie
Occasional Advisor

Re: HP-UX slow login (wtmps)


Dennis Handly wrote:

>How the heck do I keep these files from getting that large in the first place?  Do you know if there is a configuration somewhere that can prevent them growing out of control?

 

These files grow based on logins.  I doubt you want to restrict those.  ;-)

You need to archive these files elsewhere and reset the EOF when they grow big.

I.e. you need to create a crontab script to do this.  Or tell you to do it manually.

 

Actually, I could care less.  This is a test system in my Lab.  If I can simplify the management of this thing, so much the better.  Having to learn HP-UX on the fly has been interesting to say the least.  If you have any suggestions how to stop/limit the size, awesome!  The interesting thing as mentioned previously was that it was files with an "s" on the end that were large.  Not the primary files.  How did they get an "s"?  I suppose if this happens automatically (once weekly, etc...), I could probably learn how to create a CRON task on HP-UX.

Thanks!!!


 

Dennis Handly
Acclaimed Contributor

Re: HP-UX slow login (wtmps)

>This is a test system in my Lab.  If you have any suggestions how to stop/limit the size

 

You can only reset it.  Or turn it off altogether.

 

>The interesting thing as mentioned previously was that it was files with an "s" on the end that were large.  Not the primary files.

 

You have backwards.  The *s files are the main ones.  The vanilla ones are vestigial.  And I don't think the *x ones are used much either.

 

>I suppose if this happens automatically (once weekly, etc...), I could probably learn how to create a CRON task on HP-UX.

 

It's pretty simple, in a file have:

00 00 01 * * path-to-script script parms

 

(Or add to an existing crontab.)

 

This says run the script path-to-script once a month on the first.

 

And in your script:

#!/usr/bin/sh

# Reset EOF of wtmps, see crontab entry

> /var/adm/wtmps

HPUX-newbie
Occasional Advisor

Re: HP-UX slow login (wtmps)


Dennis Handly wrote:

 

It's pretty simple, in a file have:

00 00 01 * * path-to-script script parms

 

(Or add to an existing crontab.)

 

This says run the script path-to-script once a month on the first.

 

And in your script:

#!/usr/bin/sh

# Reset EOF of wtmps, see crontab entry

> /var/adm/wtmps


Whoops!!!  I deleted those files thinking they were archive.  :-)  If I want to completely disable, how does one do that?  The other thing I'm worried about with CRON jobs is that I have multiple OS'es per system.  In other words, I have a RISC and an IA-64 system with 11 v1, v2, and v3, on different drives for testing.  A CRON job could cause problems when a not loaded version needs to run it.

 

Honestly, I think it'd be best to shut it off unless it will have an adverse effect on the server.


Thanks for the guidance/advice!!!

Dennis Handly
Acclaimed Contributor

Re: HP-UX slow login (wtmps)

>If I want to completely disable, how does one do that?

 

See wtmps(4):

Note that wtmps and btmps tend to grow without bound, and should be checked regularly. ... if these files are
removed, login record-keeping is turned off.

 

(I wouldn't remove btmps(4), since it maintains a record of bad logins.  And hopefully small.)

 

>The other thing I'm worried about with CRON jobs is that I have multiple OS'es per system.  In other words, I have a RISC and an IA-64 system with 11 v1, v2, and v3, on different drives for testing.

 

crontab files go with the root disk so can't have multiple OS versions.  But you will have to stop yourself from executing crontab on that file if you are on the wrong system.  You of course can add a check in the script to ignore the resetting of the EOF if not on the "right" system.

 

>I think it'd be best to shut it off unless it will have an adverse effect on the server.

 

Of you don't need to worry about accounting, security or use last(1) for triage or forensic purposes, you don't need it.

Steven E. Protter
Exalted Contributor

Re: HPUX slow login

Another possible cause is slow hostname resolution.

 

If /etc/nsswitch.conf does host resolution files first, having an entry for the local ip address in /etc/hosts can significantly increase speed of login.

 

/etc/hosts

 

...

 

ip address    hostname hostname.fdqn

 

Regards,

 

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com