SNMP

지각생 연습장
  • Simple Network Monitoring Protocol : 간단한 네트워크 모니터링 프로토콜. 시스템 자원 모니터링도 가능하게 확장되었다.

목차

사용법

간단한 사용법

  • snmp 데몬(snmpd) 설치
    • 데비안/우분투 기타 APT환경에서 : apt-get install snmpd
  • snmp 클라이언트 설치
    • apt-get install snmp
  • 정보 가져오기 (snmpwalk)
    • snmpwalk -Os -c public -v 1 localhost system

snmp 도구

  • snmpwalk : SNMP application that uses SNMP GETNEXT requests to query a network entity for a tree of information
    • 전체값이나, OID (an Object Identifier) 혹은 MIB 를 주어 특정 값만 가져올 수 있다.
  • snmpget, snmpbulkget, snmpgetnext, snmpbulkwalk, snmpdelta, snmpnetstat, snmpset, snmpstatus, snmptable, snmptest, snmptrap, snmpdf, snmpusm

공통 option

snmp 도구들이 이용하는 공통 옵션들

  • -c community
  • -d
    Dump(in hexadecimal) the raw SNMP packets sent and received.
  • -e engineID
  • -H
    Display a list of configuration file directives understood by the command and then exit.
  • -l secLevel
  • -L [eEfFoOsS]
    Specifies output logging options
  • -m MIBLIST
  • -M DIRLIST
  • -n contextName
  • -O [abeEfnqQsStTuUvxX]
    Specifies output printing options.
    • -Oa : ASCII 문자열로 표시
    • -Ob : 테이블 인덱스를 숫자로 표시
    • -Oe
    • -OE : 따옴표를 escape
    • -Of : OID 출력할때 MIB 전체 목록을 포함
    • -On : 숫자로 OID를 표시한다.
    • -Oq : 이퀄표시(=)와 타입 정보를 빼고 표시
    • -OQ : 타입 정보 빼고 표시
    • -Os : MIB 오브젝트 이름을 표시한다.
    • -OS : s 에다가 MIB 이름도 표시한다. 기본 OID 출력 포맷이다.
    • -Ot : TimeTicks 값을 그대로 표시한다.
    • -OT : Hex 문자열이 표시될때, 출력용 문자열?도 같이 보여준다.
    • -Ou
    • -OU
    • -Ov
    • -Ox : Hex 문자열로 표시
    • -OX :
  • -t timeout
    재시도 간격을 지정 (기본값 1)
  • -u secName
    securityName 을 지정.

참고

개인 도구