memadmin

Linux/wind Memadmin部署(memcached监控工具)

2012-09-06 11:34:57|  分类:Linux Support |  标签:memadminmemcached|字号订阅

MemAdmin是一款可视化的Memcached管理与监控工具,基于 PHP5 & JQuery 开发,体积小,操作简单。

主要功能:
服务器参数监控:STATSSETTINGSITEMSSLABSSIZES实时刷新
服务器性能监控:GETDELETEINCRDECRCAS等常用操作命中率实时监控
支持数据遍历,方便对存储内容进行监视
支持条件查询,筛选出满足条件的KEYVALUE
数组、JSON等序列化字符反序列显示
兼容memcache协议的其他服务,如Tokyo Tyrant (遍历功能除外)
支持服务器连接池,多服务器管理切换方便简洁


memcached提供了stats这个命令可以查看memcached相关状态
[root@localhost ~]# telnet 192.168.3.162 11211
Trying 192.168.3.162...
Connected to 192.168.3.162 (192.168.3.162).
Escape character is '^]'.
stats
STAT pid 3642
STAT uptime 1717
STAT time 1346901609
STAT version 1.4.0
STAT pointer_size 32
STAT rusage_user 0.000000
STAT rusage_system 0.003999
STAT curr_connections 5
STAT total_connections 6
STAT connection_structures 6
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 bytes_read 7
STAT bytes_written 0
STAT limit_maxbytes 536870912
STAT accepting_conns 1
STAT listen_disabled_num 0
STAT threads 5
STAT conn_yields 0
STAT bytes 0
STAT curr_items 0
STAT total_items 0
STAT evictions 0
END

memadmin运行在支持memcache扩展的php环境中,服务器上需要安装memcache(切记此处不是memcached服务 )+php+ng/apache
PHP
扩展(也就是客户端),就是让PHP支持memcache
php
支持:
wget
http://pecl.php.net/get/memcache-2.2.5.tgz
tar zxvfmemcache-2.2.5.tgz
cd memcache-2.2.5
/usr/bin/phpize
#
(生成config编译文件)
./configure --enable-memcache  --enable-shared --with-php-config=/usr/bin/php-config --with-zlib-dir
make && make install

vi /etc/php.ini
extension_dir = "/usr/lib/php/modules" (
首先确认extension_dir位置)
extension=memcache.so


解压memadmin放入web目录
重启apache或者nginx即可!
注意:切记检查iptables selinux等安全设置(尤其是selinux
故障请跟踪查看tail -f /var/log/httpd/error_log


windows

下载memcache http://www.splinedancer.com/memcached-win32/
下载php_memcache.dll http://downloads.php.net/pierre/
下载memadmin https://github.com/junstor/memadmin/downloads
安装memcache
解压memcache至任意盘符,然后通过cmd 打开
D:\memcached-1.2.4-Win32-Preview-20080309_bin\memcached.exe -dinstall   -
安装服务在services.mcs中可见
D:\memcached-1.2.4-Win32-Preview-20080309_bin\memcached.exe -dstart    -
启动服务
D:\memcached-1.2.4-Win32-Preview-20080309_bin\memcached.exe -dstop    -
关闭服务
安装php+apache环境-->.xampp集成环境即可
修改php.ini配置php支持文件解压至“D:\xampp\php\ext"
然后添加extension = php_memcache.dll 即可!如下:

extension_dir = “D:\xampp\php\ext”

extension = php_memcache.dll

安装memadmin
memadmin解压至web目录(D:\xampp\htdocs
重启apache完成!


你可能感兴趣的:(MemAdmin)