how to write a snmp daemon

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; ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-01-2006
Clement Hsu
 
Posts: n/a
Default how to write a snmp daemon

--===============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>&nbsp; #!/bin/sh<br><br>&nbsp; pid=`/usr/bin/ps -e |
/usr/bin/grep snmpd | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`<br>&nbsp; case &quot;$1&quot;
in<br>&nbsp; 'start')<br>&nbsp; if [ -x /usr/local/sbin/snmpd ]; then<br>&nbsp; echo &quot;Start the
SNMP service&quot;<br>&nbsp; /usr/local/sbin/snmpd <br>&nbsp; fi<br>&nbsp; ;;<br><br>&nbsp; 'stop') <br>&nbsp; echo &quot;Stop the SNMP service &quot;<br>&nbsp; kill
-TERM snmpd<br>&nbsp; ;;<br>&nbsp; *)<br>&nbsp; echo &quot;Usage: /etc/init.d/snmpd { start | stop
}&quot;<br>&nbsp; ;;<br><br>&nbsp; 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==--

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:04 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0