BLOG main image
Their Finest Hour! Since1999..

카테고리

분류 전체보기 (934)
My Page (47)
Linux/Unix (604)
Windows (219)
Database (61)
Programming (1)
Network (0)
ScreenShot (1)
Tip (1)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

음 다람쥐 메일을 가지고 왔습니다
http://www.squirrelmail.org
imap 를 이용한 꾀 좋은 웹메일입니다
자세히 설명 못드린점 죄송하구요
보안에 조금 문제가는 것도 있는 데
일단 설치 해보시라는 맘에서 테스트 했구요

[root@ns test]# tar xvfz squirrelmail-1.4.5.tar.tar
[root@ns test]# ll
합계 596
drwxr-xr-x 3 rmcobol rmcobol 4096 8월 31 23:46 ./
drwxr-xrwx 22 rmcobol rmcobol 4096 8월 31 23:36 ../
drwxr-xr-x 16 1000 users 4096 7월 14 03:45 squirrelmail-1.4.5/
-rw-r--r-- 1 rmcobol rmcobol 591226 8월 28 14:05 squirrelmail-1.4.5.tar.tar
[root@ns test]# mv squirrelmail-1.4.5 mail
[root@ns test]# ll
합계 596
drwxr-xr-x 3 rmcobol rmcobol 4096 8월 31 23:46 ./
drwxr-xrwx 22 rmcobol rmcobol 4096 8월 31 23:36 ../
drwxr-xr-x 16 1000 users 4096 7월 14 03:45 mail/
-rw-r--r-- 1 rmcobol rmcobol 591226 8월 28 14:05 squirrelmail-1.4.5.tar.tar
[root@ns test]# chown rmcobol:rmcobol -R mail/
[root@ns test]# mv mail/ /home/rmcobol/html/
[root@ns test]# cd /home/rmcobol/html/mail
[root@ns mail]# ll
합계 192
drwxr-xr-x 16 rmcobol rmcobol 4096 7월 14 03:45 ./
drwxr-xrwx 21 rmcobol rmcobol 4096 8월 31 23:50 ../
-rw-r--r-- 1 rmcobol rmcobol 7896 6월 8 00:42 AUTHORS
-rw-r--r-- 1 rmcobol rmcobol 15129 6월 16 09:22 COPYING
-rw-r--r-- 1 rmcobol rmcobol 60753 7월 14 03:37 ChangeLog
-rw-r--r-- 1 rmcobol rmcobol 8622 6월 5 00:50 INSTALL
-rw-r--r-- 1 rmcobol rmcobol 2637 6월 27 2004 README
-rw-r--r-- 1 rmcobol rmcobol 4382 7월 14 03:37 ReleaseNotes
-rw-r--r-- 1 rmcobol rmcobol 4733 5월 30 19:07 UPGRADE
drwxr-xr-x 5 rmcobol rmcobol 4096 7월 14 03:45 class/
drwxrwxr-x 2 rmcobol rmcobol 4096 8월 28 14:08 config/
-rwxr-xr-x 1 rmcobol rmcobol 92 12월 27 2001 configure*
drwxr-xr-x 3 rmcobol rmcobol 4096 7월 14 03:45 contrib/
drwxrwxr-x 2 rmcobol rmcobol 4096 7월 14 03:45 data/
drwxr-xr-x 4 rmcobol rmcobol 4096 7월 14 03:45 doc/
drwxr-xr-x 4 rmcobol rmcobol 4096 7월 14 03:45 functions/
drwxr-xr-x 3 rmcobol rmcobol 4096 7월 14 03:45 help/
drwxr-xr-x 2 rmcobol rmcobol 4096 7월 14 03:45 images/
drwxr-xr-x 3 rmcobol rmcobol 4096 7월 14 03:45 include/
-rw-r--r-- 1 rmcobol rmcobol 661 2월 12 2005 index.php
drwxr-xr-x 5 rmcobol rmcobol 4096 8월 28 15:30 locale/
drwxr-xr-x 18 rmcobol rmcobol 4096 7월 14 03:45 plugins/
drwxr-xr-x 2 rmcobol rmcobol 4096 7월 14 03:45 po/
drwxr-xr-x 2 rmcobol rmcobol 4096 7월 14 03:45 src/
drwxr-xr-x 3 rmcobol rmcobol 4096 7월 14 03:45 themes/
[root@ns mail]# ./configure
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C Turn color off
S Save data
Q Quit

[1]
Organization Preferences
1. Organization Name : 짠돌이넷
2. Organization Logo : ../images/sm_logo.png
3. Org. Logo Width/Height : (308/111)
4. Organization Title : SquirrelMail $version
5. Signout Page :
6. Top Frame : _top
7. Provider link : www.xxxxx.co.kr
8. Provider name : 스펨메일

R Return to Main Menu
C Turn color off
S Save data
Q Quit
[2]
1. Domain : xxxxx.co.kr
2. Invert Time : false
3. Sendmail or SMTP : SMTP

A. Update IMAP Settings : localhost:143 (other)
B. Update SMTP Settings : localhost:25

R Return to Main Menu
C Turn color off
S Save data
Q Quit
[3]
Folder Defaults
1. Default Folder Prefix :
2. Show Folder Prefix Option : false
3. Trash Folder : INBOX.Trash
4. Sent Folder : INBOX.Sent
5. Drafts Folder : INBOX.Drafts
6. By default, move to trash : true
7. By default, move to sent : true
8. By default, save as draft : true
9. List Special Folders First : true
10. Show Special Folders Color : true
11. Auto Expunge : true
12. Default Sub. of INBOX : true
13. Show 'Contain Sub.' Option : false
14. Default Unseen Notify : 2
15. Default Unseen Type : 1
16. Auto Create Special Folders : true
17. Folder Delete Bypasses Trash : false
18. Enable /NoSelect folder fix : false

