α | ȸ | | Ʈ

  • Ʈ
  • SMS
  • MRTG
  • Ʈ
  • ACL
HOME > >
| ¼ҽ õ ¸ ֽϴ.
 
MRTG ƮȺм (6. MRTGġ)
ȸ : 4,299  


 1. Ǯ

 

[root@kebia_2 local]#

[root@kebia_2 local]# gunzip mrtg-2.9.17.tar.gz

[root@kebia_2 local]#

[root@kebia_2 local]#

2. tarǮ_1

 

[root@kebia_2 local]# tar xvfp mrtg-2.9.17.tar

mrtg-2.9.17/ANNOUNCE

mrtg-2.9.17/THANKS


3. configure

 

[root@kebia_2 mrtg-2.9.17]# ./configure --with-gd=/usr/local/gd --with-z=/usr/local/zlib --with-png=/usr/local/libpng


4. (make)

 

[root@kebia_2 mrtg-2.9.17]# make

LD_RUN_PATH=/usr/local/libpng:/usr/local/zlib:/usr/local/gd gcc -I/usr/local/gd -I/usr/local/zlib -I/usr/local/libpng -DGFORM_GD=gdImagePng -g -O2 src/rateup.c -L/usr/local/gd -lgd -L/usr/local/zlib -L/usr/local/libpng -lm -lpng -lz  -lm -o bin/rateup


5. mrtg

 

ʿ ƴϸ, ڴ mrtg Ʈ ϱ .

 

 

[root@kebia_2 bin]# useradd mrtg

[root@kebia_2 bin]#

[root@kebia_2 bin]#

[root@kebia_2 bin]# passwd mrtg

Changing password for user mrtg

New UNIX password:

Retype new UNIX password:

passwd: all authentication tokens updated successfully

[root@kebia_2 bin]#

[root@kebia_2 bin]# cd /home/

[root@kebia_2 /home]# ls -l

total 36

drwx------    2 han1380  han1380      4096 Jul  2 17:19 han1380

drwx------    2 han1380  han1380      4096 Jun  4 21:11 jungwood

drwxr-xr-x    2 root     root        16384 Mar 13 02:25 lost+found

drwx------    2 mrtg     mrtg         4096 Jul 21 20:26 mrtg

drwx------    3 papa     papa         4096 Apr  5 22:46 papa

drwx------   12 sspark   sspark       4096 Jul 21 20:13 sspark

[root@kebia_2 /home]#

[root@kebia_2 /home]#

[root@kebia_2 /home]# chmod 701 mrtg

[root@kebia_2 /home]# ls -l

total 36

drwx------    2 han1380  han1380      4096 Jul  2 17:19 han1380

drwx------    2 han1380  han1380      4096 Jun  4 21:11 jungwood

drwxr-xr-x    2 root     root        16384 Mar 13 02:25 lost+found

drwx-----x    2 mrtg     mrtg         4096 Jul 21 20:26 mrtg

drwx------    3 papa     papa         4096 Apr  5 22:46 papa

drwx------   12 sspark   sspark       4096 Jul 21 20:13 sspark

[root@kebia_2 /home]#

[root@kebia_2 /home]# cd mrtg

[root@kebia_2 mrtg]# mkdir www

[root@kebia_2 mrtg]# cd ..

[root@kebia_2 /home]#

[root@kebia_2 /home]#

[root@kebia_2 /home]# chown -R mrtg:mrtg mrtg

[root@kebia_2 /home]#

[root@kebia_2 /home]#

[root@kebia_2 /home]# cd /usr/local/mrtg-2.9.17

[root@kebia_2 mrtg-2.9.17]#

[root@kebia_2 mrtg-2.9.17]#

[root@kebia_2 mrtg-2.9.17]# cd bin

[root@kebia_2 bin]#

[root@kebia_2 bin]#

[root@kebia_2 bin]# ls -l

total 260

-rwxr-xr-x    1 510      ftp         73110 Jul 21 20:24 cfgmaker

-rwxr-xr-x    1 510      ftp         15817 Jul 21 20:24 indexmaker

