Need help using embedded perl with Solaris...
Jean-Sebastien Morisset <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi everyone, I wrote a perl script to return various stats on specific processes. I've included the script in snmpd.conf as: pass .1.3.6.1.4.1.8072.10.1 /usr/local/share/snmp/snmp-proctable.pl Which allows me to do stuff like: # time snmpwalk -c ******** -O s -v 2c devunix7 .1.3.6.1.4.1.8072.10.1.4.1.13 netSnmp.10.1.4.1.13 = INTEGER: 9 real 0m0.728s user 0m0.034s sys 0m0.006s FYI - .13 is 13th stat from Proc::ProcessTable, .1.13 is the first process defined in an array of process names, and .4.1.13 is the fourth user defined in an array of user names. I think I'm running into some performance issues for 2 reasons... The first is that Proc::ProcessTable reads the process table every time Net-SNMP runs the script. Since I'm data collecting about 60 OIDs every 2 mins, that's quite a bit of overhead. I could probably -- although I dont know how -- have Net-SNMP set a global variable every 15-30 secs with the current process table, and then my script could use that variable. I would, of course, need the --enable-embedded-perl functionality to do this. :-) So this brings me to my second problem, I cannot compile v5.3.0.1 on Solaris with --enable-embedded-perl! :-( I've tried using --with-out-mib-modules='ucd-snmp/memory', but get the same result: /usr/include/sys/swap.h:47: #error "Cannot use swapctl in the large files compilation environment" And since I'm not using an embedded perl, the OS perl is probably adding some overhead as well. I've compiled v5.3.0.1 with the following options: ./configure --enable-internal-md5 --with-perl-modules --enable-shared --with-openssl=/usr/local/ssl --with-mib-modules='host disman/event-mib smux mibII/mta_sendmail ucd-snmp/diskio agentx ucd-snmp/dlmod' --with-cc=gcc --with-default-snmp-version='2' --with-sys-contact='[email protected]' --with-sys-location='' --with-logfile=/var/log/snmpd.log --with-persistent-directory=/var/net-snmp/ Can anyone suggest any way I can get embedded perl to compile on Solaris? Thanks! js. -- Jean-Sebastien Morisset, Sr. UNIX Administrator <[email protected]> Personal Home Page <http://jsmoriss.mvlan.net/> Underwater and Travel Photographs <http://www.mvpix.com/> ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ 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