select n 切换DB, n表示数据库ID
# telnet 192.168.41.160 6379 Trying 192.168.41.160... Connected to 192.168.41.160. Escape character is '^]'. select 1 +OK
telnet方式
# telnet 172.18.52.13 6379 Trying 172.18.52.163... Connected to 172.18.52.13. Escape character is '^]'. MONITOR +OK +1425454378.190210 "MONITOR" +1425454381.165317 "GET" "admin:633" +1425454381.165725 "SET" "admin:633" "{\"id\":\"633\",\"username\":\"7209\",\"password\":\"eea5981a4fd021b8d78f8431084ba760\",\"status\":\"N\",\"belong_user_id\":\"133\",\"level_id\":\"67\",\"create_time\":1425454381,\"session_id\":\"l1s609t9gq8nj7vc94hb1i3s25\"}" +1425454381.166088 "EXPIRE" "admin:633" "3600" +1425454387.956387 "GET" "admin:633"
使用 nc 监控状态
# (echo -en "MONITOR\r\n"; sleep 10) | nc 172.18.52.13 6379
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。