version 1.29, 2010/09/23 10:49:55 |
version 1.30, 2010/11/02 10:24:34 |
|
|
int mclpool_count = 0; |
int mclpool_count = 0; |
int mbpool_index = -1; |
int mbpool_index = -1; |
struct pool mbpool; |
struct pool mbpool; |
|
u_int mcllivelocks = 0; |
|
|
/* interfaces */ |
/* interfaces */ |
static int num_ifs; |
static int num_ifs; |
|
|
int i, p, nif, ret = 1; |
int i, p, nif, ret = 1; |
size_t size; |
size_t size; |
|
|
|
mib[0] = CTL_KERN; |
|
mib[1] = KERN_NETLIVELOCKS; |
|
size = sizeof(mcllivelocks); |
|
if (sysctl(mib, 2, &mcllivelocks, &size, NULL, 0) < 0 && |
|
errno != EOPNOTSUPP) { |
|
error("sysctl(KERN_NETLIVELOCKS)"); |
|
goto exit; |
|
} |
|
|
num_disp = 0; |
num_disp = 0; |
if (getifaddrs(&ifap)) { |
if (getifaddrs(&ifap)) { |
error("getifaddrs: %s", strerror(errno)); |
error("getifaddrs: %s", strerror(errno)); |
|
|
print_fld_str(FLD_MB_IFACE, ifi->name); |
print_fld_str(FLD_MB_IFACE, ifi->name); |
|
|
if (p == -1 && ifi == interfaces) { |
if (p == -1 && ifi == interfaces) { |
|
print_fld_uint(FLD_MB_LLOCKS, mcllivelocks); |
print_fld_size(FLD_MB_MSIZE, mbpool.pr_size); |
print_fld_size(FLD_MB_MSIZE, mbpool.pr_size); |
print_fld_size(FLD_MB_MALIVE, mbpool.pr_nget - mbpool.pr_nput); |
print_fld_size(FLD_MB_MALIVE, mbpool.pr_nget - mbpool.pr_nput); |
print_fld_size(FLD_MB_MHWM, mbpool.pr_hiwat); |
print_fld_size(FLD_MB_MHWM, mbpool.pr_hiwat); |
|
|
#if NOTYET |
#if NOTYET |
print_fld_uint(FLD_MB_RXDELAY, ifi->data.ifi_rxdelay); |
print_fld_uint(FLD_MB_RXDELAY, ifi->data.ifi_rxdelay); |
print_fld_uint(FLD_MB_TXDELAY, ifi->data.ifi_txdelay); |
print_fld_uint(FLD_MB_TXDELAY, ifi->data.ifi_txdelay); |
if (ifi->data.ifi_livelocks) |
|
print_fld_size(FLD_MB_LLOCKS, ifi->data.ifi_livelocks); |
|
#endif |
#endif |
|
|
if (p >= 0 && p < mclpool_count) { |
if (p >= 0 && p < mclpool_count) { |