R Return to Main Menu
C Turn color off
S Save data
Q Quit
[4]
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
General Options
1. Data Directory : /var/spool/data/ touch로 data생성
2. Attachment Directory : /var/spool/attach/ touch로 attach생성
3. Directory Hash Level : 0
4. Default Left Size : 150
5. Usernames in Lowercase : false
6. Allow use of priority : true
7. Hide SM attributions : false
8. Allow use of receipts : true
9. Allow editing of identity : true
Allow editing of name : true
Remove username from header : false
10. Allow server thread sort : false
11. Allow server-side sorting : false
12. Allow server charset search : true
13. Enable UID support : true
14. PHP session name : SQMSESSID

R Return to Main Menu
C Turn color off
S Save data
Q Quit

[root@ns spool]# ll
합계 32
drwxr-xr-x 8 root root 4096 8월 28 14:30 ./
drwxr-xr-x 16 root root 4096 8월 30 23:17 ../
drwxrwxrwx 2 root root 4096 8월 28 14:30 attach/ 777 생성
drwxrwx--- 2 mail mail 4096 9월 1 00:00 clientmqueue/
drwx------ 2 root root 4096 8월 6 22:02 cron/
drwxrwxrwx 2 root root 4096 8월 31 23:44 data/ 777 생성
drwxrwxr-x 2 root mail 4096 9월 1 00:00 mail/
drwxr-xr-x 8 root mail 4096 4월 4 14:21 mqueue/

아래 data 디렉토리에 생기네요 이부분은 만지지 않으셔도 되요
[root@ns spool]$ cd data/
[root@ns spool]$ ll
합계 16
drwxrwxrwx 2 root root 4096 8월 31 23:44 ./
drwxr-xr-x 8 root root 4096 8월 28 14:30 ../
-rw-r--r-- 1 apache apache 0 8월 31 00:51 xxxxx.abook
-rw------- 1 apache apache 375 8월 31 23:44 xxxxx.pref
-rw-r--r-- 1 apache apache 0 8월 28 14:46 rmcobol.abook
-rw------- 1 apache apache 104 8월 31 23:40 rmcobol.pref

[10]
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Language preferences
1. Default Language : ko_KR <--이건 확장펙설치요
2. Default Charset : EUC_KR
3. Enable lossy encoding : false

R Return to Main Menu
C Turn color off
S Save data
Q Quit
Command >> s 저장
Command >> q 종료
Exiting conf.pl.
You might want to test your configuration by browsing to
http://your-squirrelmail-location/src/configtest.php
Happy SquirrelMailing!

[root@ns mail]# cd locale/
[root@ns locale]# ll
합계 152
drwxr-xr-x 5 rmcobol rmcobol 4096 8월 28 15:30 ./
drwxr-xr-x 16 rmcobol rmcobol 4096 7월 14 03:45 ../
-rw-r--r-- 1 rmcobol rmcobol 15131 1월 4 2005 COPYING.locales
-rw-r--r-- 1 rmcobol rmcobol 6544 7월 13 18:35 ChangeLog.locales
-rw-r--r-- 1 rmcobol rmcobol 2153 7월 1 2004 README.locales
-rw-r--r-- 1 rmcobol rmcobol 2128 7월 13 18:53 ReleaseNotes.locales
drwxr-xr-x 3 rmcobol rmcobol 4096 8월 28 15:24 help/
drwxr-xr-x 2 rmcobol rmcobol 4096 8월 28 15:24 images/
-rw-r--r-- 1 rmcobol rmcobol 473 12월 30 2004 index.php
-rwxr-xr-x 1 rmcobol rmcobol 221 3월 5 2004 install*

drwxrwxrwx 3 rmcobol rmcobol 4096 8월 28 15:24 ko_KR/
<--위 확장펙 아래거 받아서 풀고요 위 언어부분 그대로 적어주세요
-rw-r--r-- 1 rmcobol rmcobol 77047 8월 28 15:23 ko_KR-1.4.5-20050713.tar.gz
이 확장펙을 설치 하는 거여요 위 보시면 표시한거요 압축풀기요
-rw-r--r-- 1 rmcobol rmcobol 7861 3월 30 2002 timezones.cfg
-rw-r--r-- 1 rmcobol rmcobol 43 7월 13 18:35 version


[root@ns conf]# vi httpd.conf

# 한다.
#
Alias /icons/ "/home/httpd/icons/"


Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all


# 앨리어스 mysql
Alias /mysql "/web/home/rmcobol/html/mysql/"


Options Indexes
AllowOverride None
Order allow,deny
Allow from all


Alias /mail "/web/home/rmcobol/html/mail/"


Options Indexes
AllowOverride None
Order allow,deny
Allow from all


계정 : wwww.co.kr/mail
ccccc.com/mail 하시면 다람쥐메일로 가겠지요
확장펙은 찻아보세요 저도 지금 잠이 와서 어딘지 모르겠거든요
Posted by 채종윤
쿼터 설정 입니다
음 안녕 1.2기준입니다
메일은 계정단 5M
홈계정은 200M 이런거 보셨죠
이게 바로 쿼터입니다

[root@ns root]# cat /etc/fstab
/dev/hda1 / ext3 defaults,noatime 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults,noatime 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb3 /usr ext3 defaults,noatime 1 2
/dev/hdb5 /usr/local ext3 defaults,noatime 1 2
/dev/hda2 /var ext3 defaults,usrquota 1 2
/dev/hdb2 /var/log ext3 defaults,noatime 1 2
/dev/hdb1 /web ext3 defaults,noatime 1 2
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
[root@ns root]#

[root@ns root]# vi /etc/fstab
/dev/hda1 / ext3 defaults,noatime 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults,noatime 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb3 /usr ext3 defaults,noatime 1 2
/dev/hdb5 /usr/local ext3 defaults,noatime 1 2
/dev/hda2 /var ext3 defaults,usrquota 1 2
/dev/hdb2 /var/log ext3 defaults,noatime 1 2
/dev/hdb1 /web ext3 defaults,usrquota 1 2
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0

