s
https://blog.csdn.net/w84268426/article/details/78431778
http://t.zoukankan.com/passedbylove-p-11413362.html
在部署PCP时,我用到了两台cent os 7虚拟机。
1.官方安装文档
http://pcp.io/docs/guide.html
2.官方用户指引
http://pcp.io/doc/pcp-users-and-administrators-guide.pdf
3.安装步骤简介
监控机和被监控机均需要关闭firewall防火墙
关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
firewall-cmd --state #查看默认防火墙状态(关闭后显示not running,开启后显示running)
监控机:
①安装Collector
# yum install pcp
# systemctl enable pmcd
# systemctl start pmcd
# systemctl enable pmlogger
# systemctl start pmlogger
# cd /var/lib/pcp/pmdas/proc
# ./Install
②安装monitor
# yum install pcp-doc pcp-gui pcp-system-tools
# echo acme.com n n PCP_LOG_DIR/pmlogger/acme.com -r -T24h10m -c config.acme.com >> /etc/pcp/pmlogger/control
# systemctl restart pmlogger
③安装Dynamic Host Discovery
# yum install pcp-manager
# systemctl enable pmmgr
# echo acme.com >> /etc/pcp/pmmgr/target-host
# echo avahi >> /etc/pcp/pmmgr/target-discovery
# echo probe= ip.addr.tup.le/netmask >> /etc/pcp/pmmgr/target-discovery //此处ip.addr.tup.le/netmask,前面的ip段填写自己机器的ip即可,后面的子网掩码填写成位数,如:192.168.187.139/24
# systemctl restart pmmgr
# find /var/log/pcp/pmmgr
执行完以上步骤之后即可使用# pmfind -s pmcd命令来查找当前网络环境内的主机
执行# pcp可以查看当前主机的pcp运行状态
④安装webapi
# yum install pcp-webapi
# systemctl enable pmwebd
# systemctl start pmwebd
⑤安装webjs
# yum install pcp-webjs
以上步骤完成之后即可使用web页面来查看性能监控信息,访问http://localhost:44323,也可以使用pmchart来查看数据,运行# pmchart
被监控机:
①webapi
②Collector
其他资源:
https://blog.csdn.net/henweimei/article/details/53304930
end