1847672 Members
3885 Online
110265 Solutions
New Discussion

LOG FILES

 
SOLVED
Go to solution
augusto cossa
Frequent Advisor

LOG FILES

Hi,
NEW AS SYS ADM

WICH LOG FILES SHOULD I TRIM OR DELETE? HOW TO NOW WHEN THEY ARE BIG
5 REPLIES 5
Andreas Voss
Honored Contributor

Re: LOG FILES

Hi

here some log files (HP-UX 10.x/11.x) to look frequently:
/var/adm/syslog/syslog.log
/var/adm/syslog/mail.log

Also the history of login is recorded in:
/var/adm/wtmp
Trimming this file is a little bit complex.
If you delete the file you have no login history but it would be automatically recreated after the next login.

Regards

Andrew
Worapoj P.
Regular Advisor

Re: LOG FILES

Hi,

I assume your O.S is 10.2 or 11.x, you can trim or clear big log files by easy way use SAM as following.
SAM->Routine Tasks->System Log Files
select log files then take action (trim to zero,trim to recommend size , etc)

by the way you can change recomment size of log files.

Regards,
Worapoj.P
For LOVE For Honor For Mankind
Patrick Wessel
Honored Contributor

Re: LOG FILES

If you run the online diagnostics (STM) on the system, you will find logfiles in:
/var/stm/logs/os
keep an eye on them. If they are growing it indicates a hardware problem
There is no good troubleshooting with bad data
CHRIS_ANORUO
Honored Contributor
Solution

Re: LOG FILES

From Sam routine tasks, you will know the actually size of the log file.
you can trim /var/adm/wtmp or btmp to zero and any othe log files with this command
cat /dev/null > /var/adm/wtmp.
Check the in /var/preserve for the fbackup log files. Check /var/spool/lp/request/printername.
You can also put this line in your cron file:
30 23 1-7 5,12 * cat /dev/null > /varadm/wtmp

man cron for help
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
CHRIS_ANORUO
Honored Contributor

Re: LOG FILES

In /etc/rc.config.d you can also set clean_adm and clean_uucp to 1 in file clean. Also you can set to 1 clean_tmp to 1 in file clean_tmps.
This will enable the log files, uucp spool files and temperarily files to be removed at system boot from their locations
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.