Operating System - HP-UX
1833159 Members
2989 Online
110051 Solutions
New Discussion

Re: Trying to find logrotate

 
SOLVED
Go to solution
Peter Gillis
Super Advisor

Trying to find logrotate

Hi, HPUX11i v1 rp2470
want to tryout a product called Logrotate. It was suggested I may find it in the HP Poprting and Archive centre, but I am having problems with this. CAn anyone point me to the centre or the product?

thanks
Maria
10 REPLIES 10
Ivan Ferreira
Honored Contributor

Re: Trying to find logrotate

IS this what you are looking for?:

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Peter Gillis
Super Advisor

Re: Trying to find logrotate

Thanks Ivan...it is what looking for. Although this version is 2.5 and appears to be for ux 11.00. Do you know of a version for ux 11.11?

thanks
Maria
Ivan Krastev
Honored Contributor

Re: Trying to find logrotate

Hi Maria,

here is attached script to rotate system log files. This script is from previous post here and it is for 11.11 .


regards,
ivan
Peter Gillis
Super Advisor

Re: Trying to find logrotate

Ivan
thanks for your replies. I am unable to open attachment. Have tried searching for logrotate in the forum/ tech knowledge db havenet seen anything yet that may be what you have tried sending in attachment. Is there another way to view the doc?
appreciate your time with this.
Maria
Geoff Wild
Honored Contributor
Solution

Re: Trying to find logrotate

The logrotate for 11.0 should work on 11.11

http://hpux.ee.ualberta.ca/hppd/hpux/Sysadmin/logrotate-2.5/

I know, I have used it.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Peter Gillis
Super Advisor

Re: Trying to find logrotate

thanks Geoff. I have downloaded pkage, and will attempt install. Did you find the software easy to install and use ?
thanks
Maria
Arturo Galbiati
Esteemed Contributor

Re: Trying to find logrotate

Hi Maria,
I attached a script by Bill Hassell which performs teh log rotae for any log files not only system log. It's easy to use and greatly customizable.
Take a look at it.
HTH,
Art
Arturo Galbiati
Esteemed Contributor

Re: Trying to find logrotate

Hi Maria,
this is an example about configuration file.
Art
rariasn
Honored Contributor

Re: Trying to find logrotate

Geoff Wild
Honored Contributor

Re: Trying to find logrotate

Actually - very easy.

# cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 5

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress

# packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp -- we'll rotate them here
/var/adm/wtmp {
monthly
create 0664 adm adm
rotate 1
}

# system-specific logs may be also be configured here.



In /etc/logrotate.d create config files for logs you want to rotate:

root@sha1 [ /etc/logrotate.d ]
# ll
total 48
-rw-r--r-- 1 root sys 65 May 19 2004 maillog
-rw-r--r-- 1 root sys 65 Mar 14 2005 named.log
-rw-r--r-- 1 root sys 161 Aug 19 2004 syslog

Example:

# cat maillog
/var/adm/syslog/mail.log {
rotate 5
weekly
}


The in root's cron add:

# logrotate
0 0 * * * /opt/logrotate/bin/logrotate /etc/logrotate.conf >/tmp/logrotate.cron 2>&1



Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.