I am not aware, how to make this possible via kannel.. But the following strikes to me.
Unix system uses logrotate to do the log rotation of the system log files, which will have the entry for each programs in the directory.,
So my suggestion is locate the file that is related to your process, and then edit it as daily to hourly... ( for example: i did for dkpg.log )
as
I hope it helps.....
ca one v some thing like this?
/var/log/kannel.access.log /var/log/kannel.usage.log{
hourly
compress
date+H+Mext
maxage 159
rotate 32
missingok
notifempty
delaycompress
create 640 root root
sharedscripts
#Added for enabling process to write onto new logfile.
postrotate
chmod go+w /tmp/sms.log
killall -HUP bearerbox smsbox || true > /dev/null 2 > /dev/null #send HUP signal to reopen new log files after r
otate.
endscript
}
/var/log/kannel.access.log /var/log/kannel.usage.log /tmp/sms.log {
daily
compress
dateext
maxage 159
rotate 32
missingok
notifempty
size +4096k
delaycompress
create 640 root root
sharedscripts
#Added for enabling process to write onto new logfile.
postrotate
chmod go+w /tmp/sms.log
killall -HUP bearerbox smsbox || true > /dev/null 2 > /dev/null #send HUP signal to reopen new log files after r
otate.
endscript
}
---------- Post updated at 05:34 AM ---------- Previous update was at 05:30 AM ----------
Quote:
Originally Posted by Targ
ca one v some thing like this?
/var/log/kannel.access.log /var/log/kannel.usage.log{
hourly
compress
date+H+Mext
maxage 159
rotate 32
missingok
notifempty
delaycompress
create 640 root root
sharedscripts
#Added for enabling process to write onto new logfile.
postrotate
chmod go+w /tmp/sms.log
killall -HUP bearerbox smsbox || true > /dev/null 2 > /dev/null #send HUP signal to reopen new log files after r
otate.
endscript
}
/var/log/kannel.access.log /var/log/kannel.usage.log /tmp/sms.log {
daily
compress
dateext
maxage 159
rotate 32
missingok
notifempty
size +4096k
delaycompress
create 640 root root
sharedscripts
#Added for enabling process to write onto new logfile.
postrotate
chmod go+w /tmp/sms.log
killall -HUP bearerbox smsbox || true > /dev/null 2 > /dev/null #send HUP signal to reopen new log files after r
otate.
endscript
}
@thegeek
What I want is to maintain the daily logrotation but also run te hourly for the logs that fillup fast.
Hello all.
Due to some reason I can not use HUP to rotate needed log files.
So I use the standard method:
cp $file $file.1
cat /dev/null > $file
But if Java application in this time writing the output to $file,
in the beginning of it appears many "^@^@^@^@^@^@".
How to avoid it? Or how... (6 Replies)
Hello,
I have a command which runs continuously and creates output to STDOUT. Now, in unix, if I create logging for this command, it would create a single log file and keep on updating. As there is so much data filled in it, I would want to break the log files periodically. In this instance, say... (4 Replies)
hi folk,
need advise regarding the log rotation, i have the logadm set at
30 2 * * * /usr/sbin/logadm
so it supposed to rotate once per day, but now it rotated twice!
but someone my log will rotate at 2:30 AM, but then another 2 hours later, it creates a new and rotate a new log again,... (2 Replies)
Hi Guys,
Good morning, I just want to know and collect ideas on this one. Regarding rotation of logs as I've observed it's not consistently functioning. I have a server with 8 Partitions, each partition has a dedicated directory for the logs that is needed and I set it every 5mins (300secs) the... (1 Reply)
Need some suggestion with an old problem form a thread here:
https://www.unix.com/shell-programming-scripting/153204-multiple-not-statement-awk.html
Since my log is large, I did get help to make a line that splits the log into two partstail -f syslog | awk '!/snmpd|ntpd|reject/{print | "tee... (1 Reply)
Hi All!
I seem to have a problem with log rotation, unless I am doing something wrong, I have type the following command for testing purposes to see if the -s option works but he did not:
logadm -w /var/adm/messages -C 8 -c -s 512k -t '/var/adm/messages.$n' -z 1
the file is now at this... (7 Replies)
I have an application that rotate its log once it reaches 100mb and it keeps a total of 24 logs. I am trying to write a script to run daily to tar up the previous day logs files and move them to a different directory. here is a long listing of the logs in the directory:
-rw-r--r-- 1 user1 ... (6 Replies)
Hi All,
I have a situation here ...
HACMP is configured with application monitoring script, which is generating messages .... which is running every minute ...
And every minute when monitoring script run, one one log file is generating .... and this log file is rotating ...
which is rotating... (1 Reply)