[Mailman-Users] I have some trouble about traphandle, who can help me?

=?gb2312?B?wMu/zb2j0MQ=?= lkjx-369 at 163.com
Sat May 21 06:04:58 CEST 2005


who can help me? I have some troubles when using net-snmp. The details is as following:
The first step: starts up the snmptrap function using the command: 
snmptrapd -f -Le -Lf /root/lk/final/lk.log -F "%m-%l %02.2h:%02.2j TRAP %w.%q from %A %b %N %v\n"
2005-05-18 17:39:14 NET-SNMP version 5.2.1 Started.

The second step: Send this trap using the following command:
snmptrap -v 1 -c public host SNMPv2-MIB::coldStart localhost 6 17 '' \SNMPv2-MIB::sysLocation.0 s "Just here"

THE third step:The result is about
5-18 17:39 TRAP 6..17 from localhost.localdomain UDP: []:32770 SNMPv2-MIB::coldStart SNMPv2-MIB::sysLocation.0 = STRING: Just here
broken pipe

I define the traphandle in snmptrapd .conf like this:
traphandle default /root/tra-p/aa.sh coldstart

The contents in script file aa.sh comes from net-snmp website

read host
read ip

while read oid val
if [ "$vars" = "" ]
vars="$oid = $val"
vars="$vars, $oid = $val"

echo trap: $1 $host $ip $vars

I don't know why there has a prompt "broken pipe". But I can be sure that the aa.sh wouldn¡¯t be executed. Who can tell me how to do? 

More information about the Mailman-Users mailing list