关闭redis
[root@--x-x log]# cd /usr/local/redis/bin/
[root@--x-x bin]# ./redis-cli -h 192.168.3.98 -p shutdown
启动redis
[root@--x-x bin]# pwd
/usr/local/redis/bin
[root@--x-x bin]# ./redis-server /etc/redis/.conf
查看redis相关信息
[root@--x-x bin]# ./redis-cli -h 192.168.3.98 -p
192.168.3.98:> info
# Server
redis_version:3.0.
redis_git_sha1:
redis_git_dirty:
redis_build_id:8a6a41e5c3fd124d
redis_mode:standalone
os:Linux 2.6.-.el6.x86_64 x86_64
arch_bits:
multiplexing_api:epoll
gcc_version:4.4.
process_id:
run_id:50d9391e364892fa65a3d98a9b889a7a8eafe258
tcp_port:
uptime_in_seconds:
uptime_in_days:
hz:
lru_clock:
config_file:/etc/redis/.conf # Clients
connected_clients:
client_longest_output_list:
client_biggest_input_buf:
blocked_clients: # Memory
used_memory:
used_memory_human:47.53M #使用的内存大小
used_memory_rss:
used_memory_peak:
used_memory_peak_human:47.55M
used_memory_lua:
mem_fragmentation_ratio:1.04
mem_allocator:jemalloc-3.6. # Persistence
loading:
rdb_changes_since_last_save:
rdb_bgsave_in_progress:
rdb_last_save_time:
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-
rdb_current_bgsave_time_sec:-
aof_enabled:
aof_rewrite_in_progress:
aof_rewrite_scheduled:
aof_last_rewrite_time_sec:-
aof_current_rewrite_time_sec:-
aof_last_bgrewrite_status:ok
aof_last_write_status:ok # Stats
total_connections_received:
total_commands_processed:
instantaneous_ops_per_sec:
total_net_input_bytes:
total_net_output_bytes:
instantaneous_input_kbps:0.01
instantaneous_output_kbps:1.21
rejected_connections:
sync_full:
sync_partial_ok:
sync_partial_err:
expired_keys:
evicted_keys:
keyspace_hits:
keyspace_misses:
pubsub_channels:
pubsub_patterns:
latest_fork_usec:
migrate_cached_sockets: # Replication
role:master
connected_slaves:
master_repl_offset:
repl_backlog_active:
repl_backlog_size:
repl_backlog_first_byte_offset:
repl_backlog_histlen: # CPU
used_cpu_sys:0.14
used_cpu_user:0.23
used_cpu_sys_children:0.00
used_cpu_user_children:0.00 # Cluster
cluster_enabled: # Keyspace
db0:keys=,expires=,avg_ttl=
192.168.3.98:>