[var] /dev/hda2 /var ext3 defaults,usrquota 1 2
[web] /dev/hdb1 /web ext3 defaults,usrquota 1 2
잘보세요 usrquota 철자 주의 틀리면 골때리는 문제 발생한담니다
책보면 그렇게 써서 저도 모르겠는 데 아마 그렇겠죠

[root@ns root]# touch /web/quota.user
[root@ns root]# chmod 600 /web/quota.user
[root@ns root]# reboot


[root@ns web]# quotacheck -a -m

음 처음 설치시 쿼터 데이터 베이스 점검및 갱신이래요
했든 뭐라고 나옵니다
처음 적용시 하시고요

아래는 2번째 부터 쿼터 적용시 점검시 사용하세요
[root@ns web]# quotacheck -a -m -f
quotacheck: WARNING - Quotafile /web/quota.user was probably truncated. Can't save
quota settings...
이건 지금 제가 /var /web를 2개 쿼터 적용해서
2번째 이렇게 하면 될것입니다
모르겠거든요 했든 .....

[root@ns web]# ll
합계 24
drwx-----x 4 root root 4096 9월 1 00:35 ./
drwx--x--x 18 root root 4096 9월 1 00:32 ../
drwx-----x 4 root root 4096 8월 28 13:24 home/
drwx-----x 2 root root 4096 8월 27 20:30 home2/
-rw------- 1 root root 16224 9월 1 00:35 quota.user
[root@ns web]# convertquota /web
이건 2.4.XX커널를 위한 데이터 베이스 생성이래요
아래 보시면 파일 하나생성 되었을 것입니다
[root@ns web]# ll
합계 32
drwx-----x 4 root root 4096 9월 1 00:35 ./
drwx--x--x 18 root root 4096 9월 1 00:32 ../
-rw------- 1 root root 7168 9월 1 00:35 aquota.user
drwx-----x 4 root root 4096 8월 28 13:24 home/
drwx-----x 2 root root 4096 8월 27 20:30 home2/
-rw------- 1 root root 16224 9월 1 00:35 quota.user

[root@ns web]# edquota rmcobol 음 사용자 쿼터 적용입다
Disk quotas for user rmcobol (uid 505):
Filesystem blocks soft hard inodes
soft hard
/dev/hda2 16 20 20 1
0 0
/dev/hdb1 37764 400000 400000 2429
0 0

위 보시면 /hda2 - 이건 메일 쿼터 고요
/hdb1 - 홈 계정 쿼터여요
히히 저는 처음 잘 몰라서 아래로 쭉 사용자를 쓸려구 했는 데
[root@ns web]# edquota <사용자> 이런식으로 사용하시면 돼요 ^^
[root@ns web]# edquota rmcobol 이래하면 위처럼 나오거든요 그럼 용량입력하세요
kbyte 기준이닌까 400000 / 1000 = 400M 가 인가요 1Mbyte 1000 kbyte
블럭이 용량이어요[계정용량 100M~50M]이런거요 저쪽건 볼필요 없구요
[root@ns web]# edquota webmail
Disk quotas for user webmail (uid 506):
Filesystem blocks soft hard inodes
soft hard
/dev/hda2 12 20 20 1
0 0
/dev/hdb1 141452 250000 250000 1128
0 0

[root@ns web]# quotaon /web 쿼터 적용해제 그런거죠
[root@ns web]# quotaoff /web

[root@ns web]# repquota -a
*** Report for user quotas on device /dev/hda2
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 22964 0 0 1013 0 0
mail -- 56 0 0 14 0 0
rpm -- 8528 0 0 14 0 0
pcap -- 264 0 0 15 0 0
apache -- 48 0 0 11 0 0
mysql -- 6028 0 0 189 0 0
named -- 92 0 0 24 0 0
rmcobol -- 16 20 20 1 0 0
webmail -- 12 20 20 1 0 0


*** Report for user quotas on device /dev/hdb1
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 4460 0 0 14 0 0
rmcobol -- 37764 50000 50000 2429 0 0
webmail -- 141452 250000 250000 1128 0 0
#500 -- 13700 0 0 21 0 0
#501 -- 1428 0 0 3 0 0


음 여기서 1k byte 1000 이닌까요 250,000 / 1000 = 250 M
50000 / 1000 = 50 M
이런식으로 주시면 됩니다

[root@ns web]# repquota -a
*** Report for user quotas on device /dev/hda2
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 23020 0 0 1027 0 0
mail -- 56 0 0 14 0 0
rpm -- 8528 0 0 14 0 0
pcap -- 264 0 0 15 0 0
apache -- 48 0 0 11 0 0
mysql -- 6028 0 0 189 0 0
named -- 92 0 0 24 0 0
rmcobol -- 16 20 20 1 0 0
webmail -- 12 20 20 1 0 0


*** Report for user quotas on device /dev/hdb1
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 4476 0 0 15 0 0
rmcobol -- 50000 50000 50000 7days 2445 0 0
제가 테스트 했거든요 음 50 이상 자료 업하려니 안되더라구요
이유야 길죠 ^^ soft , hard 이건 아시죠
webmail -- 141452 250000 250000 1128 0 0
#500 -- 13700 0 0 21 0 0
#501 -- 1428 0 0 3 0 0

