Capturing Packets on a New Rock SBC
This section uses the SX1000 as an example.
- Set the log level of the SBC to 8 in the web management system.
- Log in to the SX1000 using Telnet as the root user.
The default password is voipgateway.
- Run the following commands to start packet
capture:
cp /var/bin/tcpdump /tmp/
cd /tmp/
chmod 777 tcpdump
./tcpdump -i any -s 0 -w sbc.cap
Here, sbc.cap is a user-defined package name.
- Reproduce a fault and press Ctrl+C in the
end.
The sbc.cap file is generated in the /tmp directory.
NOTE: If you also need SBC logs, run the cp -rf /var/log/ ./ command.
- Compress the sbc.cap file and
SBC log files.
tar -cvzf log.tar.gz log/ sbc.cap /var/config/
- Use SFTP to download the log.tar.gz package from the SX1000 to the local PC.
- Delete the sbc.cap file from
the SX1000.
rm sbc.cap
- Set the log level of the SBC to 4 in the web management system.
- Use the Wireshark to view the sbc.cap file on the
local PC.
NOTICE:
Use the background packet capture function only when no packet capture environment is available onsite. The packet capture duration shall be controlled within 2 minutes. Long time of packet capture consumes a large amount of device memory and may result in a device restart. During packet capture, you can open another Telnet window and run the free command to monitor the free memory. Ensure that the free memory is not less than 5 MB.