-rwxr-xr-x    1 510      ftp         62449 Jul 21 20:24 mrtg

-rwxr-xr-x    1 root     root        94508 Jul 21 20:24 rateup

[root@kebia_2 bin]#

[root@kebia_2 bin]#

[root@kebia_2 bin]# mkdir /home/mrtg/conf

[root@kebia_2 bin]# chown -R mrtg:mrtg /home/mrtg

[root@kebia_2 bin]#

[root@kebia_2 bin]#

[root@kebia_2 bin]# /etc/rc.d/init.d/snmpd start

Starting snmpd:                                            [  OK  ]

[root@kebia_2 bin]#

[root@kebia_2 bin]#


6. cfgϻ ۾

[root@kebia_2 bin]# ./cfgmaker --global 'WorkDir: /home/mrtg/www' --global 'Options[_]: bits,growright' --output /home/mrtg/conf/kebia_2.cfg public@211.220.193.182

--base: Get Device Info on public@211.220.193.182:

--base: Vendor Id:

--base: Populating confcache

--snpo: Skipping ifName scanning because public@211.220.193.182: does not seem to support it

--snpo: confcache public@211.220.193.182: Descr lo0 --> 1

--snpo: confcache public@211.220.193.182: Descr eth0 --> 2

--snpo: confcache public@211.220.193.182: Ip 127.0.0.1 --> 1

--snpo: confcache public@211.220.193.182: Ip 211.220.193.182 --> 2

--snpo: confcache public@211.220.193.182: Type 24 --> 1

--snpo: confcache public@211.220.193.182: Type 6 --> 2

--snpo: confcache public@211.220.193.182: Eth  --> 1

--snpo: confcache public@211.220.193.182: Eth 00-d0-b7-a7-54-96 --> 2

--base: Get Interface Info

--base: Walking ifIndex

--base: Walking ifType

--base: Walking ifSpeed

--base: Walking ifAdminStatus

--base: Walking ifOperStatus

--base: Writing /home/mrtg/conf/kebia_2.cfg

[root@kebia_2 bin]#

[root@kebia_2 bin]#

[root@kebia_2 bin]#

[root@kebia_2 bin]#


7. perl ġ ġȮ

 

[root@kebia_2 bin]# which perl

/usr/bin/perl

[root@kebia_2 bin]#

[root@kebia_2 bin]#

[root@kebia_2 bin]#  ls -l

total 260

-rwxr-xr-x    1 510      ftp         73110 Jul 21 20:24 cfgmaker

-rwxr-xr-x    1 510      ftp         15817 Jul 21 20:24 indexmaker

-rwxr-xr-x    1 510      ftp         62449 Jul 21 20:24 mrtg

-rwxr-xr-x    1 root     root        94508 Jul 21 20:24 rateup

[root@kebia_2 bin]#

[root@kebia_2 bin]#

[root@kebia_2 bin]# vi mrtg

#! /usr/bin/perl

# -*- mode: Perl -*-

 

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

# MRTG 2.9.17  Multi Router Traffic Grapher

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

# Created by Tobias Oetiker <oetiker@ee.ethz.ch>

#            and Dave Rand <dlr@bungi.com>

#

# For individual Contributers check the CHANGES file

#

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

#

# Distributed under the GNU General Public License

#

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

 

@main::DEBUG=qw();

# DEBUG TARGETS

# cfg  - watch the config file reading

# dir  - directory mangeling

# base - basic program flow

# tarp - target parser

# snpo - snmp polling

# fork - forking view

# time - some timing info

# log  - logging of data via rateup or rrdtool

$main::GRAPHFMT="png";

# There older perls tend to behave peculiar with

# large integers ...

[root@kebia_2 bin]#


8. mrtg ׽Ʈ

 

mrtg ó ϸ Ʒ warning µ,

̴ ִ ġ ʱ ̸,

Ʒ ݺϴٺ, ڿ warning .

 

[root@kebia_2 bin]# ./mrtg /home/mrtg/conf/kebia_2.cfg

Rateup WARNING: /usr/local/mrtg-2.9.17/bin/rateup could not read the primary log file for 211.220.193.182_2

