Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am trying to figure out SNMP trap handling (net-SNMP 5.5) that came on the RHEL 6 distro.
I'm doing a simple test to verify the trap handler will run a desired program/script and I can't seem to make it work unless I specify the "-f" option and only on the command line. When I try adding it to the default set of options "-Lsd -p /var/run/snmptrapd.pid", it prevents the service from coming up. "service snmptrapd restart" hangs on startup. Edited /etc/init.d/snmptrapd making OPTIONS=-f -Lsd -p /var/run/snmptrapd.pid.
My trap log file (logoption f /var/log/snmptrapd-direct.log) seems to indicate that the traps are being received but again not executing actions on the trap.
I'm triggering the trap by resetting the local snmp agent service: service snmpd restart.
With the "-f" option on the command line:
"/usr/sbin/snmptrapd -f -Lsd -p /var/run/snmptrapd.pid"
the snmpd restart triggers the test script that just echos "Hello World"
For one thing, shouldn't I be able to use the SNMP trap service without having to make this type of change for simple use? Am I doing it wrong? Config files below.
Second, why won't the "-f" option work in the config file.
authCommunity log,execute,net public
logoption f /var/log/snmptrapd-direct.log
traphandle default /bin/bash /var/tmp/robs/test
view all included .1 80
Never really found the real solution to this put the product I was working on that I was prototying for was fixed by correcting the community string in /etc/snmp/snmptrapd.conf file. So my real problem is solved but not this question. Stangely now that the trap are being caught, I no longer need the "-f" option. It doesn't seem to matter if the "-f" option is there or not.
BTW - TCPDump and Wireshark helped by confirming the traps were making it to the box.