前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >memcached基础6

memcached基础6

作者头像
franket
发布2022-06-26 23:31:52
1950
发布2022-06-26 23:31:52
举报
文章被收录于专栏:技术杂记技术杂记

启动一个 memcached 后台进程

root@h101 memcached-1.4.24# /usr/local/bin/memcached -d -m 1024 -p 12345 -u cc -c 512 -t 10

root@h101 memcached-1.4.24# ps faux | grep memcached

root 8745 0.0 0.0 103252 828 pts/0 S+ 15:17 0:00 | _ grep memcached

cc 8732 0.1 0.0 786084 1644 ? Ssl 15:17 0:00 /usr/local/bin/memcached -d -m 1024 -p 12345 -u cc -c 512 -t 10

root@h101 memcached-1.4.24#

root@h101 memcached-1.4.24# netstat -ant | grep 12345

tcp 0 0 0.0.0.0:12345 0.0.0.0:* LISTEN

tcp 0 0 :::12345 :::* LISTEN

root@h101 memcached-1.4.24#

Option Comment

-d 以服务的形式后台运行

-m 1024 最大内存分配额度1024M

-p 12345 TCP监听端口(默认为11211)

-u cc 以cc用户身份运行此服务

-c 512 最大并行连接数

-t 10 线程数(默认为4)

停止

停止是比较简单粗暴的,直接使用kill

root@h101 memcached-1.4.24# ps faux | grep mem

root 777 0.0 0.0 0 0 ? S 13:43 0:00 _ vmmemctl

root 8822 0.0 0.0 103252 828 pts/0 S+ 15:48 0:00 | _ grep mem

cc 8732 0.0 0.0 786084 1644 ? Ssl 15:17 0:00 /usr/local/bin/memcached -d -m 1024 -p 12345 -u cc -c 512 -t 10

root@h101 memcached-1.4.24# kill 8732

root@h101 memcached-1.4.24# ps faux | grep mem

root 777 0.0 0.0 0 0 ? S 13:43 0:00 _ vmmemctl

root 8825 0.0 0.0 103252 828 pts/0 S+ 15:49 0:00 | _ grep mem

root@h101 memcached-1.4.24# netstat -ant | grep 12345

root@h101 memcached-1.4.24#

本文系转载,前往查看

如有侵权,请联系?cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系?cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
http://www.vxiaotou.com