Raspberry pi and Logging / wireshark

Status
Not open for further replies.

viraltechnology

Joined
Mar 22, 2015
Messages
39
Reaction score
6
Hola,
wonderful members of 3cx fourms, we are facing some call qulity issues. so we need to run a wireshark and turn on verbose Logging. We know how to do that. My question is what is everyone doing with the logs to ensure they dont crash the sbc. our issues are intermintent. so it may run for a day or hour or two days without issues. we can not reproduce the issue on command. any way to offload the logs to a windows share? any easy way to off load them to an external hd? Also does anyone have any good primer courses on Linux. My expereince is mostly in the windows world, in fact thats why I first went with 3cx becuase its a phone system that will run on windows. However two years ago we moved our internal system offsite and on Linux. I am having to learn fun things like sudo, sudo bash var sftp.

Thanks in advance for thoughts and input!
 
Hi viraltechnology,

As you are probably aware you can get logging for the Tunnel in 3CX (support info file) and you do have a way of accessing the PBX itself if running on Linux via a console to run some commands.

This is all good but if you are wanting to do this from the Pi end you need to first turn on logging on the pi .The 3CX Session Border Controller Log is disabled by default on a Raspberry Pi installation.

This can be done in the 3cxsbc.conf which can be found if you navigate to: C:\ProgramData\3CXSBC\3cxsbc.conf

Change the DEBUG to VERBOSE then run the below commands:

1) Edit file /etc/3cxsbc.config and uncomment the # File section.
2) Stop the 3cxsbc service (service 3cxsbc stop)
3) Stop the rsyslog service (service rsyslog stop)
4) Delete file ls -l /var/log/ (rm /var/log/3cxsbc.log)
5) Recreate /var/log/3cxsbc.log (touch /var/log/3cxsbc.log)
6) Start the rsyslog service (service rsyslog start)
7) Start the 3cxsbc service (service 3cxsbc start

You can tail -f the logs so that it saves to a txt file - your SD card should be fine to support his.

Ideally what I would like to see in the future is if 3CX can implement a way of Piping the output from the pi to 3CX so it is visible in the 3CX console.
 
Thanks for your reply! I am looking into moving these files and the wireshark files to an external usb. I just worry about the limited space of the Raspberry pi and crashing our sbc.
 
Check your ping from your pi to google, if its not below an average of 35ms start diagnosing with isp/network admin there.
 
I think as long as you have a 16gb micro sd card with your Pi (which most kits come with) this should be more than adequate, the logs generated in my steps above save it as a .txt file anyway.
 
i have a usb drive connected now. and have learned how to mount the drive and all of the fun. I am going to create two directories one for wireshark and one of the 3cxsbc logs and just put them on the attached usb drive. itll just help me sleep and I wont have to worry about the sbc crashing. but thanks Eddv123! i do appericate the feedback. My background is windows/networking/systems admin so this journey is fun different and challenging!
 
so here is where we are

I have mounted the usb drive - created a directory "/media/usb/sbclog/3cxsbc.log" giving premissions using chmod 0777 gives all users read write access.

as the pi user I can use nano 3cxsbc.log open the file - write to the file. I than close the file save it and use the same nano 3cxsbc.log to verify I can read the text I just wrote.

I changed the 3cxconfig file to Verbose and changed the path to "/media/usb/sbclog/3cxsbc.log"

however I still see nothing being written to that file.

thoughts? will I need to give access to the pi group in order for the 3cxsbc service to be able to read write?
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,880
Messages
589,533
Members
164,735
Latest member
998742