当前位置:首页 » 币种行情 » ethlegend官网

ethlegend官网

发布时间: 2023-05-12 23:21:15

1. 如何用MRTG检测windows服务器的CPU 内存 和网络流量

1、 安装snmp

yum install net-snmp* -y

2、 修改/etc/snmpd.conf(可直接清空内容)

① 增加 rocommunity public

② 找到disk修改(df –k查看)可以有多个,看情况

disk / $size

disk /boot $size1

[disk /home $size2…]

3、 启动

/etc/init.d/snmpd restart

4、 安装mrtg

yum install mrtg* -y

5将以下内容写到/etc/mrtg/mrtg.cfg,直接覆盖(黄色背景需更改)

############################################################

# Multi Router Traffic Grapher -- Example Configuration File

############################################################

#

#Minimal mrtg.cfg

HtmlDir: /var/www/mrtg

ImageDir: /var/www/mrtg

LogDir: /var/lib/mrtg

ThreshDir: /var/lib/mrtg

#####################################################

#moniting LAN interface

#####################################################

Target[eth1_lan]: /10.0.0.99:public@localhost:

Options[eth1_lan]: growright

Directory[eth1_lan]: eth1

MaxBytes[eth1_lan]: 100000000

Kmg[eth1_lan]: K,M,G

YLegend[eth1_lan]: Bytes per Second

ShortLegend[eth1_lan]: B/s

Legend1[eth1_lan]: 每秒流入量 (单位 Bytes)

Legend2[eth1_lan]: 每秒流出量 (单位 Bytes)

LegendI[eth1_lan]: 流入:

LegendO[eth1_lan]: 流出:

Title[eth1_lan]: eth1网络流量[流入+流出]

PageTop[eth1_lan]: <h1>eth1网络流量[流入+流出]</h1>

###################################################

#Moniting CPU Load[use+free]

###################################################

Target[cpuload]: .1.3.6.1.4.1.2021.11.50.0&.1.3.6.1.4.1.2021.11.53.0:public@localhost:

Options[cpuload]: nopercent,growright

Directory[cpuload]: cpu

MaxBytes[cpuload]: 100

Unscaled[cpuload]: dwym

YLegend[cpuload]: CPU Utilization

ShortLegend[cpuload]: %

Legend1[cpuload]: CPU使用负载(%)

Legend2[cpuload]: CPU闲置(%)

LegendI[cpuload]: 使用:

LegendO[cpuload]: 闲置:

Title[cpuload]: CPU负载[使用+闲置]

PageTop[cpuload]: <h1>CPU负载[使用+闲置]</h1>

###################################################

#Moniting Used memory and Swap [Mem+Swap] free -k

###################################################

Target[memory]: .1.3.6.1.2.1.25.2.3.1.6.1&.1.3.6.1.2.1.25.2.3.1.6.3:public@localhost:

Options[memory]: gauge,growright

Directory[memory]: mem

MaxBytes1[memory]: 327252

MaxBytes2[memory]: 1023992

#MaxBytesX[memory]: 1023992可多个,看情况

Kmg[memory]: K,M,G

Kilo[memory]: 1024

Unscaled[memory]: dwym

YLegend[memory]: Mem Bytes

ShortLegend[memory]: B

Legend1[memory]: 已用Mem(Bytes)

Legend2[memory]: 已用Swap(Bytes)

LegendI[memory]: 已用Mem :

LegendO[memory]: 已用Swap:

Title[memory]: 内存使用量[Mem+Swap]

PageTop[memory]: <h1>内存使用量[Mem+Swap]</h1>

###################################################

#Moniting disk size [/+/boot] df -k

###################################################

Target[disk]: .1.3.6.1.4.1.2021.9.1.8.1&.1.3.6.1.4.1.2021.9.1.8.2:public@localhost:

Options[disk]: gauge,growright

Directory[disk]: disk

MaxBytes1[disk]: 11087104

MaxBytes2[disk]: 495844

Kmg[disk]: K,M,G

Kilo[disk]: 1024

Unscaled[disk]: dwym

YLegend[disk]: Disk Bytes

ShortLegend[disk]: B

Legend1[disk]: 根分区已用空间

Legend2[disk]: boot分区已用空间

LegendI[disk]: 根分区已用 :

LegendO[disk]: boot分区已用:

Title[disk]: 硬盘空间[根分区+boot分区]

PageTop[disk]: <h1>硬盘空间[根分区+boot分区]</h1>

6、 cp /etc/cron.d/mrtg /etc/mrtg/

7、vi /etc/mrtg/mrtg,改为以下内容:

#!/bin/bash

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok

8、执行3次

/etc/mrtg/mrtg

/etc/mrtg/mrtg

/etc/mrtg/mrtg

9、执行

Indexmaker --output /var/www/mrtg/index.html –title=”System state Monitor” /etc/mrtg/mrtg.cfg

10、修改apache配置文件httpd.conf

Alias /mrtg "/var/www/mrtg"

<Directory "/var/www/mrtg">

Options indexes

AllowOverride None

Order deny,allow

Deny from all

Allow from all

</Directory>

11、重启httpd

12、访问http://localhost/mrtg/

13、如出现乱码,则改变编码

热点内容
最新eth分析今日 发布:2025-07-04 17:36:30 浏览:750
币圈高手怎么去称呼 发布:2025-07-04 17:21:31 浏览:529
支持比特币的银行卡 发布:2025-07-04 17:02:33 浏览:314
trx4攀爬视频 发布:2025-07-04 16:25:08 浏览:176
2018年币圈熊市是怎么开启的 发布:2025-07-04 16:19:17 浏览:331
区块链建设方案 发布:2025-07-04 16:02:54 浏览:773
你还想再错过币圈的游戏驿站么 发布:2025-07-04 15:59:27 浏览:680
数字货币委托价格小数错误 发布:2025-07-04 15:57:51 浏览:206
在韩国比特币最高价 发布:2025-07-04 15:35:59 浏览:275
以太坊挖矿能关机吗 发布:2025-07-04 15:25:26 浏览:604