...
Method 1 (if you need a one-shot trace)
From PBX command line run the following command:
# sudo tcpdump -s0 -i any -w /mnt/backups/traces/<FILE_NAME>.pcap host <DEVICE_IP> and port 514
Where <DEVICE_IP> is the IP address of your device.
Once you have done the test call, you can press CRTL+C to exit.
Method 2 (if you need to run syslog trace log time)
From PBX web interface, under “Settings -> Tools & Utilities -> Generate Trace”, select “Custom tcpdump” and add the following string:
-v -s0 -i any host <DEVICE_IP> and port 514
Where <DEVICE_IP> is the IP address of your device.
Then click to “start”.
When over, click to "stop".
...
*ATTENTION*: In this way the system will run a trace and will write 1 file till it reaches 50MB. After that the file will be overwritten.
Where <DEVICE_IP> is the IP address of your device.
Method 2 (if you need to run syslog trace log time)
From PBX command line run the following command:
# sudo tcpdump -s0 -i any -w /mnt/backups/traces/<FILE_NAME>.pcap host <DEVICE_IP> and port 514
Once you have done the test call, you can press CRTL+C to exit.
If you need to activate a long time trace in background use the following command :
# sudo tcpdump -s0 -i any -w /mnt/backups/traces/<FILE_NAME>.pcap host <DEVICE_IP> and port 514 -C 50 -W 10&
-W XX defines the max number of pcap files
-C XX defines the max size in MB for each pcap file
& means that pcap trace will be activated in background (it will be still active even if you terminate the ssh session). To stop a trace in background :
- launch ps aux |grep tcpdump to check process id
- kill -9 <PID> (PID = process id from previous point)
3. Generate the syslog file
From PBX command line run the following command:
...