이로써 메일 쿼터랑 홈계정 쿼터를 배웠습니다
정균님 강좌 참조하세요
http://www.oops.org/?t=lecture&s=quota
Posted by 채종윤
net-snmp + net-snmp-devel + net-snmp-utils + rrdtool + rrdexec
olibc 안녕 기본설치
안녕 1.2 기준입니다 설정은 서버마다 다릅니다
rrd.conf
메모리 + 하드 용량 + 랜 설정만 하시면 될것입니다
snmp.conf
www.oops.org/rrdexec/config
cpu session 스크립트를 설치하세요
싱글인경우 구 cpu 스크립트를 받아 설치 하니 돼네요
듀얼 인경우 안녕 텍스트로 하셔야 할것입니다
게시판 작성자 : 이지성님,전유진님 검색하시면
아래 내용 보면서 충분히 설치 하실거라 믿습니다
저는 둔해서 2일 밤 꼬박세우고 반나절 걸렸습니다
제가 즐겨하는 말 선배님 틀리면 리플요

/etc/rrdexec/rrd.conf

SERVICE: cpu
TITLE: CPU Usage percent of rmcobol.co.kr
IMGTITLE: % of CPU Usage
IMGTYPE: png
GRAPH1: system
GRAPH2: user
GRAPH3: idle
CDEFS1: System=system,AREA,#EE6666
CDEFS2: User=user,STACK,#BBBBFF
TYPE: GAUGE
CHECKTYPE: LAST
MIN: 0
MAX: 100
SCALE: none
SIZEOPT: 1000
DATA1: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.2
DATA2: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.1
DATA3: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.3
DTYPE: none
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
TEMPLATE: /usr/include/rrdexec/template.guide
END: cpu

SERVICE: cpu0
TITLE: CPU0 Usage percent of rmcobol.co.kr
IMGTITLE: % of CPU Usage
IMGTYPE: png
GRAPH1: system
GRAPH2: user
GRAPH3: idle
CDEFS1: System=system,AREA,#EE6666
CDEFS2: User=user,STACK,#BBBBFF
TYPE: GAUGE
CHECKTYPE: LAST
MIN: 0
MAX: 100
SCALE: none
SIZEOPT: 1000
DATA1: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.2
DATA2: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.1
DATA3: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.3
DTYPE: none
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
TEMPLATE: /usr/include/rrdexec/template.guide
END: cpu0

SERVICE: cpu1
TITLE: CPU1 Usage percent of rmcobol.co.kr
IMGTITLE: % of CPU Usage
IMGTYPE: png
GRAPH1: system
GRAPH2: user
GRAPH3: idle
CDEFS1: System=system,AREA,#EE6666
CDEFS2: User=user,STACK,#BBBBFF
TYPE: GAUGE
CHECKTYPE: LAST
MIN: 0
MAX: 100
SCALE: none
SIZEOPT: 1000
DATA1: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.2
DATA2: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.1
DATA3: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.50.101.3
DTYPE: none
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
TEMPLATE: /usr/include/rrdexec/template.guide
END: cpu1

SERVICE: ethernet
TITLE: Network Transfer of oops.org
IMGTITLE: bit per second
IMGTYPE: png
GRAPH1: rx,AREA,#EE6666
GRAPH2: tx,LINE3,#CDCDCD
MIN: 0
MAX: 100000000
TYPE: COUNTER
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:interfaces.ifTable.ifEntry.ifInOctets.2
DATA2:
SNMP,pcharley@192.168.123.3:interfaces.ifTable.ifEntry.ifOutOctets.2
DTYPE: *8
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: ethernet

SERVICE: loadaverage
TITLE: System Load Average of oops.org
IMGTITLE: Load Average
IMGTYPE: png
GRAPH1: 1min,AREA,#CDCDCD
GRAPH2: 5min,LINE2,#737373
GRAPH3: 15min,LINE2,#D2734A
MIN: 0
MAX: 1000000000
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.laTable.laEntry.laLoad.1
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.laTable.laEntry.laLoad.2
DATA3:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.laTable.laEntry.laLoad.3
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: loadaverage

SERVICE: process
TITLE: Process Information of oops.org
IMGTITLE: no of process
IMGTYPE: png
GRAPH1: ohttpd
GRAPH2: omysql
GRAPH3: osendmail
GRAPH4: oftp
GRAPH5: ossh
GRAPH6: oimaps
GRAPH7: obash
CDEFS1: httpd=ohttpd,AREA,#EE6666
CDEFS2: mysql=omysql,STACK,#BBBBFF
CDEFS3: sendmail=osendmail,STACK,#737373
CDEFS4: ftp=oftp,STACK,#39A254
CDEFS5: ssh=ossh,STACK,#CEBF4F
CDEFS6: imaps=oimaps,STACK,#D2734A
CDEFS7: bash=obash,STACK,#D84575
CDEFS8:
total=ohttpd:omysql:osendmail:oftp:ossh:oimaps:obash:+:+:+:+:+:+,LINE1,#F
FFFFF
MIN: 0
MAX: 1000
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.1
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.2
DATA3:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.3
DATA4:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.4
DATA5:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.5
DATA6:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.6
DATA7:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.prTable.prEntry.prCount.7
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: process

SERVICE: session
TITLE: Session Information of oops.org
IMGTITLE: no of session
IMGTYPE: png
GRAPH1: ohttpd
GRAPH2: omysql
GRAPH3: osendmail
GRAPH4: oftp
GRAPH5: ossh
GRAPH6: oimaps
CDEFS1: httpd=ohttpd,AREA,#EE6666
CDEFS2: mysql=omysql,STACK,#BBBBFF
CDEFS3: sendmail=osendmail,STACK,#737373
CDEFS4: ftp=oftp,STACK,#39A254
CDEFS5: ssh=ossh,STACK,#CEBF4F
CDEFS6: imaps=oimaps,STACK,#D2734A
CDEFS7:
total=ohttpd:omysql:osendmail:oftp:ossh:oimaps:+:+:+:+:+,LINE1,#FFFFFF
MIN: 0
MAX: 1000
TYPE: GAUGE
SIZEOPT: 1000
DATA1: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.53.101.1
DATA2: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.53.101.2
DATA3: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.53.101.3
DATA4: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.53.101.4
DATA5: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.53.101.5
DATA6: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.53.101.6
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: process