Rateup WARNING: /usr/local/mrtg-2.9.17/bin/rateup The backup log file for 211.220.193.182_2 was invalid as well

Rateup WARNING: /usr/local/mrtg-2.9.17/bin/rateup Can't remove 211.220.193.182_2.old updating log file

Rateup WARNING: /usr/local/mrtg-2.9.17/bin/rateup Can't rename 211.220.193.182_2.log to 211.220.193.182_2.old updating log file

[root@kebia_2 bin]# ./mrtg /home/mrtg/conf/kebia_2.cfg

Rateup WARNING: /usr/local/mrtg-2.9.17/bin/rateup Can't remove 211.220.193.182_2.old updating log file

[root@kebia_2 bin]# ./mrtg /home/mrtg/conf/kebia_2.cfg

[root@kebia_2 bin]# ./mrtg /home/mrtg/conf/kebia_2.cfg

[root@kebia_2 bin]# ./mrtg /home/mrtg/conf/kebia_2.cfg

[root@kebia_2 bin]# ./mrtg /home/mrtg/conf/kebia_2.cfg

[root@kebia_2 bin]# ./mrtg /home/mrtg/conf/kebia_2.cfg

[root@kebia_2 bin]# ./mrtg /home/mrtg/conf/kebia_2.cfg


9. Ȯ

[root@kebia_2 bin]# cd /home/mrtg/www

[root@kebia_2 www]# ls -l

total 120

-rw-r--r--    1 root     root         1416 Jul 21 20:36 211.220.193.182_2-day.png

-rw-r--r--    1 root     root         1395 Jul 21 20:36 211.220.193.182_2-month.png

-rw-r--r--    1 root     root         1446 Jul 21 20:36 211.220.193.182_2-week.png

-rw-r--r--    1 root     root         1743 Jul 21 20:36 211.220.193.182_2-year.png

-rw-r--r--    1 root     root         8167 Jul 21 20:36 211.220.193.182_2.html

-rw-r--r--    1 root     root        45694 Jul 21 20:36 211.220.193.182_2.log

-rw-r--r--    1 root     root        45694 Jul 21 20:36 211.220.193.182_2.old

[root@kebia_2 www]#

[root@kebia_2 www]#

[root@kebia_2 www]#

[root@kebia_2 www]#

[root@kebia_2 www]# cd /usr/local

[root@kebia_2 local]# ls -l

total 45368

drwxr-xr-x   13 1134     1134         4096 Jun 17 01:08 apache

-rw-r--r--    1 sspark   sspark    1984399 Jun 16 23:58 apache_1.3.20.tar.gz

drwxr-xr-x    2 root     root         4096 Jul 21 20:15 bin

drwxr-xr-x    2 root     root         4096 Feb  7  1996 doc

drwxr-xr-x    2 root     root         4096 Feb  7  1996 etc

drwxr-xr-x    8 101      110          4096 Jun 17 00:50 freetype-1.2

-rw-r--r--    1 sspark   sspark    3440640 Jun 17 00:39 freetype-1.2.tar

drwxr-xr-x    2 root     root         4096 Feb  7  1996 games

-rw-r--r--    1 sspark   sspark    1013760 Jul 21 20:12 gd-1.8.4.tar

drwxr--r--    3 200      users        4096 Jun 17 00:41 gd1.5

-rw-r--r--    1 sspark   sspark     829440 Jun 17 00:39 gd1_5.tar

drwxr-xr-x    3 root     root         4096 Jul 21 20:15 include

drwxr-xr-x    2 root     root         4096 Feb  7  1996 info

drwxr-xr-x    3 root     root         4096 Jul 21 20:01 lib

-rw-r--r--    1 sspark   sspark    2457600 Jul 21 19:36 libpng-1.0.8.tar

drwxr-xr-x   12 root     root         4096 Mar 12 17:39 man

drwxr-xr-x   12 root     root         4096 Jul 21 20:23 mrtg-2.9.17

-rw-r--r--    1 sspark   sspark    4075520 Jul 21 19:30 mrtg-2.9.17.tar

