summaryrefslogtreecommitdiff
path: root/tests/instances.tcl
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-06-10 15:19:35 +0200
committerantirez <antirez@gmail.com>2014-06-10 15:22:40 +0200
commit92dcae8fe4d6bc3b4ce7fbfcae0dcb6708cad18e (patch)
treec22d011e7f868f35a712e377da070343567ab3bf /tests/instances.tcl
parent1617c36c355c0ac27a5cc8ec0b635e2d690405ae (diff)
downloadredis-92dcae8fe4d6bc3b4ce7fbfcae0dcb6708cad18e.tar.gz
Cluster test: added show-redis-logs command in the interactive console.
Diffstat (limited to 'tests/instances.tcl')
-rw-r--r--tests/instances.tcl9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/instances.tcl b/tests/instances.tcl
index 34c59a11c..358c2affc 100644
--- a/tests/instances.tcl
+++ b/tests/instances.tcl
@@ -141,6 +141,14 @@ proc pause_on_error {} {
set cmd [lindex $argv 0]
if {$cmd eq {continue}} {
break
+ } elseif {$cmd eq {show-redis-logs}} {
+ set count 10
+ if {[lindex $argv 1] ne {}} {set count [lindex $argv 1]}
+ foreach_redis_id id {
+ puts "=== REDIS $id ===="
+ puts [exec tail -$count redis_$id/log.txt]
+ puts "---------------------\n"
+ }
} elseif {$cmd eq {show-sentinel-logs}} {
set count 10
if {[lindex $argv 1] ne {}} {set count [lindex $argv 1]}
@@ -184,6 +192,7 @@ proc pause_on_error {} {
} elseif {$cmd eq {help}} {
puts "ls List Sentinel and Redis instances."
puts "show-sentinel-logs \[N\] Show latest N lines of logs."
+ puts "show-redis-logs \[N\] Show latest N lines of logs."
puts "S <id> cmd ... arg Call command in Sentinel <id>."
puts "R <id> cmd ... arg Call command in Redis <id>."
puts "SI <id> <field> Show Sentinel <id> INFO <field>."