SERVICE: hda1
TITLE: Disk usage for ROOT
IMGTITLE: Root Usage
IMGTYPE: png
GRAPH1: Usage
GRAPH2: Total
CDEFS1: usage=Usage:1000:*,AREA,#BBBBFF
CDEFS2: free=Total:Usage:-:1000:*,STACK,#CDCDCD
CDEFS3: total=Total:1000:*,LINE1,#EE6666
MIN: 0
MAX: 3028080
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskUsed
.1
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskTota
l.1
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: hda1

SERVICE: hdb3
TITLE: Disk usage for /usr
IMGTITLE: Root Usage
IMGTYPE: png
GRAPH1: Usage
GRAPH2: Total
CDEFS1: usage=Usage:1000:*,AREA,#BBBBFF
CDEFS2: free=Total:Usage:-:1000:*,STACK,#CDCDCD
CDEFS3: total=Total:1000:*,LINE1,#EE6666
MIN: 0
MAX: 7060308
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskUsed
.2
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskTota
l.2
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: hda3

SERVICE: hdb5
TITLE: Disk usage for /usr/local
IMGTITLE: Root Usage
IMGTYPE: png
GRAPH1: Usage
GRAPH2: Total
CDEFS1: usage=Usage:1000:*,AREA,#BBBBFF
CDEFS2: free=Total:Usage:-:1000:*,STACK,#CDCDCD
CDEFS3: total=Total:1000:*,LINE1,#EE6666
MIN: 0
MAX: 7060276
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskUsed
.3
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskTota
l.3
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: hda5

SERVICE: hda2
TITLE: Disk usage for /var
IMGTITLE: Root Usage
IMGTYPE: png
GRAPH1: Usage
GRAPH2: Total
CDEFS1: usage=Usage:1000:*,AREA,#BBBBFF
CDEFS2: free=Total:Usage:-:1000:*,STACK,#CDCDCD
CDEFS3: total=Total:1000:*,LINE1,#EE6666
MIN: 0
MAX: 5091584
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskUsed
.4
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskTota
l.4
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: hda2

SERVICE: hdb2
TITLE: Disk usage for /var/log
IMGTITLE: Root Usage
IMGTYPE: png
GRAPH1: Usage
GRAPH2: Total
CDEFS1: usage=Usage:1000:*,AREA,#BBBBFF
CDEFS2: free=Total:Usage:-:1000:*,STACK,#CDCDCD
CDEFS3: total=Total:1000:*,LINE1,#EE6666
MIN: 0
MAX: 7060276
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskUsed
.5
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskTota
l.5
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: hda2

SERVICE: hdb1
TITLE: Disk usage for /web
IMGTITLE: Root Usage
IMGTYPE: png
GRAPH1: Usage
GRAPH2: Total
CDEFS1: usage=Usage:1000:*,AREA,#BBBBFF
CDEFS2: free=Total:Usage:-:1000:*,STACK,#CDCDCD
CDEFS3: total=Total:1000:*,LINE1,#EE6666
MIN: 0
MAX: 11321884
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskUsed
.6
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.dskTable.dskEntry.dskTota
l.6
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: hdb1

SERVICE: memory
TITLE: Memory usage for oops.org
IMGTITLE: Memory Usage
IMGTYPE: png
GRAPH1: treal
GRAPH2: areal
GRAPH3: buffer
GRAPH4: cache
CDEFS1: Usage=treal:areal:-:buffer:-:cache:-:1024:*,AREA,#EE6666
CDEFS2: Buffer=buffer:0:+:1024:*,STACK,#39A254
CDEFS3: Cache=cache:0:+:1024:*,STACK,#BBBBFF
CDEFS4: total=Usage:Buffer:+:Cache:+,LINE1,#737373
MIN: 0
MAX: 255584
TYPE: GAUGE
SIZEOPT: 1024
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.memory.memTotalReal.0
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.memory.memAvailReal.0
DATA3: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.memory.memBuffer.0
DATA4: SNMP,pcharley@192.168.123.3:enterprises.ucdavis.memory.memCached.0
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: memory

SERVICE: swap
TITLE: System Swap Usage of oops.org
IMGTITLE: Swap Usage
IMGTYPE: png
GRAPH1: in,AREA,#CDCDCD
GRAPH2: out,LINE2,#737373
MIN: 0
MAX: 1000
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.systemStats.ssSwapIn.0
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.systemStats.ssSwapOut.0
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: swap

SERVICE: io
TITLE: System I/O Usage of oops.org
IMGTITLE: I/O Usage
IMGTYPE: png
GRAPH1: sent,AREA,#CDCDCD
GRAPH2: recieve,LINE2,#737373
MIN: 0
MAX: 1000
TYPE: GAUGE
SIZEOPT: 1000
DATA1:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.systemStats.ssIOSent.0
DATA2:
SNMP,pcharley@192.168.123.3:enterprises.ucdavis.systemStats.ssIOReceive.0
PATH: /home/rmcobol/html/rrdtool
ARRAY: none
COMMENT: (c) 2003 OOPS Deveolpment ORG, by \\r
END: io

/etc/snmp/snmp.conf
#########################################################################
######
#
# snmpd.conf:
# net-snmp snmpd 에이전트를 설정하기 위한 설정 파일 예제
#
#########################################################################
######
#
# 이 파일은 처음 시작을 위한 예제이다. 더 많은 설정 지시자들이 있으며,
자세한
# 적용을 위해서는 snmpd.conf(5)를 참고한다.
#
# '#' 로 시작하는 라인은 주석으로 간주되며 그 외의 라인들은 설정 명령으
로 간주
# 된다.

#########################################################################
######
# 접속 설정
#########################################################################
######

