Linux ¼à¿Ø/SNMPÅäÖÃ
http://www.zhetao.com/content.dep?m=news&id=1235137892661247
·¢²¼ÈÕÆÚ 2009-2-20 21:51:32
Linux
ϵͳµÄ
SNMP
·þÎñÉèÖÃ
1)
°²×°
SNMP
ÂÔ£¬Çë²ÎÔÄ
LINUX
ϵͳ
SNMP
°²×°ËµÃ÷£¬Ò»°ãÇé¿öÏÂ
Linux
ÖеľùÒѾ×Ô¶¯°²×°ÁË
SNMP
·þÎñ¡£ÒÔÏÂÃüÁî¿ÉÒÔ¼ì²â
SNMP
·þÎñÊÇ·ñ°²×°ÒÔ¼°°²×°µÄÎļþ°ü¡£
[root@idc ~]# rpm -qa |grep snmp
net-snmp-libs-5.1.2-11.EL4.7
net-snmp-5.1.2-11.EL4.7
2)
ÅäÖÃ
SNMP
°´ÕÕÈçÏ·½Ê½ÐÞ¸Ä
/etc/snmp/snmpd.conf
Îļþ
A
¡¢ÐÞ¸ÄĬÈϵÄ
community string
£¨
SUM
ÖÐ
SNMP
¶ÁÖµÃÜÂ룩
com2sec notConfigUser
default
public
½«
public
ÐÞ¸ÄΪÄã²ÅÖªµÀµÄ×Ö·û´®
½«
“
default
”
¸ÄΪÄãÏëÄĄ̈»úÆ÷¿ÉÒÔ¿´µ½ÄãµÄ
snmp
ÐÅÏ¢
,
±ÈÈç
SUM
ËùÔÚ
IP
Ϊ£º
10.10.10
.10
£¬¾Í¸Ä³ÉÕâ¸ö
IP
¡£²»¸Ä±íʾËùÓлúÆ÷³äÐí¡£
B
¡¢°ÑÏÂÃæµÄ
#
ºÅÈ¥µô
#view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
ÆôÓÃÈ«²¿¹¦ÄÜ¿ÉÒÔʹÓÃÈçÏÂÒ»ÐУ¨Èç¹ûûÓпÉÒÔ¼ÓÈëÒ»ÐУ©£º
view all included .1
80
C
¡¢°ÑÏÂÃæµÄÓï¾ä
access notConfigGroup "" any noauth exact systemview none none
¸Ä³É£º
access notConfigGroup "" any noauth exact
mib2
none none
»òÊÇ£º
access notConfigGroup "" any noauth exact
all
none none
3)
Æô¶¯ÓëÍ£Ö¹
SNMP
Ò»°ãʹÓãºservice snmpd start
|stop
|restart
ÃüÁî¡£»òÊÇ£º
#/etc/rc.d/init.d/snmpd restart
4)
·À»ðǽ
Èç¹û
Linux
Æô¶¯ÁË·À»ðǽ£¬Ç뿪·Å
UDP
µÄ
161
¶Ë¿Ú¡£È·±£
Linux
µÄ
iptables
·À»ðǽ¶Ô
SUM
¼à¿Ø·þÎñÆ÷¿ª·ÅÁË
udp 161
¶Ë¿ÚµÄ·ÃÎÊȨÏÞ
¿ÉʹÓÃ
iptables ?L ?n
²é¿´µ±Ç°
iptables
¹æÔò
¿É±à¼
/etc/sysconfig/iptables
ÎļþÀ´ÐÞ¸Ä
iptables
¹æÔò¡£
Ïà¹ØÎĵµ£º
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
1. ѧ»áд¼òµ¥µÄmakefile
2. ±àһЩӦÓÃ
³ÌÐò
£¬¿ÉÒÔÓÃmakefileÅÜÆðÀ´
3. ѧ»áдÇý¶¯
µÄmakefile
4. дһ¼òµ¥charÇý¶¯£¬makefile±àÒëͨ¹ý£¬¿ÉÒÔinsmod£¬ lsmod£¬ rmmod. ÔÚÇý¶¯µÄinitº¯ÊýÀï´òÓ¡hello world£¬insmodºóÓ¦¸ÃÄܹ»Í¨¹ýdmesg¿´µ½Êä³ö
¡£
5. дһÍêÕûÇý¶¯£¬ ¼ÓÉÏread£¬ write£¬ ioctl£¬ pollingµÈ¸ ......
ÕªÒª£º LinuxÓû§°²×°Linux²Ù×÷ϵͳʱÓöµ½µÄÒ»¸ö×î³£¼ûµÄÄÑÒÔ¾ö¶¨µÄÎÊÌâ¾ÍÊÇÈçºÎÕýÈ·µØ¸øÆÀ¹À¸÷·ÖÇø´óС£¬ÒÔ·ÖÅäºÏÊʵÄÓ²Å̿ռ䡣¶øÓöµ½³öÏÖij¸ö·ÖÇø¿Õ¼äºÄ¾¡Ê±£¬½â¾öµÄ·½·¨Í¨³£ÊÇʹÓ÷ûºÅÁ´½Ó£¬»òÕßʹÓõ÷Õû·ÖÇø´óСµÄ¹¤¾ß(±ÈÈçPatition MagicµÈ)£¬µ«ÕⶼֻÊÇÔÝʱ½â¾ö°ì·¨£¬Ã»Óиù±¾½â¾öÎÊÌâ¡£Ëæ×ÅLinuxµÄÂß¼Å̾í¹ÜÀí¹¦ÄÜ ......
topÃüÁîÊÇLinuxϳ£ÓõÄÐÔÄÜ·ÖÎö¹¤¾ß£¬Äܹ»ÊµÊ±ÏÔʾϵͳÖи÷¸ö½ø³ÌµÄ×ÊÔ´Õ¼ÓÃ×´¿ö£¬ÀàËÆÓÚWindowsµÄÈÎÎñ¹ÜÀíÆ÷¡£ÏÂÃæÏêϸ½éÉÜËüµÄʹÓ÷½·¨¡£
top - 01:06:48 up 1:22, 1 user, load average: 0.06, 0.60, 0.48
Tasks: 29 total, 1 running, 28 sleeping, 0 stopped, 0 zombie
......
ת×Ô£ºhttp://www.cnblogs.com/hopeworld/archive/2009/08/07/1541444.html
ͳ¼Æ×ÜÊý´óС
du -sh xmldb/
du -sm * | sort -n //ͳ¼Æµ±Ç°Ä¿Â¼´óС ²¢°²´óС ÅÅÐò
du -sk * | sort -n
du -sk * | grep guojf //¿´Ò»¸öÈ˵ĴóС
&nb ......