|
|
logrotate for HP-UX 11.31 Itanium
Hello,
has someone successfully compiled the tool logrotate on HP-UX 11.31
Itanium?
This version is a little bit outdated and for PA-RISC only:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/logrotate-2.5/
I have tried to compile Version 3.7.8 from here:
<http://logrotate.sourcearchive.com/downloads/3.7.8-6/
logrotate_3.7.8.orig.tar.gz>
Without success:
>/gmake
/usr/local/bin/gcc -Wall -D_GNU_SOURCE -DHP-UX -DVERSION=\"3.7.8\" -O2
-I/usr/local -c -o logrotate.o logrotate.c
<command-line>: warning: missing whitespace after the macro name
logrotate.c:1:23: error: sys/queue.h: No such file or directory
In file included from logrotate.c:27:
logrotate.h:56: error: expected specifier-qualifier-list before
'TAILQ_ENTRY'
logrotate.h:59: warning: return type defaults to 'int'
logrotate.h: In function 'TAILQ_HEAD':
logrotate.h:59: error: expected declaration specifiers before 'logs'
logrotate.h:61: error: storage class specified for parameter 'numLogs'
logrotate.h:62: error: storage class specified for parameter 'debug'
logrotate.c:38: error: expected specifier-qualifier-list before
'LIST_ENTRY'
logrotate.c:39: warning: empty declaration
logrotate.c:47: warning: empty declaration
....
....
The library libhplx.so is installed.
I have not found an other similar tool based on Perl.
Frank
|
|
0
|
|
|
|
Reply
|
Frank
|
2/24/2011 6:45:48 PM |
|
Frank Graf schrieb:
>
> I have not found an other similar tool based on Perl.
>
If it's just for renaming specific file versions,
why don't you use simple shell scripts?
That's how I do it,
mo messing with perl or gcc.
|
|
0
|
|
|
|
Reply
|
Michael
|
2/24/2011 8:18:27 PM
|
|
Am Thu, 24 Feb 2011 21:18:27 +0100 schrieb Michael Kraemer:
>> I have not found an other similar tool based on Perl.
>>
>>
> If it's just for renaming specific file versions, why don't you use
> simple shell scripts? That's how I do it,
> mo messing with perl or gcc.
I'm using now shell scripts for renaming, deleting, compressing. For each
logfile I have one script and cron job. It's working ok.
It would only be more nice if I have one config file for all the
application and system logfiles.
Frank
|
|
0
|
|
|
|
Reply
|
Frank
|
2/25/2011 5:09:46 PM
|
|
Frank Graf <usenet0509.nmail@spamgourmet.com> wrote:
>
>
> Am Thu, 24 Feb 2011 21:18:27 +0100 schrieb Michael Kraemer:
>
>>> I have not found an other similar tool based on Perl.
>>>
>>>
>> If it's just for renaming specific file versions, why don't you use
>> simple shell scripts? That's how I do it,
>> mo messing with perl or gcc.
>
> I'm using now shell scripts for renaming, deleting, compressing. For each
> logfile I have one script and cron job. It's working ok.
>
> It would only be more nice if I have one config file for all the
> application and system logfiles.
>
>
> Frank
>
Here you go, without compression, but that is trival to add.
In syslog.conf each facility is configure to go to a unique file.
Call from cron as appropriate.
#! /bin/sh
#
# Rotate all the custom syslog files so they don't grow to infinity
#
# All the names are here, but only the ones that exist and have contents
# get rotated.
#
LOGDIR=/var/adm/syslog
for LOG_FILE in syslog.local1 syslog.local2 syslog.local3 syslog.local4 syslog.l
ocal5 syslog.local6 syslog.local7 syslog.user mail.log
do
LOG=$LOG_FILE
if test -d $LOGDIR
then
cd $LOGDIR
if test -s $LOG
then
test -f $LOG.3 && mv $LOG.3 $LOG.4
test -f $LOG.2 && mv $LOG.2 $LOG.3
test -f $LOG.1 && mv $LOG.1 $LOG.2
test -f $LOG.0 && mv $LOG.0 $LOG.1
cp $LOG $LOG.0
> $LOG
fi
fi
done
kill -HUP `cat /etc/syslog.pid`
#
--
Jim Pennino
Remove .spam.sux to reply.
|
|
0
|
|
|
|
Reply
|
jimp
|
2/25/2011 7:00:22 PM
|
|
|
3 Replies
826 Views
(page loaded in 0.032 seconds)
|
|
|
|
|
|
|
|
|