动态刷新运行中的进程
top
回显如下:
]# top
top - 16:43:05 up 9 days, 1:09, 1 user, load average: 3.57, 3.18, 2.93
Tasks: 280 total, 1 running, 279 sleeping, 0 stopped, 0 zombie
Cpu(s): 12.2%us, 5.1%sy, 0.0%ni, 64.5%id, 18.1%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 33270712k total, 26601448k used, 6669264k free, 421152k buffers
Swap: 71681988k total, 92k used, 71681896k free, 23402376k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4024 mysql 15 0 979m 557m 5604 S 238.6 1.7 27465:44 mysqld
7984 rsync 18 0 1602m 62m 3328 S 19.9 0.2 0:02.50 httpd
7683 root 16 0 1345m 1.3g 4956 S 16.6 4.1 1053:26 php
863 root 10 -5 0 0 0 D 1.0 0.0 7:11.54 kjournald
7971 root 15 0 2336 1140 800 R 0.3 0.0 0:00.07 top
8180 root 18 0 31548 10m 4356 S 0.3 0.0 0:00.11 php
1 root 15 0 2072 660 572 S 0.0 0.0 0:06.44 init
2 root RT -5 0 0 0 S 0.0 0.0 0:01.75 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/0
4 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
5 root RT -5 0 0 0 S 0.0 0.0 0:00.71 migration/1
6 root 34 19 0 0 0 S 0.0 0.0 0:01.88 ksoftirqd/1
7 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/1
8 root RT -5 0 0 0 S 0.0 0.0 0:00.67 migration/2
9 root 34 19 0 0 0 S 0.0 0.0 0:00.58 ksoftirqd/2
10 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/2
11 root RT -5 0 0 0 S 0.0 0.0 0:00.62 migration/3
-------------
或 使用pstree也能看到memcached进程状态;
或是ps -A也能列出运行中的.
影射命令
[root@xxxx ~]# alias mem='/Data/memcached/bin/memcached'
结束所有的memcached
killall memcached
启用
[root@sss~]# mem -d -u root
查看帮助
[root@ssss~]# mem -h
查看状态
需要使用telnet命令
登录
[root@sss~]# telnet 127.0.0.1 11211
回显
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
输入stats回车
回显:
STAT pid 12066
STAT uptime 780434
STAT time 1316162170
STAT version 1.4.5
STAT pointer_size 32
STAT rusage_user 0.000999
STAT rusage_system 0.004999
STAT curr_connections 10
STAT total_connections 11
STAT connection_structures 11
STAT cmd_get 0
STAT cmd_set 0
STAT cmd_flush 0
STAT get_hits 0
STAT get_misses 0
STAT delete_misses 0
STAT delete_hits 0
STAT incr_misses 0
STAT incr_hits 0
STAT decr_misses 0
STAT decr_hits 0
STAT cas_misses 0
STAT cas_hits 0
STAT cas_badval 0
STAT auth_cmds 0
STAT auth_errors 0
STAT bytes_read 27
STAT bytes_written 12
STAT limit_maxbytes 1073741824
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 4
STAT conn_yields 0
STAT bytes 0
STAT curr_items 0
STAT total_items 0
STAT evictions 0
STAT reclaimed 0
END