System Administration

Re: HP-UX slow login (wtmps)

 
SOLVED
Go to solution
Sachin Rajput
Advisor
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!
Sachin Rajput
Advisor

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.