連接redis時-h后面的參數指的是:IP地址。
連接redis時-h后面的參數指的是IP地址。格式所示:
redis-cli -h{ip} -p{port} -a{password} --stat
連接示例:
$ redis-cli -h 127.0.0.1 -p 6379 -a xttblog --stat
Warning: Using a password with '-a' option on the command line interface may not be safe.
------- data ------ --------------------- load -------------------- - child -
keys mem clients blocked requests connections
506 1015.00K 1 0 24 (+0) 7
506 1015.00K 1 0 25 (+1) 7
506 3.40M 51 0 60461 (+60436) 57
506 3.40M 51 0 146425 (+85964) 107
507 3.40M 51 0 233844 (+87419) 157
507 3.40M 51 0 321715 (+87871) 207
508 3.40M 51 0 408642 (+86927) 257
508 3.40M 51 0 497038 (+88396) 257