當前位置:首頁 » 幣種行情 » 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-10-20 08:58:16 瀏覽:973
暗黑破壞神2eth打孔 發布:2025-10-20 08:42:58 瀏覽:105
BTC和CBT是一樣的嗎 發布:2025-10-20 08:42:57 瀏覽:233
華碩trx40Pro供電 發布:2025-10-20 08:33:26 瀏覽:432
曬人民幣編號的朋友圈 發布:2025-10-20 08:25:32 瀏覽:687
doge格式 發布:2025-10-20 08:02:00 瀏覽:382
以太坊會爆發嗎 發布:2025-10-20 08:01:59 瀏覽:772
一台比特幣礦機的功率 發布:2025-10-20 07:39:24 瀏覽:925
trx輔助帶 發布:2025-10-20 07:35:29 瀏覽:48
比特幣哈希值有多少位 發布:2025-10-20 07:31:20 瀏覽:633