This is a discussion on how to write a snmp daemon within the SNMP Users forums, part of the Networking and Network Related category; --===============0886715746== Content-Type: multipart/alternative; boundary="----=_Part_28307_31706098.1162348433559" ------=_Part_28307_31706098.1162348433559 Content-Type: text/plain; charset=ISO-8859-1; ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============0886715746==
Content-Type: multipart/alternative; boundary="----=_Part_28307_31706098.1162348433559" ------=_Part_28307_31706098.1162348433559 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Dear All: I am Clement, I try to write a snmp daemon as following: #!/bin/sh pid=`/usr/bin/ps -e | /usr/bin/grep snmpd | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` case "$1" in 'start') if [ -x /usr/local/sbin/snmpd ]; then echo "Start the SNMP service" /usr/local/sbin/snmpd fi ;; 'stop') echo "Stop the SNMP service " kill -TERM snmpd ;; *) echo "Usage: /etc/init.d/snmpd { start | stop }" ;; exit 0 However , the about shell script is not function. I don't know why and how to write a correct snmpd daemon, can any one who ever write snmpd daemon can give me any suggestion, thank you Best Regards, Clement Hsu ------=_Part_28307_31706098.1162348433559 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Dear All:<br>I am Clement, I try to write a snmp daemon as following:<br><br> #!/bin/sh<br><br> pid=`/usr/bin/ps -e | /usr/bin/grep snmpd | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`<br> case "$1" in<br> 'start')<br> if [ -x /usr/local/sbin/snmpd ]; then<br> echo "Start the SNMP service"<br> /usr/local/sbin/snmpd <br> fi<br> ;;<br><br> 'stop') <br> echo "Stop the SNMP service "<br> kill -TERM snmpd<br> ;;<br> *)<br> echo "Usage: /etc/init.d/snmpd { start | stop }"<br> ;;<br><br> exit 0<br><br>However , the about shell script is not function. I don't know why and <br>how to write a correct snmpd daemon, can any one who ever write snmpd<br>daemon can give me any suggestion, thank you <br><br>Best Regards,<br>Clement Hsu<br><br> ------=_Part_28307_31706098.1162348433559-- --===============0886715746== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=...057&dat=121642 --===============0886715746== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/...net-snmp-users --===============0886715746==-- |