SSDB log interpretation


This document guides you in interpreting the logs generated by SSDB.

Generally, it is recommended that you set logger.level to debug Level.

Request processing

2014-06-18 11:01:40.335 [DEBUG] serv.cpp(395): w:0.393,p:5.356, req: set a 1, resp: ok 1
  • w:0.393 Request queuing time, milliseconds
  • p:5.356 Request processing time, milliseconds
  • req:... Request content
  • resp:... Response content

Find out slow requests

The command to find out slow requests is:

tail -f log.txt | grep resp | grep '[wp]:[1-9][0-9]{0,}.'

或者

cat log.txt | grep resp | grep '[wp]:[1-9][0-9]{0,}.'

These commands are used to find the queuing time, or the processing time of requests greater than or equal to 1 millisecond.

Find the requests greater than 10 milliseconds:

cat log.txt | grep resp | grep '[wp]:[1-9][0-9]{1,}.'

Find out requests that are longer than 100 milliseconds:

cat log.txt | grep resp | grep '[wp]:[1-9][0-9]{2,}.'

SSDB is working

ssdb-server will output such a log every 5 minutes

2014-06-18 11:18:03.600 [INFO ] ssdb-server.cpp(215): ssdb working, links: 0
2014-06-18 11:23:03.631 [INFO ] ssdb-server.cpp(215): ssdb working, links: 0
  • links: 0 Current number of connections