[root@centos45 ~]# rpm -q net-snmp
package net-snmp is not installed [root@centos45 ~]# yum -y install mrtg Setting up Install Process Setting up repositories update 100% |=========================| 951 B 00:00 base 100% |=========================| 1.1 kB 00:00 addons 100% |=========================| 951 B 00:00 extras 100% |=========================| 1.1 kB 00:00 Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for mrtg to pack into transaction set. mrtg-2.10.15-1.i386.rpm 100% |=========================| 57 kB 00:02 ---> Package mrtg.i386 0:2.10.15-1 set to be updated --> Running transaction check Dependencies Resolved
=============================================================================
Package Arch Version Repository Size ============================================================================= Installing: mrtg i386 2.10.15-1 base 914 k Transaction Summary
============================================================================= Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 914 k Downloading Packages: (1/1): mrtg-2.10.15-1.i38 100% |=========================| 914 kB 01:55 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: mrtg ######################### [1/1] Installed: mrtg.i386 0:2.10.15-1
Complete! [root@centos45 ~]# rpm -q net-snmp package net-snmp is not installed [root@centos45 ~]# yum -y install net-snmp Setting up Install Process Setting up repositories Reading repository metadata in from local files Parsing package install arguments Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Downloading header for net-snmp to pack into transaction set. net-snmp-5.1.2-11.EL4.10. 100% |=========================| 35 kB 00:08 ---> Package net-snmp.i386 0:5.1.2-11.EL4.10 set to be updated --> Running transaction check --> Processing Dependency: libsensors.so.3 for package: net-snmp --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Downloading header for lm_sensors to pack into transaction set. lm_sensors-2.8.7-2.40.3.i 100% |=========================| 23 kB 00:01 ---> Package lm_sensors.i386 0:2.8.7-2.40.3 set to be updated --> Running transaction check Dependencies Resolved
=============================================================================
Package Arch Version Repository Size ============================================================================= Installing: net-snmp i386 5.1.2-11.EL4.10 base 504 k Installing for dependencies: lm_sensors i386 2.8.7-2.40.3 base 426 k Transaction Summary
============================================================================= Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 930 k Downloading Packages: (1/2): lm_sensors-2.8.7-2 100% |=========================| 426 kB 01:34 (2/2): net-snmp-5.1.2-11. 100% |=========================| 504 kB 02:27 Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: lm_sensors ######################### [1/2] Installing: net-snmp ######################### [2/2] Installed: net-snmp.i386 0:5.1.2-11.EL4.10
Dependency Installed: lm_sensors.i386 0:2.8.7-2.40.3 Complete! [root@centos45 ~]# vi /etc/snmp/snmpd.conf
[root@centos45 ~]# service snmpd restart
[root@centos45 ~]# chkconfig snmpd on [root@centos45 ~]# chkconfig --list | grep snmpd [root@centos45 ~]# vi /etc/mrtg/mrtg.connection
[root@centos45 ~]# vi /etc/mrtg/mrtg.cpu
[root@centos45 ~]# vi /etc/mrtg/mrtg.cpuio
[root@centos45 ~]# vi /etc/mrtg/mrtg.disk
[root@centos45 ~]# vi /etc/mrtg/mrtg.temper
[root@centos45 ~]# vi /etc/mrtg/mrtg.cfg
[root@centos45 ~]# cd /etc/mrtg [root@centos45 ~]# chmod 755 mrtg.* [root@centos45 ~]# vi /etc/cron.d/mrtg
*/5 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok [root@centos45 ~]# vi /etc/httpd/conf.d/mrtg.conf
[root@centos45 ~]# service httpd restart
[root@centos45 mrtg]# ll /var/www/mrtg/*.html
-rw-r--r-- 1 root root 56884 Feb 22 2005 /var/www/mrtg/cfgmaker.html -rw-r--r-- 1 root root 7967 Jun 26 13:15 /var/www/mrtg/cpu.html -rw-r--r-- 1 root root 7787 Jun 26 13:15 /var/www/mrtg/cpuio.html -rw-r--r-- 1 root root 8392 Jun 26 13:15 /var/www/mrtg/disk_data.html -rw-r--r-- 1 root root 8395 Jun 26 13:15 /var/www/mrtg/disk_root.html -rw-r--r-- 1 root root 7978 Jun 26 13:15 /var/www/mrtg/domain.html -rw-r--r-- 1 root root 7888 Jun 26 13:15 /var/www/mrtg/eth0.html -rw-r--r-- 1 root root 7848 Jun 26 13:15 /var/www/mrtg/eth1.html IE在地址输入: http://10.10.7.246/mrtg/cpu.html ..................................../cpuio.html disk_data.html disk_root.html eth0.html eth1.html
参考资料: |
|