Log formats

81 views
Skip to first unread message

Garito Yanged

unread,
Apr 26, 2015, 10:04:38 AM4/26/15
to redi...@googlegroups.com
Hi!
I was looking for the doc's pages where the logs format are explain
I ask on IRC without success and it is hard to find this info because redis is used to process logs so google gives you back about this issue not the info I'm looking for

My intent is to process redis logs at logstash to put them on elasticsearch

Could anyone point me?

Thanks a lot !

Josiah Carlson

unread,
Apr 28, 2015, 8:41:44 PM4/28/15
to redi...@googlegroups.com
There isn't really a formal specification of what Redis logs or its format.

Digging through a 1.5 year old log file on my dev machine (which uses Redis 2.6.16 - 2.8.19) shows me 3 types of logs:

The startup log message that looks something like...

                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 2.8.3 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in stand alone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 10286
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               


Normal log lines:

[<process id >] <day> <month> <24 hour time to the ms> * <logging message>

And if you manage to crash Redis with a Lua script or custom patch, you might get a collection of multi-line log lines and outputs like...

=== REDIS BUG REPORT START: Cut & paste starting from here ===
[1478] 25 Mar 10:32:05.502 #     Redis 2.8.3 crashed by signal: 11
[1478] 25 Mar 10:32:05.502 #     Failed assertion: <no assertion failed> (<no file>:0)
[1478] 25 Mar 10:32:05.502 # --- STACK TRACE
/usr/local/bin/redis-server *:6379(logStackTrace+0x3e)[0x4467de]
/usr/local/bin/redis-server *:6379[0x462a71]
...
/usr/local/bin/redis-server *:6379(luaReplyToRedisReply+0x12e)[0x44adbe]
/usr/local/bin/redis-server *:6379(luaReplyToRedisReply+0x12e)[0x44adbe]
[1478] 25 Mar 10:32:05.520 # --- INFO OUTPUT
[1478] 25 Mar 10:32:05.521 # # Server
redis_version:2.8.3
redis_git_sha1:00000000
...
hash_init_value: 1393197240

[1478] 25 Mar 10:32:05.521 # --- CLIENT LIST OUTPUT
[1478] 25 Mar 10:32:05.522 # addr=127.0.0.1:47859 fd=11 name= age=60580 idle=60580 flags=N db=3 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 obl=0 oll=0 omem=0 events=r cmd=zadd
...
[1478] 25 Mar 10:32:05.522 # --- CURRENT CLIENT INFO
[1478] 25 Mar 10:32:05.522 # client: addr=127.0.0.1:35277 fd=6 name= age=966 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=1880 omem=105280 events=rw cmd=evalsha
[1478] 25 Mar 10:32:05.522 # argv[0]: 'EVALSHA'
...
[1478] 25 Mar 10:32:05.522 # argv[5]: '6'
[1478] 25 Mar 10:32:05.522 # --- REGISTERS
[1478] 25 Mar 10:32:05.522 # 
RAX:0000000000000000 RBX:00000000009f3fc0
RCX:0000000000000000 RDX:00000000009ec5d0
...
CSGSFS:0000000000000033
[1478] 25 Mar 10:32:05.522 # (00007ffff9bb8e77) -> 00000000009eb640
...
[1478] 25 Mar 10:32:05.523 # (00007ffff9bb8e68) -> 000000000046332b
[1478] 25 Mar 10:32:05.523 # --- FAST MEMORY TEST
[1478] 25 Mar 10:32:05.523 # Bio thread for job type #0 terminated
[1478] 25 Mar 10:32:05.523 # Bio thread for job type #1 terminated
[1478] 25 Mar 10:32:06.982 # Fast memory test PASSED, however your memory can still be broken. Please run a memory test for several hours if possible.
[1478] 25 Mar 10:32:06.982 # 
=== REDIS BUG REPORT END. Make sure to include from START to END. ===

       Please report the crash opening an issue on github:


  Suspect RAM error? Use redis-server --test-memory to veryfy it.



So in the general case, Redis logs are fairly straightforward. But if Redis is just starting up, or if you have special types of problems, the log lines can get a bit nasty.

 - Josiah


--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages