Operating System - HP-UX
1833780 Members
2384 Online
110063 Solutions
New Discussion

Trimming system log files..etc - 11.31

 
Tom Haddad
Super Advisor

Trimming system log files..etc - 11.31

For 11.31 system (and SMH) how can I now trim log files?
I have a majority of 11.23 hosts and use SAM (routine tasks). What is available via SMH????
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: Trimming system log files..etc - 11.31

Hi Tom:

The easist way is to do:

# cp -p logfile logfile.old
# cat /dev/null > logfile

This insures that any process currently writing to 'logfile' continues to write to it after it is truncated.

Regards!

...JRF...
Suraj K Sankari
Honored Contributor

Re: Trimming system log files..etc - 11.31

Hi,

Max SA are used to do ">log file name"

Suraj
VK2COT
Honored Contributor

Re: Trimming system log files..etc - 11.31

Hello,

Last year I wrote a presentation on "Comparison of Unix log file management tools".
I discussed AIX, HP-UX, Linux, and Solaris.

There are many log files iN HP-UX. Some of them
can be tripped automatically (various configs
exist, take a look in my presentation). Some
of them you have to manage yourself...

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Steven E. Protter
Exalted Contributor

Re: Trimming system log files..etc - 11.31

Shalom,

The sam piece that trimmed logs is still buried in smh, which defaults to sam componenents for stuff not yet re-done in smh.

I don't like it though.

I prefer to port logroate into HP-UX systems or go with a periodic > logfilename

script in cron

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
Tom Haddad
Super Advisor

Re: Trimming system log files..etc - 11.31

I used the >filename to trim for now. thanks