VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
tzafrir.cohen at xorco... Guest
|
Posted: Sun Jun 15, 2008 12:23 pm Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
On Sun, Jun 15, 2008 at 01:50:29PM +0300, Atis Lezdins wrote:
Quote: | If they are not held open, you can can just move them away with "mv",
next CDR should just write new file.
|
You can. logrotate just automates this 'mv'. It will optionally also
compress older log files. And purge even older ones. It can also avoid
the 'mv' if there was no change. Or rotate by size and not just by time
(it is typically run from a daily cron job). In other words, it is
a "fire and forget" tool.
Naturally you can build one on your own.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir |
|
Back to top |
|
|
gavin.henry at gmail.com Guest
|
Posted: Sun Jun 15, 2008 1:14 pm Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
2008/6/15 Mark Hamilton <mark.h at cage151.com>:
Quote: | Yup, drive. Or in Gavin's case "Fly".
Really appreciate your help, Darryl. Thanks a lot.
|
Sorry, sometime I presume people just need a pointer in the right direction.
I should have said "have a look at /etc/logrotate.* files on a
GNU/Linux box and copy one.
Then if you got stuck I coudl have done a "copy and paste" for you.
Quote: | I'm attempting to use this now as is, but Tzafrir points out that this might
not rotate Master.csv in /cdr-custom. In such a case, what would I need to
do?
Thanks again,
Mark.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Darryl Dunkin
Sent: June 14, 2008 11:49 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
It's like asking for directions, and someone tells you to drive,
useless.
Here is what we do here:
Create /etc/logrotate.d/asterisk:
/var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
/var/log/asterisk/debug /var/log/asterisk/queue_log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/log_rot_ast
endscript
}
/usr/local/bin/log_rot_ast contains:
#!/bin/sh
/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mark
Hamilton
Sent: Saturday, June 14, 2008 19:05
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
Gavin,
I really do appreciate your one-liner. But is there any more insight
into
this? I know I have to use Logrotate, but I have no idea how I can
actually
get it done.
I'm going to try and figure it out right now, but for the benefit of the
list and archives, it just might be good if solutions could be posted
here
too.
Thanks,
Mark.
PS: Remember, many people get their answers from mailing list archives.
So
we'd rather get them solved than getting the same question on the list 3
months later.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Gavin
Henry
Sent: June 13, 2008 4:51 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
2008/6/13 Mark Hamilton <mark.h at cage151.com>:
Quote: | Hi,
How can I rotate /var/log/asterisk/cdr-custom/Master.csv nightly by
| date?
Logrotate on a *nix box.
--
http://www.suretecsystems.com/services/openldap/
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
--
http://www.suretecsystems.com/services/openldap/ |
|
Back to top |
|
|
gavin.henry at gmail.com Guest
|
Posted: Sun Jun 15, 2008 1:21 pm Post subject: [asterisk-users] cdr-custom/Master.csv rotation |
|
|
2008/6/15 Darryl Dunkin <ddunkin at netos.net>:
Quote: | It's like asking for directions, and someone tells you to drive,
useless.
|
It's not useles. What will he learn by just copying and pasting below?
The first thing I would have done if I got a reply that said just
"logrotate" is Google for it and then read it's man page.
Quote: | Here is what we do here:
Create /etc/logrotate.d/asterisk:
/var/log/asterisk/asterisk-verbose /var/log/asterisk/messages
/var/log/asterisk/debug /var/log/asterisk/queue_log {
daily
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/log_rot_ast
endscript
}
/usr/local/bin/log_rot_ast contains:
#!/bin/sh
/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>&1
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mark
Hamilton
Sent: Saturday, June 14, 2008 19:05
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
Gavin,
I really do appreciate your one-liner. But is there any more insight
into
this? I know I have to use Logrotate, but I have no idea how I can
actually
get it done.
I'm going to try and figure it out right now, but for the benefit of the
list and archives, it just might be good if solutions could be posted
here
too.
Thanks,
Mark.
PS: Remember, many people get their answers from mailing list archives.
So
we'd rather get them solved than getting the same question on the list 3
months later.
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Gavin
Henry
Sent: June 13, 2008 4:51 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] cdr-custom/Master.csv rotation
2008/6/13 Mark Hamilton <mark.h at cage151.com>:
Quote: | Hi,
How can I rotate /var/log/asterisk/cdr-custom/Master.csv nightly by
| date?
Logrotate on a *nix box.
--
http://www.suretecsystems.com/services/openldap/
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
|
--
http://www.suretecsystems.com/services/openldap/ |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|