# snmpd 데몬은 보안 목적에 의해여 수정되거나 대체 파일로 지정이 되지 않는
한 시
# 스템 의 mib 그룹에 대한 질의에만 응답을 할 것이다. 예를들어 아래와 같
은 설정
# 에 의해서 접근에 대한 레벨을 증가 할 수 있다.

# 이 파일을 수정 없이 사용한다면, 기본적으로 snmpd 는 "public" 커뮤니티
에 대해
# 서 읽기 전용으로 응답을 한다.

# 아래의 예는 커뮤니티 이름을 변경하고, mib 트리에 대하여 쓰기 접속을 할
수 있
# 도록 수정하는 방법을 보여준다.

# 더 많은 정보를 얻기 위해서는 FAQ 나 snmpd.conf(5) 메뉴얼 페이지를 참조
한다.

####
# 먼저, "security name" 에 "public" 커뮤니티를 매핑한다:

# sec.name source
community
#com2sec notConfigUser default public
com2sec private localhost pcharley
com2sec private 192.168.123.3 pcharley
#com2sec paranoid 192.168.123.1/24 public
#com2sec readonly 192.168.123.1/24 public

####
# 두번째로, 그룹 이름에 security 이름을 매핑한다:

# groupName securityModel
securityName
#group notConfigGroup v1
notConfigUser
#group notConfigGroup v2c
notConfigUser
#group MyROSystem v1 paranoid
#group MyROSystem v2c paranoid
#group MyROSystem usm paranoid
group MyRWGroup v1 private
group MyRWGroup v2c private
group MyRWGroup usm private
#group MyROGroup v1 readonly
#group MyROGroup v2c readonly
#group MyROGroup usm readonly


####
# 세번째, 그룹이 권한을 가지도록 view 를 설정한다.

# name incl/excl
subtree
mask(optional)
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1

####
# 마지막으로, systemview view 에 읽기 전용 권한을 준다.

# group context

sec.model sec.level prefix read
write notif
#access notConfigGroup ""
any
noauth exact
systemview none none
#access MyROSystem "" any noauth exact system none none
#access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none

# -----------------------------------------------------------------------
------

# 아래는 제한적인 접근을 위한 설정 예제이다.

# "COMMUNITY" 는 오직 이 사이트에서만 알 수 있는 알려지지 않은 키워드로
변경을
# 해야 한다. NETWORK 토큰 역시 정확하게 지정을 하도록 한다.

## sec.name source
community
#com2sec local localhost COMMUNITY
#com2sec mynetwork 192.168.123.1/24 COMMUNITY

## group.name sec.model sec.name
#group MyRWGroup any
local
#group MyROGroup any
mynetwork
#
#group MyRWGroup any
otherv3user
#...

## incl/excl
subtree
mask
view all included
.1
80

## - 또는 mib2 트리만 -

view mib2 included .iso.org.dod.internet.mgmt.mib-2
fc


## context sec.model
sec.level prefix
read write notif
#access MyROGroup "" any
noauth
0 all none none
#access MyRWGroup "" any
noauth
0 all all
all

#########################################################################
######
# 시스템 접속 정보
#

# snmpd.conf 파일을 통하여 sysContact와 sysLocation 시스템 변수를 설정할
수 있
# 다.

syslocation "rmcobol.co.kr"
syscontact "Root "

# snmpwalk 을 출력 예제:
# % snmpwalk -c public -v 1 localhost system
# system.sysDescr.0 = "SunOS name sun4c"
# system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.sunos4
# system.sysUpTime.0 = Timeticks: (595637548) 68 days, 22:32:55
# system.sysContact.0 = "Me "
# system.sysName.0 = "name"
# system.sysLocation.0 = "Right here, right now."
# system.sysServices.0 = 72


# -----------------------------------------------------------------------
------


#########################################################################
######
# 프로세스 체크
#
# 아래의 예제는 호스트에서 실행 중인 프로세스를 어떻게 체크하는가를 보여
준다.
# 문법은 다음과 같다:
#
# proc NAME [MAX=0] [MIN=0]
#
# NAME: 체크를 위한 프로세스의 이름. 이름은 정확해야 한다. (예를들어
http 는
# httpd process 를 찾지 못한다. httpd 또는 현재 실행중인 프로세
스 이름
# 을 정확하게 지정해야 한다.)
# MAX: 실행을 허락할 최대 숫자를 지정한다. 기본값은 0 이다. 이는 물리
적으로
# 제한을 하는 것은 아니다. (trap 설정을 위한 값이다.)
# MIN: 프로세스의 최소 숫자를 지정한다. 이 숫자 보다 낮을 경우 trap
을 사용
# 할 수 있다. 기본값은 0 이다.

#
# 예제 (commented out by default):
#


proc httpd 50 5
proc mysqld 30 2
proc sendmail 30 1
proc in.proftpd 100 0
proc opensshd 100 1
proc imapd 30 1
proc bash 100 0
proc named 10 1

# 현재 실행 중인 mountd daemon
#proc mountd

# 4 개 이상의 ntalkd 데몬이 실행되지 않도록. 0 역시 사용할 수 있다. (역
자 주:
# 역시 기본적으로 snmpd 가 제한을 하지는 않으며, trap 을 이용해서 제한
을 해야
# 한다.)
#proc ntalkd 4

# 적어도 한개 이상의 sendmail process 가 있어야 하며, 10 개 이상 실행
이 되지
# 않게 하기 위하여.
#proc sendmail 10 1

