Author Topic: Asterisk log filling root file system  (Read 2733 times)

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Asterisk log filling root file system
« on: December 09, 2005, 07:01:57 pm »
The asterisk log file seems to grow with no limit on size.  As a result of this problem my root file system ran out of space causing pluto to crash.

Just wanted to warn other users, that if you are not in the habit of rebooting your core and you are running asterisk you will have a problem at some time in the future unless you take action.

I have added a cron job which restarts asterisk each night and cleans up the log files.

NOS

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Asterisk log filling root file system
« Reply #1 on: December 13, 2005, 09:30:06 pm »
Place this script in your /etc/logrotate.d as asterisk ( /etc/logrotate.d/asterisk )
You might have to adjust the paths.
Code: [Select]
/var/log/asterisk/*log {
   missingok
   rotate 5
   weekly
   create 0640 asterisk asterisk
   postrotate
       /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
   endscript
}
/var/log/asterisk/full {
   missingok
   rotate 5
   daily
   create 0640 asterisk asterisk
   postrotate
       /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null
   endscript
}
/var/log/asterisk/cdr-csv/*csv {
  missingok
  rotate 5
  monthly
  create 0640 asterisk asterisk
}


This will rotate your logs.

Regards,
Cordel

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Asterisk log filling root file system
« Reply #2 on: December 14, 2005, 10:18:10 am »
Thank you for suggestion, i will include it on next asterisk package.
(it still will be 1.0.9, i know that the latest is 1.2.1, but we are working hard for CES, so no upgrade yet)

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Asterisk log filling root file system
« Reply #3 on: December 15, 2005, 01:41:43 am »
I'm looking into packaging Asterisk on Deb to try to comensate for what it lacks to simplify it's use. More just for this project and my own use.

It would be the latest release with support packages that instead of installing the compiled modules would install the source to /usr/src/<module> with shell scripts to build the modules and properly configure then (such as done with asterisk@home). this way on a kernel update one could execute the shell script to rebuild the modules.

Thoughts?
I am doing this primarly for my own use and this is the one thing that keeps me from converting over to a Pluto based server (that, and I need an idea of were to put my web page, FTP, SVN, and Postfix where updates to Pluto will not affect them, any documents on this?).

Regards,
Corey

archived

  • Hello, I'm new here
  • Posts: 0
    • View Profile
Asterisk log filling root file system
« Reply #4 on: December 15, 2005, 10:42:47 am »
Usually a pluto user don't recompile it's kernel...so you are probably an exception.
If you want to play with asterisk&stuff, try to checkout trunk/external/asterisk/ from our SVN. There you'll find a "make_package.sh" which will create a deb package for you by recompiling everything for your running kernel.

I'm not sure about other programs you mentioned because it's starting to get complicated.
Let say if there is a vulnerability discovered in apache and we update the package and config files, or we choose to upgrade to php5 or something else happends. such upgrade will probably screw your settings.
You may try to upgrade only 'pluto-*' packages and keep other unchanged... but some of pluto packages REALLY depend on non pluto, pluto-asterisk really expects some configs in asterisk-pluto. IR remote control probably expects latest LIRC and kernel modules (or some specific  version of kernel)...there are lots of things that should work together.

So partial upgrade may work for some time...but after a while it will be very dificult to maintain working pluto system and customized server in the same time.

Maybe some virtualization may help??? Like XEN or something. So you basically will run debian as XEN host and pluto as XEN guest.
It's just a suggestion, a have no expertise in this domain, and I DON'T know how to setup XEN, but it looks like most sane solution to your problem (or buy another computer :) )