Operating System - HP-UX
1821983 Members
3352 Online
109638 Solutions
New Discussion юеВ

remove syslog.log and xferlog

 
SOLVED
Go to solution
Emma_8
Frequent Advisor

remove syslog.log and xferlog

My /var fileystem is almost full on an n4000 and the syslog.log & xferlog are >100mb - how can I safely remove these files ?

Thanks :)
emma
4 REPLIES 4
Steven E. Protter
Exalted Contributor
Solution

Re: remove syslog.log and xferlog

I have a script that does the following once a week:

# always nice to have a copy
cp /var/adm/syslog/syslog.log /tmp
> /var/adm/syslog/syslog.log

That starts it fresh at zero bytes.

Sam routine tasks can trim log files for you as well.

So don't remove them, they need to be there. Note that my /tmp filesystem is cleared daily by a cron script. I just like having the thing there for a few days before it disappears, case I need to look at it.

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
Deoncia Grayson_1
Honored Contributor

Re: remove syslog.log and xferlog

You shouldn't remove these files but you can trim those files, through sam by selecting routine tasks, select system log files, highlight syslog and tab to action and trim this file, but you might want to read through and make sure its not logging excessive errors.

If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Emma_8
Frequent Advisor

Re: remove syslog.log and xferlog

Hi folks

Thanks for both your responses. I used in the trim thro sam this time and in future I will setup the recommended 'script' in cron.

Thanks again
Emma
Todd McDaniel_1
Honored Contributor

Re: remove syslog.log and xferlog

If your /var is full usually syslog isnt the culprit. If syslog would only be filling it up if you have some hardware issue...

If you havent yet, I would run cleanup which will help you greatly...


#cleanup -p -c 2

This will show in preview mode what patches are superceeded 2x... then remove the -p and run it and say yes to the prompt.

You can safely committ patches that have been superceeded 2x... this will remove any patches 2x or 3x or more superceeded.




As a side note, if you ever need to remove them in the future...(most likely never) restore from backup and then swremove.
Unix, the other white meat.