net-snmp set 명령에 관한 질문입니다.

bakdorazi의 이미지

net-snmp 5.3.3을 사용하고 있습니다.

제가 간단한 MIB을 하나 정의 했는데요..

examNEXTable	   	OBJECT-TYPE
	SYNTAX	   	SEQUENCE OF examNEXEntry
	MAX-ACCESS 	not-accessible
	STATUS     	current
        DESCRIPTION 
 	"example table"
        ::={exam 3}
 
examNEXEntry		OBJECT-TYPE
	SYNTAX		examNEXEntry
	MAX-ACCESS	not-accessible
	STATUS		current
	DESCRIPTION
	"example entry"
        INDEX { name }
 	::={examNEXTable 1}
 
examNEXEntry ::= SEQUENCE {
				name	OCTET STRING,
				num1	INTEGER,
				num2	INTEGER
			  }	
 
name 			OBJECT-TYPE
SYNTAX 			OCTET STRING(SIZE(1..32))
MAX-ACCESS 		read-only
STATUS   		current
DESCRIPTION
		"example tabel name"
::={ examNEXEntry 1}
 
num1 			OBJECT-TYPE
SYNTAX			INTEGER
MAX-ACCESS 		read-create
STATUS	  		current
DESCRIPTION 
		"example table integer"
::={examNEXEntry 2}
 
num2 			OBJECT-TYPE
SYNTAX			INTEGER
MAX-ACCESS 		read-create
STATUS	  		current
DESCRIPTION 
		"example table integer2"
::={examNEXEntry 3}

위의 내용을 요약하자면 테이블 examNEXTable이 String name, long num1, long num2, 의 3가지 인수를 가지는 것인데요.

보시다시피 examNEXTable에서 INDEX는 name 입니다.

테이블을 만들때 그 테이블을 검색하는 인텍스가 name이 되고 num1, num2는 column이 된다고 생각하시면 되겠습니다.

예를 들어 보통 snmpwalk를 실행하면

snmpwalk -v 1 -c public localhost exam
 
NEX-EXAM-MIB::num1."kim"=INTEGET:0
NEX-EXAM-MIB::num2."kim"=INTEGET:0
NEX-EXAM-MIB::num1."lee"=INTEGET:0
NEX-EXAM-MIB::num2."lee"=INTEGET:0 

이런식으로 결과가 나옵니다.
즉 인덱스가 되는 이름 기준으로 칼럼 num1, num2 값이 나오는 것입니다.
num1."kang" 의 값은 0, 혹은 num2."kang"의 값은 0 이런 식으로

근데 저는 num1."kang"의 값을 셋팅해주지 못해서 값이 0 이 나오는데요..저는 이 값을 3 으로 바꾸고 싶어서 아래와 같이 명령을 내렸습니다.

[root@localhost Test]# snmpset -v 1 -c public localhost NEX-EXAM-MIB::num1.0 i 3
 
NEX-EXAM-MIB::num1.""=INTEGER:3

그러면 위와 같은 결과가 나오는데요.. 이것은 num1.kang의 값을 바꾼 것이 아닙니다.

저의 질문은 인덱스가 되는 name의 num1, num2를 바꾸는 snmpset 명령은 어떤 것인가 하는 것입니다.

즉 num1."kang"=INTEGER:0 인데 이 값을 num1."kang"=INTEGER:3의 결과가 나오는 것으로 바꾸고 싶다는 것입니다

아시는 분 좀 도와주세요.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.