啟動(dòng): ??redis-server /etc/redis.6379.conf
連接: ??redis-cli -h localhost -p 6379
關(guān)閉: ??redis-cli -h localhost -p 6379 shutdown
?
redis服務(wù)器性能檢測(cè): 50個(gè)client,總共10000個(gè)請(qǐng)求
redis-benchmark -h localhost -p 6379 -c 50 -n 10000
?
實(shí)時(shí)輸出客戶端請(qǐng)求明細(xì):
redis-cli -h localhost -p 6379 monitor
?
根據(jù)一定行數(shù)的日志分析redis服務(wù)狀態(tài)
redis-cli -p 6379 monitor | head -n100000 > monitor.txt
/data/redis-faina-master/redis-faina.py?monitor.txt
? ? a) [redis-faina]下載
? ?? https://github.com/Instagram/redis-faina ??(Python 2.6)
? ?? https://github.com/Instagram/redis-faina/archive/master.zip
? ? b) [redis-faina]依賴的[rargparse]下載
? ?? http://argparse.googlecode.com/files/argparse-1.1.zip
?
redis服務(wù)器實(shí)時(shí)狀況:
redis-cli -h localhost -p 6379 info
redis-cli -h localhost -p 6379 info | grep used_memory
redis-cli -h localhost -p 6379 info | grep connected_clients
?
?
慢日志相關(guān): (需要登錄redis-cli)?
單位:微秒 (1秒 = 1000毫秒 = 1000 * 1000微秒)
? ? 記錄所有查詢時(shí)間大于 1000 微秒的查詢:
? ??CONFIG SET slowlog-log-slower-then 1000
? ? 查看 記錄大于多長(zhǎng)時(shí)間的日志
? ??CONFIG GET slowlog-log-slower-than
? ? 查看 允許記錄的最大日志的數(shù)量
? ??CONFIG GET slowlog-max-len
? ? 查看慢日志:
? ??SLOWLOG GET
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061
微信掃一掃加我為好友
QQ號(hào)聯(lián)系: 360901061
您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對(duì)您有幫助就好】元

