Operating System - HP-UX
1752793 Members
6064 Online
108789 Solutions
New Discussion юеВ

Re: Logrotate error in hp-ux 11.23

 
Bala C
Frequent Advisor

Logrotate error in hp-ux 11.23

I have installed logrotate in hp-ux 11.23 server, but it doesn't seem to work.

I receive the following error :-

error: /etc/logrotate.conf:22 unknown option 'compresscmd' -- ignoring line
error: /etc/logrotate.conf:22 unexpected text

logrotate version installed is 2.5

Contents of /etc/logrotate.conf :-

daily

# don't create new (empty) log files after rotating old ones
nocreate

# don't try rotating empty log files
notifempty

# uncomment this if you want your log files compressed
compress

# use compress
compresscmd /usr/bin/compress

# All non-os customizations should be in this directory
include /etc/logrotate_sql.conf

Contents of /etc/logrotate_sql.conf :-

/sql/network/log/sql01.log {
rotate 52
delaycompress
}

I have similar setup working fine in hp-ux 1.11 server.

Note : /usr/bin/compress is very much available in the location specified.

Can anyone help me to overcome this problem?
6 REPLIES 6
T G Manikandan
Honored Contributor

Re: Logrotate error in hp-ux 11.23

You have two sections with the compress options.

use
compress /usr/bin/compress
or gzip


# uncomment this if you want your log files compressed
compress

Uncomment this one
# use compress
compresscmd /usr/bin/compress
T G Manikandan
Honored Contributor

Re: Logrotate error in hp-ux 11.23

compress by default uses gzip

# uncomment this if you want your log files compressed
compress
T G Manikandan
Honored Contributor

Re: Logrotate error in hp-ux 11.23

I dont think the version you have for hpux supports that option, so go for the default

compress

which uses gzip for compression.
Steven E. Protter
Exalted Contributor

Re: Logrotate error in hp-ux 11.23

Shalom,

Can you specify where you obtained this software and if its certified for HP-UX 11.23.

If you compiled it, there may be errors in the compile log that explain this behavior.

if as advised you use gzip for compression you will get a slightly better compression ratio, and smaller backups. gzip is i/o and cpu intensive while running.

While either compression utility is running, there needs to be adequate space because during the run process there are two copies of the file until the compression is complete and the original file is removed.

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
Bala C
Frequent Advisor

Re: Logrotate error in hp-ux 11.23

Thanks Guys, I commented out the compresscmd as I know the logrotate is the one which I compiled and it is not the software where hpo recommended. Now it works fine.

Bala C
Frequent Advisor

Re: Logrotate error in hp-ux 11.23

This issue is resolved.