1
While I am running snmpd as following (using net-snmp 5.7.2.rc1,ubuntu-12.04)
[[email protected] /root]#snmpd –f -Le
[[email protected] /root]# snmpwalk -c public -v 2c 127.0.0.1 IF-MIB::ifInOctets.1
It is working fine and answering me values
Eg.
IF-MIB::ifOutOctets.1 = Counter32: 35497924
IF-MIB::ifOutOctets.1 = Counter32: 35499234
IF-MIB::ifOutOctets.1 = Counter32: 35503212
I have done packaging of it and its almost working fine. But the issue is the ‘values’ displaying are constant !! it is not changing since the packaging of it..here the /var/snmp3 is a root folder and I am running it with chroot
[[email protected] /root]#/usr/sbin/chroot /var/snmp3/ /usr/local/bin/snmpd –f -Le
[[email protected] /root]#/usr/sbin/chroot /var/snmp3/ /usr/local/bin/snmpwalk -c public -v 2c -Oqv 127.0.0.1 IF-MIB::ifInOctets.1
IF-MIB::ifOutOctets.1 = Counter32: 34689322
IF-MIB::ifOutOctets.1 = Counter32: 34689322
IF-MIB::ifOutOctets.1 = Counter32: 34689322
任何人都可以告訴我什麼依賴我在這裏失蹤?爲什麼它沒有給它當前的價值?請幫我解決一下這個。與chroot運行snmp不給當前值
是,snmpEngineTime正在改變數據......我已經包括在/ var/SNMP3的/ dev和/ var/SNMP3/etc目錄,但是當我:
你可以試試這個(使用chroot前!)我正在嘗試「mount -bind/proc到/ snmp3/proc它顯示」/ proc不是一個塊設備「,另一個問題是我應該在mount它之前複製整個/ proc目錄嗎?或者只是假設爲空/ proc dir ?? –
不,將任何文件夾複製到chroot'ed目錄都無濟於事,它必須綁定,嘗試執行以下操作(請參閱我的答案中的其他編輯輸入) – lucassm
正確的選項是#mount - 嘗試--rbind進行遞歸綁定。看看mount --help找到o ut正確的語法爲安裝綁定選項。我有最新版本的安裝,我不能自己檢查... – lucassm