drwxr-xr-x   11 root     root         4096 Jun 17 00:11 mysql

drwxrwxrwx   21 510      101          4096 Jun 17 00:05 mysql-3.22.24

-rw-r--r--    1 sspark   sspark   18042880 Jun 16 23:54 mysql-3.22.24.tar

drwxr-xr-x   16 510      users        4096 Jun 17 01:06 php-4.0.4pl1

-rw-r--r--    1 sspark   sspark   13701120 Jun 16 23:55 php-4.0.4pl1.tar

drwxr-xr-x    2 root     root         4096 Feb  7  1996 sbin

drwxr-xr-x    3 root     root         4096 Jun 17 00:55 share

drwxr-xr-x    2 root     root         4096 Feb  7  1996 src

-rw-r--r--    1 root     root       757760 Jul 21 19:51 zlib.tar

[root@kebia_2 local]#

[root@kebia_2 local]#

[root@kebia_2 local]# mv mrtg-2.9.17 mrtg

[root@kebia_2 local]#


10. cron

 

[root@kebia_2 local]# crontab -e

no crontab for root - using an empty one

0,5,10,15,20,25,30,35,40,45,50,55 * * * *  /usr/local/mrtg/bin/mrtg /home/mrtg/conf/kebia_2.cfg

~

~

~

~

~

~

~

"crontab.15329" 1L, 96C written

crontab: installing new crontab

[root@kebia_2 local]#

[root@kebia_2 local]#

[root@kebia_2 local]#

[root@kebia_2 local]# crontab -l

# DO NOT EDIT THIS FILE - edit the master and reinstall.

# (/tmp/crontab.15329 installed on Sat Jul 21 20:40:34 2001)

# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)

0,5,10,15,20,25,30,35,40,45,50,55 * * * *  /usr/local/mrtg/bin/mrtg /home/mrtg/conf/kebia_2.cfg

[root@kebia_2 local]#

[root@kebia_2 local]#

[root@kebia_2 local]#

[root@kebia_2 local]#

[root@kebia_2 local]# cd /etc/rc.d/init.d

[root@kebia_2 init.d]# ls -l

total 168

-rwxr-xr-x    1 root     root          798 Aug  4  2000 anacron

-rwxr-xr-x    1 root     root         1289 Aug 17  2000 apmd

-rwxr-xr-x    1 root     root          908 Aug 12  2000 arpwatch

-rwxr-xr-x    1 root     root         1171 Aug 24  2000 atd

-rwxr-xr-x    1 root     root         1304 Aug 25  2000 crond

-rwxr-xr-x    1 root     root         7663 Aug 22  2000 functions

-rwxr-xr-x    1 root     root         1390 Jul 28  2000 gpm

-rwxr-xr-x    1 root     root         3388 Aug  3  2000 halt

-rwxr-xr-x    1 root     root         1382 Jul 21  2000 identd

-rwxr-xr-x    1 root     root         2737 Aug 18  2000 ipchains

-rwxr-xr-x    1 root     root         1084 Aug 17  2000 kdcrotate

-rwxr-xr-x    1 root     root         1298 Aug 28  2000 keytable

-rwxr-xr-x    1 root     root          434 Jul 25  2000 killall

-rwxr-xr-x    1 root     root         1427 Aug 31  2000 kudzu

-rwxr-xr-x    1 root     root          609 Aug 24  2000 linuxconf

-rwxr-xr-x    1 root     root         2272 Aug 15  2000 lpd

-rwxr-xr-x    1 root     root         1573 Aug  6  2000 named

-rwxr-xr-x    1 root     root         3360 Aug 23  2000 netfs

-rwxr-xr-x    1 root     root         5812 Aug  7  2000 network

-rwxr-xr-x    1 root     root         2257 Aug  3  2000 nfs

-rwxr-xr-x    1 root     root         1722 Aug  3<


[۸ũ] : https://www.linux.co.kr/home2/board/subbs/board.php?bo_table=lecture&wr_id=542


  Ʈͷ   ̽   ̷

 
()