Sun Java logo     �W�@��      �ؿ�      �d�      �U�@��     

Sun logo
Sun Java(TM) System Directory Server 5.2 2005Q1 �޲z��n 

�� 14 ��
�ϥ� SNMP �ʵ�ؿ��A��

²����޲z�q�T��w (SNMP) �O�@�ӼзǤƪ��޲z�q�T��w�A�i�ΨӧY�ɺʵ�P�޲z�˸m��3�ε{���CDirectory Server ���Ѥ@�Ӧ��N�z�{�������A��i�H��� SNMP �޲z��3�ε{���ʵ�C�o����3�ε{�����M�w�ؿ��A�������A�A�è�o����䬡�ʪ���T�C

Directory Server SNMP ���N�z�{���t����Ū�ȡCSNMP �޲z3�ε{���L�k�b��A���W���ʧ@�C

�@��Ө��A�� 13 ���u�ϥΰO���ɺʵ� Directory Server�v���ҭz���s��P��~�O���ɥi�H���ѧ�Ժɪ���A����T�A�� LDAP �O�ΨӦw���s��έק��A���t�m���ҿ�q�T��w�C���L�ASNMP ���N�z�{���T�ꤹ�\ Directory Server ��ҰѻP�{�������޲z�t�ΡC

�����]�t�U�C�D�D�G


Sun Java System ��A������ SNMP

SNMP ��޲z3�ε{������3�ε{���M���N�z�{���Φ��N�z�{�����˸m�i��d�ߡCSNMP �N�z�{���Φ��N�z�{���|�����Ӧ�3�ε{���θ˸m����T�A�H�^3�Ӧ� SNMP �޲z��d�ߡC�b�ѥN�z�{�����޲z��T�w (MIB) �ҩw�q����椤�A��T�O�H�ܼƪ������غc�Ӧ��C

���޲z��|�g�`�d�ߦ��N�z�{������ SNMP �ܼơA���N�z�{���h�Ǧ^�n�D���ȡCSNMP �]�w�q�@�M���A��N�z�{�����ǰe Trap �T�����Ҧ����޲z��A�H��i�ƥ�C�p�G�b�Ұ� Directory Server �`�n�{�����e���b��榸�N�z�{���M�D�N�z�{���A�h Directory Server ���N�z�{���b Directory Server �Ұʩ���ɶǰe SMUX Trap �ܥD�N�z�{���C�D�N�z�{���N���ഫ�� SNMP Trap�C

�D��W�i�H�w�˦h�Ӧ��N�z�{���C�Ҧp�A�p�G�N Directory Server�B3�ε{����A���M�l���A�� (Messaging Server) �����w�˦b�P�@�x�D��W�A�h�C�@�Ӧ�A�������N�z�{�����|�P�P�@�ӥD�N�z�{���i��q�T�C

�b UNIX ��Ҥ��A��w�w�� Administration Server �ɡA�|�� Directory Server �Ψ�L Sun Java System ���~���� SNMP �D�N�z�{�� (MAGT) �C

�p�����ϥ� SNMP �ʵ��A�����ԲӸ�T�A�аѾ\ Administration Server Administration Guide�C

�]�w��A�����z�L SNMP ����ʵ�@��{�Ǧp�U�G

  1. �sĶ Directory Server MIB�A�ñN����X�i�z�� SNMP �޲z�t�ΡC�аѾ\�t�Τ��C
  2. �b�z���q���W�]�w SNMP�A�p�]�w SNMP�ҭz�C
  3. �z�L Directory Server Console �t�m SNMP ���N�z�{���C�аѾ\�b Directory Server ���t�m SNMP�C
  4. �z�L Directory Server Console �Ұ� SNMP ���N�z�{���C�аѾ\�ҰʻP���� SNMP ���N�z�{���C
  5. �s��� MIB �w�q�� SNMP ��޲z����A�óz�L�N�z�{���N�����}�C�o�ӨB�J�����̱z�� SNMP �޲z�t�Φөw�C

�U�C�U�`�y�z Directory Server �t�m�S�w���B�J�C


Directory Server MIB ���z

Directory Server �� MIB ���U�C�����ѧO�X�G

iso.org.dod.internet.private.enterprises.netscape.nsldap
(nsldapd OBJECT IDENTIFIER ::= { 1.3.6.1.4.1.1450.7 })

���w�q�b�U�C�ɮפ��G

ServerRoot/plugins/snmp/netscape-ldap.mib

MIB �w�q�F�i�z�L SNMP �ʵ��ܼơA�H���ܼƤ��t���ƭ������C�ؿ� MIB �&��|�Ӥ��P����޲z�����G

�b�i�H�ϥΥؿ� MIB ���e�A�����N���P�z�i�H�b�U�C�ؿ��쪺 MIB �@�_�sĶ�G

ServerRoot/plugins/snmp/mibs

�p����� MIB �sĶ�覡����T�A�аѾ\ SNMP ���~���C


�]�w SNMP

�b Solaris ���x�W

Solaris �W��ij���t�m���N Directory Service �D�N�z�{�� (MPS/MAGT) ���J Solaris ��ͥN�z�{���[�c���C�b���t�m���ASolaris �N�z�{�� snmpdx �t�d�Ұ� MPS �N�z�{���ñN Directory Server SNMP �n�D��e�� MPS �N�z�{���C�o��ܤ��׭n�D�O�_�P Directory Server ����A�Ҧ� SNMP �޲z�Τ�ݳ��i�H�p���зdzs���� 161 �W�� Solaris �N�z�{���C

�z�������s�t�m MPS �N�z�{���A�ϥ��b���P���s���� (��ij�� 1161) �W���A�q�Ӥ��|�P Solaris �N�z�{���Ĭ�C�U�C���Ѫ��d�ҵ{�ǥ]�t�ӨB�J�C�b Administration Server Administration Guide ���A���Ѧ��t�m MPS �N�z�{�����i�@�B����C��Ъ`�N�A���t�m�ݭn�H Solaris �N�z�{���Ұ� MPS �N�z�{���A�ҥH�z����ϥ� Administration Server �ӱҰʩΰ��� MPS �N�z�{���C


���J snmpdx SNMP �D�N�z�{�� - Solaris �d��

�̷Ӧ��{�Ǵ��J Solaris snmpdx �N�z�{�� (man snmpdx(1M))�CSolaris snmpdx �N�z�{���i�H�b�зdzs���� 161 �W���A�ñN Directory SNMP �n�D��e�� Directory Server�C

�H�z���ؿ��ҦW�٨�N slapd-instance�C

  1. �H�W�ŨϥΪ̨���n�J�C
  2. �� MPS �N�z�{���إߵ�U�ɡG/etc/snmp/conf/mps.reg
  3. �N�U�C���e�[�J���ɮפ��G

    #

    # Registration file for MPS Agent.

    #

    ##########

    # agents #

    ##########

    agents = {

    {

    name = "mps"

    subtrees = {

    # Directory Server

    1.3.6.1.4.1.1450.7,

    # Web Server

    1.3.6.1.4.1.1450.1.60

    }

    timeout = 2000000

    watch-dog-time = 86400

    port = 1161

    }

    }

  4. �� MPS �N�z�{���إ߸귽�ɮסG/etc/snmp/conf/mps.rsrc
  5. �N�U�C���e�[�J���ɮפ��G

    #

    # Resource file for MPS Agent.

    #

    resource =

    {

    {

    registration_file = "/etc/snmp/conf/mps.reg"

    policy = "spawn"

    type = "legacy"

    command = "install-dir/plugins/snmp/magt/magt
    install-dir/plugins/snmp/magt/CONFIG
    install-dir/plugins/snmp/magt/INIT"

    }

    }

  6. �N�U�C�U��[�J install-dir/plugins/snmp/magt/CONFIG ������
  7. TRANSPORT extraordinary SNMP

    OVER UDP SOCKET

    AT PORT 1161

  8. ���s�}��A�M���ˬd magt �{�ǬO�_�b�s���� 1161 �W���C�Ҧp�G
  9. $ pgrep magt

    21954

    $ netstat -a | grep 1161

    *.1161 Idle

    *.1161 Idle

  10. �p�b Directory Server ���t�m SNMP �ҭz�A�t�m Directory Server ���N�z�{���C�ϥιw�]�s���� 199�C
  11. �z�i�H�b /etc/init.d ���إߤ@�ӧt���U�C�X�檺�Ұʵ{���ɥH�b�}��ɦ۰ʱҰʦ��N�z�{���C���N�z�{���u�b MPS �N�z�{���w�ҰʮɱҰʡC

    $ cd install-dir/bin/slapd/server

    [ -x ./64/ns-slapd ] && [ "?bin/isainfo -b 2> /dev/null? = 64 ] && cd ./64

    ./ns-ldapagt -d install-dir/slapd-instance

  12. �ˬd���N�z�{���O�_���C�Ҧp�G
  13. $ pgrep ns-ldapagt

    22411

�b Linux ���x�W

  1. �b Red Hat Linux Advanced Server �W�A�i���ˬd�H�T�O��� snmpd �����C�ШϥΥH�U��O�G
  2. $ pgrep snmpd

    �p�G��� snmpd �b��椤�A�ШϥΥH�U��O�N�䰱��G

    /etc/rc.d/init.d/snmpd stop

  3. �p�G�z�n����� snmpd�A���ܧ��� snmpd ���s���𸹽X�C�o�O�]���̾ڹw�] Directory Server MPS (MAGT) �D�N�z�{���έ�� snmpd ���ϥγs���� 161�C
  4. �Y�n�ܧ�s���𸹽X�A�Эק� /etc/rc.d/init.d/snmpd ���� OPTIONS �ܼơA�p�U�ҥܡG

    OPTIONS="-s -l /dev/null -P /var/run/snmpd.pid -a -p 1161" adding -p 1161

    �o�˴N�|�N snmpd �s�����ܧ� 1161�C

  5. �Ұʭ�� snmpd�A�а��G
  6. /etc/rc.d/init.d/snmpd start

Linux �W�� SNMP ����

��b Linux �W�t�m SNMP �ɡA�ЦҶq�U�C�X�I�G


�b Directory Server ���t�m SNMP

�b���x�W�]�w SNMP �N�z�{���ΪA�ȫ�A�z�����t�m Directory Server ��Ҥ��� SNMP �ѼơC�Y�n�q Directory Server Console �t�m SNMP �]�w�G

  1. �b Directory Server Console �̤W�h�� [�t�m] ���ҤW�A���t�m�𪬥ؿ�ڳ�����A���`�I�A�A���k���O���� [SNMP] ���ҡC
  2. ��� [�ҥβέp��Ʀ���] �֨���C���ﵽ�귽�ϥα��ΡA�w�]���p�U���|���� SNMP �ܼƪ��έp��ơC�p�G�z���ϥ� SNMP�A�]���z�L LDAP �ʵ� cn=snmp,cn=monitor ���ت��ݩʡA�z3����o�Ӯ֨���O��Ϊ��A�C
  3. �b��3����r��줤�A��J�D�N�z�{�����D��W�٩M�s���𸹽X�C
  4. �w�]�Ȥ'O�O localhost �M�s���� 199�C

  5. �b [�y�z�ݩ�] ����r��줤��J��T�C�o�ǭȱN�ϬM�b����A�����}�� SNMP ����?�G
    • �y�z - ��J�ؿ��A�����y�z�A���� Server Console ���ݾ�𤤦���Ҫ��y�z���C
    • ��´ - ��J�ؿ��A�����ݪ����q�Τ�����´���W�١C
    • ��m - ��J�ؿ��A���D��a�z��m�C
    • �p���H - ��J�ؿ��A���޲z��q�l�l��a�}���p����T�C
  6. ��@�U [�x�s] �H�x�s�ܧ�C
  7. �̥H�U���`�ҭz�A�Ұʩέ��s�Ұ� SNMP ���N�z�{���C


�ҰʻP���� SNMP ���N�z�{��

�H�U�{�Ǵy�z�p��q Directory Server Console �ҰʡB���s�Ұʩΰ��� SNMP ���N�z�{���C


�Ƶ�

�p�G�b�P�@���D��W�[�J�t�@�Ӧ�A����ҡA�ӥB�z�Ʊ�ӹ�Ҧ��� SNMP ���@���!A�z�������s�Ұ� SNMP ���N�z�{���C


�ҰʡB����M���s�Ұ� SNMP ���N�z�{���G

  1. �b Directory Server Console �̤W�h�� [�t�m] ���ҤW�A���t�m�𪬥ؿ�ڳ�����A���`�I�A�A���k���O���� [SNMP] ���ҡC
  2. �ϥ� [�y�z�ݩ�] �U�����N�z�{�������s�H�ҰʡB����έ��s�Ұʦ��N�z�{���C
  3. ����ؿ�ä��|����ؿ�N�z�{���C�p�G�n����N�z�{���A�z�����q�o�Ӽ��Ұ�氱��@�~�C



�W�@��      �ؿ�      �d�      �U�@��     


��󸹽X 819-2014�C   Copyright 2005 Sun Microsystems, Inc. ���v�Ҧ��C