【RHCA+】glances命令(监控系统资源) “ 目录RHCA - 12 系统监控 - 8 glances命令监控系统资源 ”查看CPU、内存、网络、磁盘、进程等监控信息类似top语法格式glances参数作用-w启动网页模式会同时开启网页和api默认进程前台驻留--disable-webui关闭网页也就是只提供api--password设置密码默认无密码-s以服务模式运行默认会前台驻留-c指定要连接的服务端地址-h查看帮助交互式命令作用k结束选中的进程1查看每个cpu核心资源利用率Ctrlc退出一、安装[rootwuzuniao ~]# yum -y install epel-release.noarch #安装epel仓库[rootwuzuniao ~]# yum -y install glances #安装软件二、使用1、本地监控[rootwuzuniao ~]# glances #查看系统监控2、web监控[rootwuzuniao171 ~]# glances -w --password #开启web服务并设置密码Define the Glances webserver password (glances username): #设置密码Password (confirm): #重复输入密码Do you want to save the password? [Yes/No]: yes #同意保存Glances Web User Interface started on http://0.0.0.0:61208/浏览器访问http://服务器IP:61208/账密glances/自己设置的密码3、CS模式[rootwuzuniao171 ~]# glances -s #服务端启动进程默认会前台驻留Glances XML-RPC server is running on 0.0.0.0:61209[rootwuzuniao172 ~]# glances -c 192.168.1.171 #客户端指定地址连接