How to install MRTG without SNMP
aptitude -y install mrtg mkdir /usr/local/bin/mrtgx/ vim /usr/local/bin/mrtgx/mem.sh#!/bin/sh USED=`free -b|grep cache:|cut -d : -f2|cut -c1-11` #FR..
Problem : MRTG Graph in DirectAdmin cp + CentOS
Solutions:
yum -y install gd gd-devel libpng libpng-devel zlib zlib-devel net-snmp net-snmp-utils mrtg
chkconfig snmpd on
cd /etc/snmp/
mv snmpd.conf snmpd.conf.bak
vim snmpd.conf
############
syslocation Thailand
syscontact admin
sysservices 79
rocommunity public localhost
agentaddress localhost
############
/etc/init.d/snmpd restart
snmpwalk -v1 -cpublic localhost
wget -O /var/www/mrtg/php.load.php www.icez.net/files/php.load.txt
chmod a+x /var/www/mrtg/php.load.php
vim /var/www/mrtg/php.load.php
#find "/usr/bin/php" replace to /usr/local/bin/php
cd /etc/mrtg
mv mrtg.cfg mrtg.cfg.bak
vim mrtg.cfg
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/share/snmp/mibs/TCP-MIB.txt,/usr/share/snmp/mibs/UDP-MIB.txt
WorkDir: /var/www/html/mrtg
Options[_]: growright
EnableIPv6: no
Target[server.traffic]: 2:public@localhost:
SetEnv[server.traffic]: MRTG_INT_IP="12.34.56.78" MRTG_INT_DESCR="eth0"
MaxBytes[server.traffic]: 125000000
Title[server.traffic]: Traffic Load
PageTop[server.traffic]: <h1>Traffic Load</h1>
Options[server.traffic]: growright, bits
### Cpu Load ###
Target[cpu]: .1.3.6.1.4.1.2021.10.1.5.1&.1.3.6.1.4.1.2021.10.1.5.2:public@localhost
MaxBytes[cpu]: 100
Unscaled[cpu]: dwmy
Options[cpu]: gauge, absolute, growright, noinfo, nopercent
YLegend[cpu]: CPU Load(%)
ShortLegend[cpu]: (%)
LegendI[cpu]: CPU System
LegendO[cpu]: CPU User
Title[cpu]: CPU Analysis
PageTop[cpu]: <H1>CPU Analysis</H1>
### Memory Free ###
Target[mem]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.4.0:public@localhost
MaxBytes1[mem]: 2230288
MaxBytes2[mem]: 2252216
Unscaled[mem]: dwmy
Options[mem]: gauge, absolute, growright, noinfo
YLegend[mem]: Memory Free
ShortLegend[mem]: Bytes
kilo[mem]: 1024
kMG[mem]: k,M
LegendI[mem]: Real
LegendO[mem]: Swap
Legend1[mem]: (MBytes)
Legend2[mem]: (MBytes)
Title[mem]: Memory Analysis
PageTop[mem]: <H1>Memory Analysis</H1>
### CPU Load Average ###
Target[public.load]: `/var/www/mrtg/php.load.php`
Title[public.load]: Server load average
PageTop[public.load]: <H1>Server load average</H1>
MaxBytes[public.load]: 10000
ShortLegend[public.load]:
YLegend[public.load]:
LegendI[public.load]: cnt
LegendO[public.load]: cnt
Legend1[public.load]: Count
Legend2[public.load]: Count
Options[public.load]: gauge,growright,nopercent
### New TCP Connection Monitoring (per minute) ###
Target[server.newconns]: tcpPassiveOpens.0&tcpActiveOpens.0:public@localhost
Title[server.newconns]: Newly Created TCP Connections
PageTop[server.newconns]: <H1>New TCP Connections</H1>
MaxBytes[server.newconns]: 10000000000
ShortLegend[server.newconns]: c/s
YLegend[server.newconns]: Conns / Min
LegendI[server.newconns]: In
LegendO[server.newconns]: Out
Legend1[server.newconns]: New inbound connections
Legend2[server.newconns]: New outbound connections
Options[server.newconns]: growright,nopercent,perminute
### Established TCP Connections ###
Target[server.estabcons]: tcpCurrEstab.0&tcpCurrEstab.0:public@localhost
Title[server.estabcons]: Currently Established TCP Connections
PageTop[server.estabcons]: <H1>Established TCP Connections</H1>
MaxBytes[server.estabcons]: 10000000000
ShortLegend[server.estabcons]:
YLegend[server.estabcons]: Connections
LegendI[server.estabcons]: In
LegendO[server.estabcons]:
Legend1[server.estabcons]: Established connections
Legend2[server.estabcons]:
Options[server.estabcons]: growright,nopercent,gauge
mkdir /var/www/html/mrtg
indexmaker --columns=2 --output=/var/www/html/mrtg/index.html /etc/mrtg/mrtg.cfg
recheck http://ip/mrtg
wait 5-10 m.
September 30, 2009
Blog | #CentOS #Command #DirectAdmin #MRTG
aptitude -y install mrtg mkdir /usr/local/bin/mrtgx/ vim /usr/local/bin/mrtgx/mem.sh#!/bin/sh USED=`free -b|grep cache:|cut -d : -f2|cut -c1-11` #FR..
#1. Get Xcache 1.3.2 (lated Release : xcache.lighttpd.net/pub/Releases) cd /tmp wget http://xcache.lighttpd.net/pub/Releases/1.3.2/xcache-1.3.2.tar.gz..
#1. Install file module (PHP 5.2.x) cd /tmp/ wget http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz tar xvfz Z..
#1. Install file module cd /tmp/ wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz tar xvfz ioncube_loaders_lin_x8..
#1. Install library libevent cd /tmp #wget http://monkey.org/~provos/libevent-1.4.13-stable.tar.gz #tar xzvf libevent-1.4.13-stable.tar.gz #cd libev..
mod_ruid จัดการให้ php-cli ไม่ต้องมา chmod 777 เองให้วุ่นวาย ฟีลเหมือนใช้โฮส cPanel install mod_ruid2 cd /tmp apt-get update aptitude install libcap2-..