转发: snmpd&/dev/null error
张莉|li.zhang <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Dear Thanks for your help; I already know; snmpd -Lsd CLf /var/log/snmpd.log /dev/null is wrong; but the / dev / null attributes to change; I do not understand what is advanced through the command or function to / dev / null change, I want to know the reason; If you can not be answered here, I trouble you to reflect the higher engineers deep problems; for that; Thank you; Thank you [email protected] 发件人: Xiang Li [mailto:[email protected]] 发送时间: 2011年6月4日 8:10 收件人: "张莉|li.zhang" 抄送: [email protected] 主题: Re: snmpd&/dev/null error Fortunately the list administrator did not delete your message as spam because most of list members would not be able to read Chinese:) If you look at the SYNOPSIS of snmpd: snmpd [OPTIONS] [LISTENING ADDRESSES] The "-Lf" option is only supposed to be followed by a single file. If you use "snmpd -Lsd CLf /var/log/snmpd.log /dev/null" then my guess is that snmpd thinks the [OPTIONS] part has ended after "-Lf /var/log/snmpd.log" and consider whatever follows as [Listening Address]. In your case the listening address would be "/dev/null". Since the Unix domain is assumed if the first character of the <LISTENING-address> is '/', and you were running snmpd as root so it can do anything, including changing /dev/null from character device into an unix domain socket. Thanks Xiang On 6/2/2011 11:21 PM, 张莉|li.zhang wrote: 请问一下,snmpd -Lsd CLf /var/log/snmpd.log /dev/null Cp /var/run/snmpd.pid Ca里 Lsd 与Lf都是输出日志,为何加了个snmpd.log会 将/dev/null 属性变掉,这个是通过 哪种机制哪条函数做到的呢;烦请指导,谢谢; 以下是截图;在64位和32位都会出现这个问题; /dev/null的原始属性是c cid:[email protected] 原始的snmpd配置文件 cid:[email protected] 3.修改snmpd文件为以下 cid:[email protected] 4.修改后重启snmpd服务(因为之前snmpd服务并没有启动, 所以stopping是failed的) cid:[email protected] 5. 这次重启snmpd服务产生的日志, 并没有报错 cid:[email protected] 6. 重启snmpd服务后文件属性从c 变成了s cid:[email protected] 7. 过了一会儿,连接在这台linux上的ssh中ll 命今无法使用, 并出现了no such device /dev/null 的报错 cid:[email protected] 再次重启snmp报以下错 [root@squid ~]# service snmpd restart 停止 snmpd:/etc/init.d/functions: line 273: /dev/null: 没有那个设备或地址 /etc/init.d/functions: line 278: /dev/null: 没 有那个设备或地址 [失败] 启动 snmpd:/bin/bash: /dev/null: 没有那个设备或地址 [确定] 重启系统报以下错: reboot.png 解决办法 是rm Crf /dev/null Mknod Cm 666 c 1 3 请问一下,snmpd -Lsd CLf /var/log/snmpd.log /dev/null Cp /var/run/snmpd.pid Ca里 Lsd 与Lf都是输出日志,为何加了个snmpd.log会 将/dev/null 属性变掉,这个是通过 哪种机制哪条函数做到的呢;烦请指导,谢谢; ====================================================== Zhang li Tel:13564143692 ---------------------------------------------------------------------------- -- Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users -- Xiang Li http://www.champnms.com ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
image001.png
(image/png, 1.6 KB) - not displayed
image002.png
(image/png, 13 KB) - not displayed
image003.png
(image/png, 13.4 KB) - not displayed
image004.png
(image/png, 15.9 KB) - not displayed
image005.png
(image/png, 4.6 KB) - not displayed
image006.png
(image/png, 1.6 KB) - not displayed
image007.png
(image/png, 8.5 KB) - not displayed
image008.png
(image/png, 10.5 KB) - not displayed