cacti php snmp not installed,Cacti snmp找不到网卡的问题,请帮忙解决

Cacti snmp找不到网卡的问题,请帮忙解决

(2012-01-08 00:50:56)

标签:

网卡

杂谈

Cacti snmp找不到网卡的问题,请帮忙解决net-snmp版本5.0.9

编译配置:

./configure

--with-default-snmp-version="3"

--with-sys-contact="root@localhost"

--with-sys-location="beijing"

--with-logfile

="/var/log/snmpd.log"

--with-persistent-directory="/var/net-snmp"

--with-libwrap

snmp安装完成后,配置了一下snmpd.conf

内容为:

rocommunity abc_snmp

com2sec notConfigUserdefault abc_snmp

view systemview included .1.3.6.1.2.1.1

view systemview included .1.3.6.1.2.1.2

view systemview included .1.3.6.1.2.1.25.1.1

view systemview included .1.3.6.1.2.1.1

view systemview included .1.3.6.1.2.1.2

view systemview included .1.3.6.1.2.1.2.2.1.1

view systemview included .1.3.6.1.2.1.25.1.1

view systemview included .1.3.6.1.4.1.2021.10.1.3.1

view systemview included .1.3.6.1.4.1.2021.10.1.3.2

view systemview included .1.3.6.1.4.1.2021.10.1.3.3

view systemview included .1.3.6.1.4.1.2021.4.3.0

view systemview included .1.3.6.1.4.1.2021.4.4.0

view systemview included .1.3.6.1.4.1.2021.4.5.0

view systemview included .1.3.6.1.4.1.2021.4.6.0

view systemview included .1.3.6.1.4.1.2021.4.11.0

view all included .1 80

accessnotConfigGroup "" any

noauth exactall none none

syslocation abc

syscontact abc@abcd

pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat

然后把编译目录下/dist/snmpd-init.d cp到/etc/rc.d/init.d/snmpd

然后修改/etc/rc.d/init.d/snmpd

#!/bin/sh

#

# snmpd This shell script takes care of starting and stopping

# the net-snmp SNMP daemon

#

# chkconfig: - 26 74

# description: snmpd is net-snmp SNMP daemon.

# Source function library.

. /etc/init.d/functions

# Source networking configuration.

. /etc/sysconfig/network

# Check that networking is up.

[ ${NETWORKING} = "no" ]

&& exit 0

RETVAL=0

name="snmpd"

prog="/usr/local/sbin/snmpd"

[ -x $prog -a -f /usr/local/share/snmp/snmpd.conf ] || exit 0

start() {

# Start daemons.

echo -n $"Starting $name: "

daemon $prog -Cc /etc/snmp/snmpd.conf

RETVAL=$?

echo

[ $RETVAL -eq 0 ] && touch

/var/lock/subsys/$name

return $RETVAL

}

stop() {

# Stop daemons.

echo -n $"Shutting down $name:

"

killproc $prog

RETVAL=$?

echo

[ $RETVAL -eq 0 ] && rm -f

/var/lock/subsys/$name

return $RETVAL

}

# See how we were called.

case "$1" in

start)

start

;;

stop)

stop

;;

status)

status $name

RETVAL=$?

;;

restart|reload)

stop

start

RETVAL=$?

;;

condrestart)

if [ -f /var/lock/subsys/$name ]; then

stop

start

RETVAL=$?

fi

;;

*)

echo $"Usage: $0

{start|stop|restart|condrestart|status}"

exit 1

esac

exit $RETVAL

修改的内容主要是把启动时的命令添加了参数 -Cc /etc/snmp/

佳能600DCacti版本是0.8.6h for

linux,数据获取方式是Cactid,Cactid默认编译.

我觉得问题应该不是Cactid,因为我以前用cmd.php取数据也是没有取到请看cacti下

的log/cacti.log查找问题你要抓的网卡是千M还是百M,是32位还是64位?

下一个新的net-snmp从新编译安装试试。

configure

时加个--enable-mfd-rewrites我现在严重怀疑是我的cacti端的net-snmp版本太低.正在重新编译5.4版的.希望有些奇迹.

我的网卡32位1000M的

分享:

a4c26d1e5885305701be709a3d33442f.png喜欢

0

a4c26d1e5885305701be709a3d33442f.png赠金笔

加载中,请稍候......

评论加载中,请稍候...

发评论

登录名: 密码: 找回密码 注册记住登录状态

昵   称:

评论并转载此博文

a4c26d1e5885305701be709a3d33442f.png

发评论

以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值