# 프로세스 mib 트리에 대한 snmpwalk 는 아래와 같다:
#
# % snmpwalk -c public -v 1 localhost .1.3.6.1.4.1.2021.2
# enterprises.ucdavis.procTable.prEntry.prIndex.1 = 1
# enterprises.ucdavis.procTable.prEntry.prIndex.2 = 2
# enterprises.ucdavis.procTable.prEntry.prIndex.3 = 3
# enterprises.ucdavis.procTable.prEntry.prNames.1 = "mountd"
# enterprises.ucdavis.procTable.prEntry.prNames.2 = "ntalkd"
# enterprises.ucdavis.procTable.prEntry.prNames.3 = "sendmail"
# enterprises.ucdavis.procTable.prEntry.prMin.1 = 0
# enterprises.ucdavis.procTable.prEntry.prMin.2 = 0
# enterprises.ucdavis.procTable.prEntry.prMin.3 = 1
# enterprises.ucdavis.procTable.prEntry.prMax.1 = 0
# enterprises.ucdavis.procTable.prEntry.prMax.2 = 4
# enterprises.ucdavis.procTable.prEntry.prMax.3 = 10
# enterprises.ucdavis.procTable.prEntry.prCount.1 = 0
# enterprises.ucdavis.procTable.prEntry.prCount.2 = 0
# enterprises.ucdavis.procTable.prEntry.prCount.3 = 1
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.1 = 1
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.2 = 0
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.3 = 0
# enterprises.ucdavis.procTable.prEntry.prErrMessage.1 = "No mountd
process running."
# enterprises.ucdavis.procTable.prEntry.prErrMessage.2 = ""
# enterprises.ucdavis.procTable.prEntry.prErrMessage.3 = ""
# enterprises.ucdavis.procTable.prEntry.prErrFix.1 = 0
# enterprises.ucdavis.procTable.prEntry.prErrFix.2 = 0
# enterprises.ucdavis.procTable.prEntry.prErrFix.3 = 0
#
# mountd 에 대한 errorFlag 가 1개도 실행이 되고 있지 않기 때문에, 1 로
설정이
# 되어 있는 것을 주의해야 한다. 이 errorFlag 가 1 이고, ErrMessage 가
무엇이
# 문제인지를 알려 주고 있다.
#
# 참고 사항: min 과 max 가 모두 0 이면, min 은 자동으로 1 로 설정 된다.
#


# -----------------------------------------------------------------------
------


#########################################################################
######
# 실행/스크립트
#

#
# 한줄 짜리 명령어와 종료 코드를 등록할 수 있다. 다므ㅇ 2개의 예를 참조
하라.
#
# exec NAME PROGRAM [ARGS ...]
#
# NAME: 유니크한 이름 (판단을 위한 이름)
# PROGRAM: 실행할 프로그램 이름. 경로가 포함되어야 한다.
# ARGS: 프로그램에 전달할 옵션 인자

# 간단한 hello world

#exec echotest /bin/echo hello world

# 스크립트를 등록하여 사용하는 예제:
#
# #!/bin/sh
# echo hello world
# echo hi there
# exit 35
#
# 주의: 이 방법은 보안에 치명적일 수 있으며, 의도하지 않은 보안 구멍을
만들어
# 줄 수가 있다. 왠만하면 사용하지 않는 것이 좋으며, 또한 쓰기 같은 기능
이 있게
# 만들어서는 안된다.
#
#exec shelltest /bin/sh /tmp/shtest

# 결과는,
# % snmpwalk -c public -v 1 localhost .1.3.6.1.4.1.2021.8
# enterprises.ucdavis.extTable.extEntry.extIndex.1 = 1
# enterprises.ucdavis.extTable.extEntry.extIndex.2 = 2
# enterprises.ucdavis.extTable.extEntry.extNames.1 = "echotest"
# enterprises.ucdavis.extTable.extEntry.extNames.2 = "shelltest"
# enterprises.ucdavis.extTable.extEntry.extCommand.1 = "/bin/echo hello
world"
# enterprises.ucdavis.extTable.extEntry.extCommand.2
= "/bin/sh /tmp/shtest"
# enterprises.ucdavis.extTable.extEntry.extResult.1 = 0
# enterprises.ucdavis.extTable.extEntry.extResult.2 = 35
# enterprises.ucdavis.extTable.extEntry.extOutput.1 = "hello world."
# enterprises.ucdavis.extTable.extEntry.extOutput.2 = "hello world."
# enterprises.ucdavis.extTable.extEntry.extErrFix.1 = 0
# enterprises.ucdavis.extTable.extEntry.extErrFix.2 = 0

# -----------------------------------------------------------------------
------


#########################################################################
######
# 디스크 체크
#

# 디스트 스페이스를 체크하기 할 수 있으며, 제한을 할 수 있다.

# disk PATH [MIN=100000]
#
# PATH: 디스크가 마운트 되어 있는 경로
# MIN: 지정한 크기보다 작은 공간을 가진 디스크는 Mib의 errorFlag 가 설
정된다.
# 기본값은 100000 이다.

# / 파티션을 설정하고, 이에 따른 결과값

#disk / 10000
disk / 10%
disk /usr 10%
disk /usr/local 10%
disk /var 10%
disk /var/log 10%
disk /web 10%

# % snmpwalk -c public -v 1 localhost .1.3.6.1.4.1.2021.9
# enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0
# enterprises.ucdavis.diskTable.dskEntry.diskPath.1 = "/" Hex: 2F
# enterprises.ucdavis.diskTable.dskEntry.diskDevice.1
= "/dev/dsk/c201d6s0"
# enterprises.ucdavis.diskTable.dskEntry.diskMinimum.1 = 10000
# enterprises.ucdavis.diskTable.dskEntry.diskTotal.1 = 837130
# enterprises.ucdavis.diskTable.dskEntry.diskAvail.1 = 316325
# enterprises.ucdavis.diskTable.dskEntry.diskUsed.1 = 437092
# enterprises.ucdavis.diskTable.dskEntry.diskPercent.1 = 58
# enterprises.ucdavis.diskTable.dskEntry.diskErrorFlag.1 = 0
# enterprises.ucdavis.diskTable.dskEntry.diskErrorMsg.1 = ""

# -----------------------------------------------------------------------
------


