Asterisk 1.4.22 full log file

MST

Joined
Sep 25, 2009
Messages
317
Likes
0
Points
16
#1
Hello all,

I have noticed that full log file is getting bigger every day. If am not wrong that file would be made every day
like full.1 full.2 full.3 etc....

Where can I change it or take a look what causes that behaviour?

Thank You for any advice.
 

Amphibian

Joined
Sep 8, 2009
Messages
1,128
Likes
2
Points
38
#2
Look into reading "Elastix Without Tears" under "Documentation", you will see under section 45 of that reading that log files are your friends. You can use the builtin editor "Vi" to open these log files and see what they are about. Search the internet for how to use Vi from the command line.

Another good source would be to obtain a book on Linux (such as Red Hat Linux Bible or one like it) and read up on the basics of Linux and log files.

Hope that helps, in addition you could probably do a search on this site for log files and obtain additional common answers.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#3
By default the logs will rotate, try (from bash, the default shell)

rasterisk -x "logger rotate"

to rotate the logs manually,

man logger

to understand the logger process


tail -f /var/log/asterisk/full

for a realtime trace of the curret log.

less /var/log/asterisk/full

to browse the current log file (probably after the logger rotate if you have a runaway process.)

grep <expression> /var/log/asterisk/full*

to filter the all the log rotations by expression

man grep

to use a filter more complicated than a case sensitive string.
 

saleh

Joined
Apr 18, 2007
Messages
249
Likes
0
Points
0
#4
To reduced the asterisk log

vi /etc/asterisk/logger.conf
and change this line full => notice,warning,error,debug,verbose
to
full => notice,warning,error,verbose
or
full => notice,warning,error

then
CLI> reload logger

Best Regards,

Saleh
 

MST

Joined
Sep 25, 2009
Messages
317
Likes
0
Points
16
#5
Thank You all for a quick reply. Again, the problem is I have only 1 file full about 65MB and every day it is getting bigger. If I want to open it I have to wait pretty long.

I know this file "full" in /var/log/asterisk can be devided by full.1,full.2, full.3, etc. so every day I can get 1 full file from each day. I am trying to figure it out how to chnage that to have full log from every day not like now only one file full.
Normally this file is rotated but in my case looks like not and I get only 1 "full" log file.

MST
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#6
65M isn't so big, just don't open it read/write, there is little point in writing to it, just use less, cat, tail or grep, from bash, all pretty well instantaneous.

I reiterate
.
.
rasterisk -x "logger rotate"

to rotate the logs manually,

man logger

to understand the logger process
.
.

I will add

man logrotate

to your homework and encourage you to explore the contents of /etc/logrotate.d/ and discover why:

asterisk-add.logrotate

is not working for you.
 

MST

Joined
Sep 25, 2009
Messages
317
Likes
0
Points
16
#7
Dicko,

Thank you for reply. I have fallowed your instructions and I see now full.0 = 64M
full.1 = 169k and full = 3k
I have 2 logrotate files in /etc/logrotate.d/asterisk
Code:
/var/log/asterisk/messages /var/log/asterisk/*log /var/log/asterisk/debug /var/log/asterisk/console /var/log/asterisk/full {
    create 0640 asterisk asterisk
    daily
    extension .txt
    mail root@localhost
    missingok
    nocompress
#    notifempty
    rotate 32
    sharedscripts
#    size 10M
    postrotate
	/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>/dev/null || true
    endscript
}

/var/log/asterisk/cdr-csv/*csv /var/log/asterisk/cdr-custom/*csv {
    create 0640 asterisk asterisk
    monthly
    extension .txt
    mail root@localhost
    missingok
    nocompress
#    notifempty
    rotate 2
    sharedscripts
#    size 10M
    postrotate
	/usr/sbin/asterisk -rx 'logger reload' >/dev/null 2>/dev/null || true
    endscript
}
and asterisk.logrotate
Code:
/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
}
 
/var/log/atftp.log {
  missingok
  rotate 5
  monthly
  create 0640 nobody nobody
}
My suspicious is against "rotate 32" and "# size 10M" and looks like the last one took out 10M limitation so is that why there is one file?

Thank You for your help. MST
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#8
You do seem to have a bit of mess, I assume this is not a native Elastix install.

would remove /etc/logrotate.d/asterisk as it seems to refer to a non Elastix type Install, have you any idea where it came from?
 

MST

Joined
Sep 25, 2009
Messages
317
Likes
0
Points
16
#9
Yes I agree - if it was Elastix it would not be in big mess. It is Trixbox 2.6.2.3 fresh installation. The only one application that was added was MONDO, but I dont think it would do such mess. Becasue I see that logrotate is working and see full.x new files let's treat this thread as resolved.

Thank You for your help.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#10
Your welcome,

but I am intrigued, why would you ask for help with a fresh install of Trixbox in an Elastix forum?
 

MST

Joined
Sep 25, 2009
Messages
317
Likes
0
Points
16
#11
The true is more and more posts are ignored there, so I have decided to try Elastix forum in this particular example. And so far I am not disappointed.
If you are lucky you can get answer there, but if not ..... I understand that a lot of posts just are duplicating that means that people don't try to search first, they just ask without any effort. There are two sides of that problem. Regarding this particular example, (Elastix and Trixbox) are interconnect together so looking for help everywhere is the last chance to get it working properly.

Best Regards, MST
 

rafael

Joined
May 14, 2007
Messages
1,454
Likes
1
Points
0
#12
Dicko, So the first advice should be install Elastix instead of Trixbox ;).

MST, if you are using Trixbox the best thing would be to ask the question in the Trixbox forum. If you use Elastix we would be more than happy to help you. What ever your choice is, we would wish you the best luck.

Best regards,

Rafael
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#13
Raf,

Indeed had I known, it would have saved us both time ;)

This is an example of what happens when others "fork things up",
 

MST

Joined
Sep 25, 2009
Messages
317
Likes
0
Points
16
#14
I am all the time thinking about switching all my clients OS to Elastix but it is more complex that I thought especially when most of them are located remotely.

I like Elastix 2.0, even thought it is in BETA mode so not stable yet but I will patiently wait for that.

CHeers,
 

MST

Joined
Sep 25, 2009
Messages
317
Likes
0
Points
16
#15
You see, I did not write on the begining of this post what OS it was regarding :) I did not write it was Elastix :)

Dicko figured it out that both files look suspicous like for Elastix and this is true ..... I have kindly answered
for a question about OS (it wasn't Elastix) However, Dicko gave me some right directoins to the problem that is I think resolved. I appreciate that and I am thankfull for Dicko for the help. I will have more Elastix OS in the future than Triboxes because simply that free product is better today than Trixbox. This is just my 2 cents.

Cheers,
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#16
.
.
.You see, I did not write on the begining of this post what OS it was regarding :) I did not write it was Elastix :)
.
.
My 2 cents worth ( and 20 minutes worth ) is that surely the point of an Elastix support forum is to support Elastix, I imagined we would all make that presumption, had it been an Elastix box you would not have had the problem in the first place, had you been upfront about it being a trixbox machine, I for one would have not been interested in replying.

So I guess you win, and I loose (at least my time) but once bitten, twice shy. In my opinion your post verged on, if not was, duplicity.

disdainfully

dicko
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,913
Messages
130,917
Members
17,589
Latest member
cristian.saiz
Top