{"id":1631,"date":"2010-02-13T17:52:08","date_gmt":"2010-02-13T08:52:08","guid":{"rendered":"http:\/\/www.inohome.net\/kuma\/?p=1631"},"modified":"2010-02-15T23:29:23","modified_gmt":"2010-02-15T14:29:23","slug":"macosx10-5%e3%81%abmrtg%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.inohome.net\/kuma\/blog\/archives\/2010\/02\/post_1631.html","title":{"rendered":"MacOSX10.5\u306bMRTG\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002"},"content":{"rendered":"<p>MRTG\u3092\u5165\u308c\u308b\u3068\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u4f7f\u7528\u7387\u304c\u898b\u308c\u305f\u308a\u3067\u826f\u3044\u3002<br \/>\nCPU\u8ca0\u8377\u3068\u30e1\u30e2\u30ea\u30fc\u4f7f\u7528\u7387\u3082\uff01<br \/>\n<!--more--><br \/>\n<strong>Macports\u306e\u6700\u65b0\u7248\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/strong><\/p>\n<p><a href=\"http:\/\/www.macports.org\/\">http:\/\/www.macports.org\/<\/a><\/p>\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u3067root\u306b<br \/>\n<code>sh-3.2# port selfupdate<br \/>\n--->  Updating the ports tree<br \/>\n--->  Updating MacPorts base sources using rsync<br \/>\nMacPorts base version 1.8.2 installed,<br \/>\nMacPorts base version 1.8.2 downloaded.<br \/>\n--->  MacPorts base is already the latest version<\/code><\/p>\n<p>The ports tree has been updated. To upgrade your installed ports, you should run<br \/>\n  port upgrade outdated<\/p>\n<p>\u3053\u308c\u3067\u6e96\u5099OK<\/p>\n<p><strong>MRTG\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/strong><\/p>\n<p><code>port install mrtg<\/code><\/p>\n<p>Macmini(PowerPC-1.25Ghz)\u306740\u5206\u307b\u3069\u304b\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><strong>SNMP\u306e\u8a2d\u5b9a<\/strong>\u3092\u3057\u307e\u3057\u3087\u3046\u3002<br \/>\n\u307e\u305asnmp.conf\u306f \/etc\/snmp \u306b\u3042\u308a\u307e\u3059\u3002\u79fb\u52d5\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><code>mv \/etc\/snmp\/snmpd.conf \/usr\/share\/snmp<\/code><\/p>\n<p><strong>\/usr\/share\/snmp\/snmpd.conf\u3092\u4fee\u6b63\uff08\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30fc\u540d\u306f\u4efb\u610f\uff09<\/strong><\/p>\n<p><code>com2sec local     localhost       \u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30fc\u540d<br \/>\ncom2sec mynetwork NETWORK\/24      \u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30fc\u540d<\/code><\/p>\n<p><strong>SNMP\u3092\u8d77\u52d5\u3057\u3066\u52d5\u3044\u3066\u3044\u308b\u304bcheck<\/strong><\/p>\n<p><code>sh-3.2# \/usr\/sbin\/snmpd<br \/>\nsh-3.2# snmpwalk -v2c -c \u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30fc\u540d localhost<\/code><\/p>\n<p><em>SNMPv2-MIB::sysDescr.0 = STRING: Darwin macminiserver.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:57:01 PDT 2009; root:xnu-1228.15.4~1\/RELEASE_PPC Power Macintosh<\/em><br \/>\n\u3053\u306e\u3088\u3046\u306b\u51fa\u529b\u304c\u3042\u308c\u3070snmp\u306f\u8d77\u52d5\u3057\u3066\u3044\u308b\u3002<\/p>\n<p><strong>MRTG\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210<\/strong><\/p>\n<p><code><br \/>\nsh-3.2# \/usr\/sbin\/snmpd\uff08snmpwalk\u3059\u308b\u3068snmpd\u304c\u30af\u30e9\u30c3\u30b7\u30e5\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u8d77\u52d5\uff09<br \/>\nsh-3.2# mkdir \/usr\/local\/mrtg<br \/>\nsh-3.2# \/opt\/local\/bin\/cfgmaker --output=\/usr\/local\/mrtg\/mrtg.cfg \u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30fc\u540d@127.0.0.1<\/code><\/p>\n<p><strong>MRTG\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6<\/strong><\/p>\n<p><code>sh-3.2# vi \/usr\/local\/mrtg\/mrtg.cfg<\/code><br \/>\n<code>Workdir: \/Library\/WebServer\/Documents\/mrtg<br \/>\nLanguage: eucjp<br \/>\n<\/code><\/p>\n<p><strong>\u516c\u958b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306b&#8221;mrtg&#8221;\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u3092\u4f5c\u6210<\/strong><\/p>\n<p><code>sh-3.2# mkdir \/Library\/WebServer\/Documents\/mrtg<\/code><\/p>\n<p><strong>MRTG\u3092\u8d77\u52d5<\/strong><\/p>\n<p><code>sh-3.2# \/opt\/local\/bin\/mrtg \/usr\/local\/mrtg\/mrtg.cfg<\/code><br \/>\nWARNING\u304c\u51fa\u308b\u304c\u3001\u7121\u3044\u30ed\u30b0\u3092\u30ed\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u51fa\u6765\u306a\u3044\u3068\u8a00\u3063\u3066\u3044\u308b\u3060\u3051<br \/>\n\uff08\u305d\u308a\u3083\u521d\u56de\u8d77\u52d5\u3060\u304b\u3089\u7121\u3044\u3088\u306d\uff09\uff13\u56de\u307b\u3069\u5b9f\u884c\u3059\u308c\u3070WARNING\u304c\u51fa\u306a\u304f\u306a\u308b<\/p>\n<p><strong>crontab\u3092\u8a2d\u5b9a(5\u5206\u66f4\u65b0)<\/strong><\/p>\n<p><code>*\/5 * * * * \/opt\/local\/bin\/mrtg \/usr\/local\/mrtg\/mrtg.cfg<br \/>\n<\/code><\/p>\n<p><strong>\u30d6\u30e9\u30a6\u30b6\u3067\u898b\u3066\u307f\u308b<\/strong><\/p>\n<p><code>\u30b5\u30fc\u30d0\u30fcIP\u30a2\u30c9\u30ec\u30b9\/mrtg\/127.0.0.1_4.html<\/code><br \/>\n\uff08\u305f\u307e\u305f\u307e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u304c\uff14\u3064\u3081\u306b\u898b\u3048\u3066\u3044\u308b\u306e\u3067_4 \u4ed6\u306e\u74b0\u5883\u3067\u306f\u305d\u3046\u3068\u306f\u9650\u3089\u306a\u3044\uff09<\/p>\n<p><a href=\"http:\/\/www.inohome.net\/kuma\/wp-content\/uploads\/2010\/02\/a05f04e03d101e2a2aa0ae120f66f17e.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.inohome.net\/kuma\/wp-content\/uploads\/2010\/02\/a05f04e03d101e2a2aa0ae120f66f17e-150x150.jpg\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\uff082010-02-13 17.54.21\uff09\" width=\"150\" height=\"150\" class=\"alignnone size-thumbnail wp-image-1635\" \/><\/a><\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3060\u3051\u76e3\u8996\u3067\u304d\u305f\u3002<br \/>\nCPU\u3068\u30e1\u30e2\u30ea\u30fc\u306f\u4ee5\u4e0b\u3092<br \/>\n\/usr\/local\/mrtg\/mrtg.cfg<br \/>\n\u306b\u8ffd\u52a0\u3057\u3088\u3046\uff01<\/p>\n<p>MaxBytes1[memory]:\uff08\u7269\u7406\u30e1\u30e2\u30ea\u6700\u5927\u5024\uff09\u306f<br \/>\nsh-3.2# snmpwalk -v2c -c \u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30fc\u540d localhost .1.3.6.1.4.1.2021.4.5<br \/>\nUCD-SNMP-MIB::memTotalReal.0 = INTEGER: \u7269\u7406\u30e1\u30e2\u30ea\u6700\u5927\u5024 kB<br \/>\n\u3067\u8abf\u3079\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>MaxBytes2[memory]:\uff08\u30b9\u30ef\u30c3\u30d7\u30e1\u30e2\u30ea\u6700\u5927\u5024\uff09\u306f<br \/>\nsnmpwalk -v2c -c \u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30fc\u540d localhost .1.3.6.1.4.1.2021.4.3<br \/>\nUCD-SNMP-MIB::memTotalSwap.0 = INTEGER: \u30b9\u30ef\u30c3\u30d7\u30e1\u30e2\u30ea\u6700\u5927\u5024 kB<br \/>\n\u3067\u8abf\u3079\u3089\u308c\u307e\u3059\u3002<\/p>\n<p><code><br \/>\nTarget[memory]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.4.0:\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30fc\u540d@localhost<br \/>\nMaxBytes1[memory]: \u7269\u7406\u30e1\u30e2\u30ea\u6700\u5927\u5024(kB\u4e0d\u8981)<br \/>\nMaxBytes2[memory]: \u30b9\u30ef\u30c3\u30d7\u30e1\u30e2\u30ea\u6700\u5927\u5024(kB\u4e0d\u8981)<br \/>\nUnscaled[memory]: dwmy<br \/>\nOptions[memory]: gauge, absolute, growright, noinfo<br \/>\nYLegend[memory]: memory Free<br \/>\nShortLegend[memory]: Bytes<br \/>\nkilo[memory]: 1024<br \/>\nkMG[memory]: k,M,G,T,P<br \/>\nLegendI[memory]: Real<br \/>\nLegendO[memory]: Swap<br \/>\nLegend1[memory]: Free PhysicalMemory[MBytes]<br \/>\nLegend2[memory]: Free SwapMemory[MBytes]<br \/>\nTitle[memory]: MemoryStatics<br \/>\nAddHead[memory]:<br \/>\nPageTop[memory]:\uff1c\uff48\uff11\uff1ememory usage\uff1c\/\uff48\uff11\uff1e<\/code><\/p>\n<p><code>Target[cpu]: .1.3.6.1.4.1.2021.11.9.0&.1.3.6.1.4.1.2021.11.10.0:\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30fc\u540d@localhost<br \/>\nMaxBytes[cpu]: 100<br \/>\nUnscaled[cpu]: dwmy<br \/>\nOptions[cpu]: gauge, absolute, growright, noinfo, nopercent<br \/>\nYLegend[cpu]: CPU load Average (%)<br \/>\nShortLegend[cpu]: (%)<br \/>\nLegendI[cpu]: User<br \/>\nLegendO[cpu]: System<br \/>\nLegend1[cpu]: User(%)<br \/>\nLegend2[cpu]: System(%)<br \/>\nTitle[cpu]: CPU load<br \/>\nAddHead[cpu]:<br \/>\nPageTop[cpu]:\uff1c\uff48\uff11\uff1eCPU Load Average\uff1c\/\uff48\uff11\uff1e<br \/>\n<\/code><br \/>\n\uff08h1\u30bf\u30b0\u306f\u534a\u89d2\u3067\u3001\u4fbf\u5b9c\u4e0a\u5168\u89d2\u306b\u3057\u3066\u3044\u307e\u3059\uff09<\/p>\n<p><em>\u751f\u6210\u3057\u305f\u307e\u307e\u3060\u3068\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u30b0\u30e9\u30d5\u304c\u5de6\u3078\u9032\u3080\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067<br \/>\nOptions[\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3068\u3042\u308f\u305b\u308b]: growright<br \/>\n\u3068\u5165\u308c\u308b\u3068\u53f3\u306b\u9032\u3080\u3088\u3046\u306b\u306a\u308b\u3002<\/em><\/p>\n<p>\u3059\u3079\u3066\u7d42\u308f\u3063\u305f\u3089Web\u30b5\u30fc\u30d0\u30fc\u306emtrg\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306b\u4fbf\u5229\u306aindex.html\u3092\u751f\u6210\u3002<\/p>\n<p><code>indexmaker --columns=1 --addhead=\"\uff1cmeta http-equiv=\uffe5\"Content-Type\uffe5\" Content=\uffe5\"text\/html\uff1b charset=euc-jp\uffe5\"\uff1e\"   \/usr\/local\/mrtg\/mrtg.cfg \uff1e \/Library\/WebServer\/Documents\/mrtg\/index.html<\/code><br \/>\n (\u4fbf\u5b9c\u4e0a\u5168\u89d2\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u90e8\u5206\u304c\u3042\u308a\u307e\u3059\u3002)<\/p>\n<p><a href=\"http:\/\/www.inohome.net\/kuma\/wp-content\/uploads\/2010\/02\/0707a5b6e9ab662060594c57b5a6a7cb.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.inohome.net\/kuma\/wp-content\/uploads\/2010\/02\/0707a5b6e9ab662060594c57b5a6a7cb-150x150.jpg\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\uff082010-02-14 10.21.24\uff09\" width=\"150\" height=\"150\" class=\"alignnone size-thumbnail wp-image-1641\" \/><\/a><\/p>\n<p>CPU\u8ca0\u8377\u306e\u8868\u793a\u306f\u602a\u3057\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\n\u307b\u307ctop\u3068\u540c\u3058\u306a\u306e\u3067\u3059\u304c\u3002<\/p>\n<p>MacOSX10.5\u306ePPCMacmini,IntelMacmini\u3067\u691c\u8a3c\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n10.6\u3067\u306f\u307e\u305f\u9055\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\n\u3082\u3057\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u5834\u5408\u306f\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u4ed8\u304d\u3067\u30b3\u30e1\u30f3\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MRTG\u3092\u5165\u308c\u308b\u3068\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u4f7f\u7528\u7387\u304c\u898b\u308c\u305f\u308a\u3067\u826f\u3044\u3002 CPU\u8ca0\u8377\u3068\u30e1\u30e2\u30ea\u30fc\u4f7f\u7528\u7387\u3082\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1631","post","type-post","status-publish","format-standard","hentry","category-mac"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inohome.net\/kuma\/wp-json\/wp\/v2\/posts\/1631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inohome.net\/kuma\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inohome.net\/kuma\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inohome.net\/kuma\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inohome.net\/kuma\/wp-json\/wp\/v2\/comments?post=1631"}],"version-history":[{"count":0,"href":"https:\/\/www.inohome.net\/kuma\/wp-json\/wp\/v2\/posts\/1631\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inohome.net\/kuma\/wp-json\/wp\/v2\/media?parent=1631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inohome.net\/kuma\/wp-json\/wp\/v2\/categories?post=1631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inohome.net\/kuma\/wp-json\/wp\/v2\/tags?post=1631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}