#########################################################################
######
# load average 체크
#

# load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
#
# 1MAX: 1분 평균값이 지정한 값보다 높아지면 errorFlag 가 설정됨
# 5MAX: 1MAX 와 유사하며, 5분 평균값
# 15MAX: 1MAX 와 유사하며, 15분 평균값

# 체크 load:
load 12 14 14

# % snmpwalk -c public -v 1 localhost .1.3.6.1.4.1.2021.10
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.2 = 2
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.3 = 3
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.1 = "Load-1"
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.2 = "Load-5"
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.3 = "Load-15"
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.1 = "0.49" Hex: 30
2E 34 39
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.2 = "0.31" Hex: 30
2E 33 31
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.3 = "0.26" Hex: 30
2E 32 36
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.1 = "12.00"
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.2 = "14.00"
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.3 = "14.00"
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.1 = 0
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.2 = 0
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.3 = 0
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.1 = ""
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.2 = ""
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.3 = ""

# -----------------------------------------------------------------------
------


#########################################################################
######
# 확장 섹션
#

# 이 섹션은 실행 mib 가 한줄 라인의 결과 밖에 처리하지 못하는 것을 해결한
다:

# 실행할 shell script:
#
# #!/bin/sh
# echo hello world
# echo hi there
# exit 35
#
# exec .1.3.6.1.4.1.2021.50 shelltest /bin/sh /tmp/shtest

# % snmpwalk -c public -v 1 localhost .1.3.6.1.4.1.2021.50
# enterprises.ucdavis.50.1.1 = 1
# enterprises.ucdavis.50.2.1 = "shelltest"
# enterprises.ucdavis.50.3.1 = "/bin/sh /tmp/shtest"
# enterprises.ucdavis.50.100.1 = 35
# enterprises.ucdavis.50.101.1 = "hello world."
# enterprises.ucdavis.50.101.2 = "hi there."
# enterprises.ucdavis.50.102.1 = 0

# 이제 출력은 2줄이 되었으며 'hi there' 을 볼 수 있을 것이다. 이는 스크
립트의
# 2번째 출력 라인이다.
#
# mib.txt 를 수정하면, .50.* 의 출력을 문자열 description 으로 변경할 수
있다.

# Other ideas:
#
# exec .1.3.6.1.4.1.2021.51 ps /bin/ps
# exec .1.3.6.1.4.1.2021.52 top /usr/local/bin/top
# exec .1.3.6.1.4.1.2021.53 mailq /usr/bin/mailq
exec .1.3.6.1.4.1.2021.50 CpuUsage /usr/bin/cpucheck.pl single
exec .1.3.6.1.4.1.2021.53 Session /usr/bin/session.pl

# -----------------------------------------------------------------------
------


#########################################################################
######
# Pass through control.
#

# 사용법:
# pass MIBOID EXEC-COMMAND
#
# This will pass total control of the mib underneath the MIBOID
# portion of the mib to the EXEC-COMMAND.
#
# Note: You'll have to change the path of the passtest script to your
# source directory or install it in the given location.
#
# Example: (see the script for details)
# (commented out here since it requires that you place the
# script in the right location. (its not installed by default))

# pass .1.3.6.1.4.1.2021.255 /bin/sh /usr/local/local/passtest

# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.255
# enterprises.ucdavis.255.1 = "life the universe and everything"
# enterprises.ucdavis.255.2.1 = 42
# enterprises.ucdavis.255.2.2 = OID: 42.42.42
# enterprises.ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42
# enterprises.ucdavis.255.4 = IpAddress: 127.0.0.1
# enterprises.ucdavis.255.5 = 42
# enterprises.ucdavis.255.6 = Gauge: 42
#
# % snmpget -v 1 localhost public .1.3.6.1.4.1.2021.255.5
# enterprises.ucdavis.255.5 = 42
#
# % snmpset -v 1 localhost public .1.3.6.1.4.1.2021.255.1 s "New string"
# enterprises.ucdavis.255.1 = "New string"
#

# For specific usage information, see the man/snmpd.conf.5 manual page
# as well as the local/passtest script used in the above example.

# Added for support of bcm5820 cards.
#pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat

#########################################################################
######
# 더 많은 정보
#
# snmpd.conf(5) 메뉴얼을 이용하거나 또는 snmpd -H 의 출력을 참조하라.


# Local variables:
# tab-width: 4
# c-basic-offset: 4
# End:
# vim600: noet sw=4 ts=4 fdm=marker
# vim<600: noet sw=4 ts=4



snmp 테스트
[root@ns snmp]# snmpwalk -c pcharley -v 1 192.168.123.3
interfaces.ifTable.ifEntry.ifInOctets.2
IF-MIB::ifInOctets.2 = Counter32: 4487237
You have new mail in /var/spool/mail/root
[root@ns snmp]# snmpwalk -c pcharley -v 1 192.168.123.3
enterprises.ucdavis.50.101.2
UCD-SNMP-MIB::ucdavis.50.101.2 = STRING: "1.2"
[root@ns snmp]# snmpwalk -c pcharley -v 1 192.168.123.3
interfaces.ifTable.ifEntry.ifInOctets.2
IF-MIB::ifInOctets.2 = Counter32: 4505039
[root@ns snmp]# snmpwalk -c pcharley -v 1 192.168.123.3
enterprises.ucdavis.53.101.1
UCD-SNMP-MIB::ucdavis.53.101.1 = STRING: "0"


*내부 에러는 snmp 설정 틀리면 에러 나요

rrdexec 인텍스 생성
rrdindex -w /home/rmcobol/html/rrdtool \
-s /home/rmcobol/html/rrdtool/index.html \
-c /etc/rrdexec/rrd.conf -C


rrdexec -g log
Posted by 채종윤

Total : Today : Yesterday :
채종윤's Blog is powered by Daum & Tattertools.com / Designed by tistory.com