Customer Service Center
Spirent KB Article
Doc ID: FAQ19587
Email Article Link
Landslide: How to selectively turn on level 10 debug for some specific function only to minimize the log size in load test
In many load tests, it's hard to turn on the level 10 debug mode as the massive messages/packets will flood the test server logs and the wanted debug info will be overwritten very quickly.
This makes it difficult for our troubleshooting and debugging.
Fortunately, Landslide provide a way to turn on debug logs for a specific source code file only, which can minimize the size of debug logs in case of load test.
Below is the guide on how to do that:
1. find out the source code file name that a specific function belongs to:
For example, let's say you are doing some sip test and want the sip message related debug info only in debug logs. Then what you need to do is run 1 UE test only first with level 10 debug mode enabled, then collect the debug logs, look into it, and find out what source code file that those sip related function belongs to. For example, when checking the incoming sip message, you probably will see some info like below, then you know the incoming message was printed out by function handleUpstreamData2, and it belongs to source code file sipLsSocket.cc. All you need to do is write down the file name sipLsSocket.cc for next step.
0x42f1b700| 2021-04-09 21:17:33.179358|
| Debug| UDP RECV lssock=0/rvsock=1000001/sipsock=0 (length:417)
(SIP/2.0 200 OK^M
CSeq: 2 BYE^M
Via: SIP/2.0/UDP [1001::1]:5060;branch=z9hG4bK-24-9020-7c0e6e2c-7fe095974110^M
2. enable debug mode and level 10 debug level on the TS as usual.
3. After TS shows "ready" status and level 10 (level function) debug, login into the CLI interface of TS by cfguser/cfguser.
4. run command "trace -o<file_name>" where <file_name> should be replaced by real file name like sipLsSocket.cc in this example.
you can enable multiple files debugging by specifying multiple -o parameters, below is an example:
##>trace -osipLsSocket.cc -oipReassembly.cc
Set Trace Level, Version: 184.108.40.206, Build Date: Mar 24 2021 14:56:26
OS Distribution: 3 (rh 1, mv 2, ub 3)
OS Architecture: 2 (32-bit 1, 64-bit 2)
OS Virtual Machine: 1 (STC 2, Generic 3, Container 4, No 1)
Destination IP Addr: 10.71.41.51
Destination IP Port: 8890
Trace File(s): /sipLsSocket.cc/ipReassembly.cc/
5. after that, run your test case, and you'll see landslide prints debug infos into test server logs for those specified source code files only. In above example, any debug trace in functions inside source code file sipLsSocket.cc or ipReassembly.cc will be printed out, while any logs in functions not belong to these two files will be omitted.
6. To clear the above debug settings, you can run "trace -oclear" command.
Product : TAS Manager,Results Manager,Landslide Client,Tcl API