[완료] RRDTool과 snmpwalk 값의 차이는 왜 생기는 것인가요?

vprktntm의 이미지

안녕하세요

cacti로 모니터링을 하고 있는데

snmpwalk에서 가져온 값과 cacti에서 rrdtool을 이용하여 그래프에 그릴때 나타나는 값이 전혀 다릅니다.

rrdtool에 나오는 값이 시스템 자체 확인을 해보면 맞는 값인데....

snmpwalk로 가져온 값은 대체 뭔가요??

snmpwalk로 가져온 값을 어떻게 알맞은 값으로 변환하는 것인지....

고수님들 살려주십시오 ㅠㅠ

김정균의 이미지

어떤 값을 어떻게 가져와서 어떻게 비교를 했는지가 중요하죠. :-)

vprktntm의 이미지


[@jrs0016 lib]$ snmpwalk -c !@#@!#@!# -v 2c 127.0.0.1 .1.3.6.1.4.1.2021.11.51.0
UCD-SNMP-MIB::ssCpuRawNice.0 = Counter32: 7805

요렇게 나오는데 rrdtool에서 CPU Nice값이 3.33m(0.003%)로 나온다는 것이지요

왜 그런건지 ㅠㅠ

김정균의 이미지

ssCpuRawNice 는 Counter 값입니다. 즉, 현재값에서 이전값을 빼야지 우리가 보는 %로 알 수가 있는 것입니다. rrdtool 에서 ssCpuRawNice 를 이용하여 값을 구할 때는 이전값을 rrd db 에 가지고 있기 때문에 그 차이로 human readable 하게 보여줄 수 있는 것이죠.

김정균의 이미지

아 그리고 CPU 항목의 경우에는 해당 값으로 바로 구하는 것이 아니라, 다른 여러가지 OID 값을 이용하여 구하게 됩니다.

UCD-SNMP-MIB (.1.3.6.1.4.1.2021) 의 CPU 관련 Counter 를 이용하여 값을 구함 
 
user => UCD-SNMP-MIB::ssCpuRawUser.0 
 
nice => UCD-SNMP-MIB::ssCpuRawNice.0 
 
sys => UCD-SNMP-MIB::ssCpuRawSystem.0 
 
idle => UCD-SNMP-MIB::ssCpuRawIdle.0 
 
wait => UCD-SNMP-MIB::ssCpuRawWait.0 
 
intr => UCD-SNMP-MIB::ssCpuRawInterrupt.0 
 
irqt => UCD-SNMP-MIB::ssCpuRawSoftIRQ.0 
 
counter 방식이기 때문에 각 값의 2 지점(시간상) 의 차이를 구하도록 한다. 
 
예) user = user[post] - user[pref] 
 
scale = 100.0 / (user + nice + sys + idle + wait + intr + irqt) 
 
user = (user + nice) * scale 
 
sys = (sys + intr + irqt) * scale 
 
idle *= scale 
 
idwait *= scale 

와 같이 구하게 됩니다. 이 식의 결과값은 %로 나오게 됩니다.

vprktntm의 이미지

^^

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.