linux监控软件web,linux-dash web监控系统的安装

Linux-dash是一款为Linux设计的基于Web的轻量级监控面板。这个程序会实时显示各种不同的系统属性,比如CPU负载、RAM使用率、磁盘使用率、网速、网络连接、RX/TX带宽、登录用户、运行的进程等等。它不会存储长期的统计。因为它没有后端数据库。其支持PHP, Node.js, Go 做为web展示。这里以php平台进行展示为例,简单了解下其安装和使用。

一、安装nginx和php

1、yum源安装相关软件

yum install nginx git php-common php-fpm

nginx在默认redhat/centos源中不存在,需使用第三方源epel

2、clone linux-dash包

git clone https://github.com/afaqurk/linux-dash.git

sudo cp -r linux-dash/ /var/www/

sudo chown -R www:www /var/www

二、配置

1、nginx配置

现在我们要在nginx中配置Linux-dash。我们如下创建 /etc/nginx/conf.d/linuxdash.conf,如下:

# vim /etc/nginx/conf.d/linuxdash.conf

server {

listen 80;

server_name www.361way.com;

root /var/www;

index index.php index.html index.htm;

location / {

try_files $uri $uri/ /index.php?$args;

}

location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {

access_log off;

log_not_found off;

expires max;

}

location ~ \.php$ {

fastcgi_index index.php;

fastcgi_keep_conn on;

include fastcgi_params;

fastcgi_pass 127.0.0.1:9000;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

}

}

2、php-fpm配置

确保设置了如下的“listen”,“user”和“group”字段。你可以保留其它的配置不变。

# vim /etc/php-fpm.d/www.conf

……

listen =127.0.0.1:9000

user = www

group= www

……

3、配置services

重启 Nginx和php-fpm服务,并配置为开机自启动。

service nginx restart

service php-fpm restart

chkconfig nginx on

chkconfig php-fpm on

三、使用

你现在可以在浏览器中输入http://linux-dash/来访问Linux-dash。我这里是http://www.361way.com/linux-dash/ ,具体效果如下(点击图片看大图):

628526a6f0dac4e7d5dc2f211758787e.png

更多的可以查看demo页面。

四、其他

1、其他web展示平台

除了基于php web 的展示,其还支持node.js、go方式的展示,具体参见linux-dash的git页面 ,使用方法如下:

#node.js平台下

npm install

node server

#go平台下

go run index.go

使用go的二进制方式

go build && ./server -h

注:从其源码包上来看,其已经在考虑基于python的web展示,具体可以查看python-server.py 文件,不过在使用python python-server.py文件运行查看http://localhost:8081时,发现无法正常防问(基于redhat6 python2.6)。

2、概述

linux-dash由于是基于一种无数据库的方式展示,本身前台展示时依赖于主机的性能,通过server/moudle下的脚本文件取得相应的数据后再在前台展示,所以速度不快。而且也无法查看历史数据 ,相对较鸡肋。从一方面来说,程序相对简洁,一些东西还是值得我们借鉴。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值