Hi!
I'm guessing that this is not the right list to send this, but being
subscribed to one is just enough for me. Please forward it, if you think that
is needed, to "coders" list ..
In short, this patch fixes following "issues":
1. routing table patch (kernel_sunos5.c)
- on my Solaris box, which accepts connections from world, routing table
consists of approx. 20k entries - 10 of them is static, and the rest
is "cached". Of course, i see that there was only "200" entries per request
allocated for MIB_IP_ROUTE. Incresing this to some number >20k GREATLY
improves performance!! I'm not shure why, but this works. Please note, that
20k is normal value for machine connected on public ip, receiving connections
from whole world (and with default network settings). It would be nice to
dinamicaly detect routing table size and allocate by that, instead of
this "static" array ...
2. routing table patch (var_route.c)
- i'm guessing that everyone would like to mimic Linux routing table display
behaviour, so i put this one condition which will NOT display cached routing
entries. This way, instead of 20k snmp dump, you get, as on linux, much
reasonable display. :-)
3. process table (hr_swrun.c)
- i'm guessing that this one is or typo error or overlooked copy-paste
operation. In short, instead of returning NULL for process id (which should
exist in "/proc"), we should set proc_buf to NULL, and let the loop go on.
That way, nonexistant processes will be shown as "<exited>" which is, i'm
guessing, expected behaviour.
That's all for now. I hope this will get included in next release. :-)
H.
--- net-snmp-5.4/agent/mibgroup/kernel_sunos5.c 2006-10-21 01:59:11.000000000 +0200
+++ net-snmp-5.4.new/agent/mibgroup/kernel_sunos5.c 2006-12-02 23:13:21.245802000 +0100
@@ -87,7 +87,7 @@
{MIB_IP, sizeof(mib2_ip_t), (void *) -1, 0, 60, 0, 0},
{MIB_IP_ADDR, 20 * sizeof(mib2_ipAddrEntry_t), (void *) -1, 0, 60, 0,
0},
- {MIB_IP_ROUTE, 200 * sizeof(mib2_ipRouteEntry_t), (void *) -1, 0, 30,
+ {MIB_IP_ROUTE, 25000 * sizeof(mib2_ipRouteEntry_t), (void *) -1, 0, 30,
0, 0},
{MIB_IP_NET, 100 * sizeof(mib2_ipNetToMediaEntry_t), (void *) -1, 0,
300, 0, 0},
--- net-snmp-5.4/agent/mibgroup/mibII/var_route.c 2006-11-07 00:43:27.000000000 +0100
+++ net-snmp-5.4.new/agent/mibgroup/mibII/var_route.c 2006-12-02 22:55:09.552338000 +0100
@@ -50,6 +50,10 @@
#include "route_headers.h"
#define CACHE_TIME (120) /* Seconds */
+#ifdef solaris2
+#include <inet/ip.h>
+#endif /* solaris2 */
+
#if !defined(NETSNMP_CAN_USE_SYSCTL)
#include <net-snmp/net-snmp-includes.h>
@@ -759,6 +763,9 @@
if (getMibstat(MIB_IP_ROUTE, &entry, sizeof(mib2_ipRouteEntry_t),
req_type, &IP_Cmp_Route, &Nextentry) != 0)
break;
+ if(entry.ipRouteInfo.re_ire_type&IRE_CACHE)
+ continue;
+
COPY_IPADDR(cp, (u_char *) & entry.ipRouteDest, op,
current + IP_ROUTEADDR_OFF);
if (exact) {
--- net-snmp-5.4/agent/mibgroup/host/hr_swrun.c 2006-10-17 16:26:21.000000000 +0200
+++ net-snmp-5.4.new/agent/mibgroup/host/hr_swrun.c 2006-12-26 21:00:10.897336000 +0100
@@ -529,9 +529,9 @@
ret = read(procfd, proc_buf, sizeof(*proc_buf));
close(procfd);
if (ret != sizeof(*proc_buf))
- return NULL;
+ proc_buf = NULL;
} else
- return NULL;
+ proc_buf = NULL;
#else
if (kd == NULL)
return NULL;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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