=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/systat/mbufs.c,v retrieving revision 1.29 retrieving revision 1.30 diff -c -r1.29 -r1.30 *** src/usr.bin/systat/mbufs.c 2010/09/23 10:49:55 1.29 --- src/usr.bin/systat/mbufs.c 2010/11/02 10:24:34 1.30 *************** *** 1,4 **** ! /* $OpenBSD: mbufs.c,v 1.29 2010/09/23 10:49:55 dlg Exp $ */ /* * Copyright (c) 2008 Can Erkin Acar * --- 1,4 ---- ! /* $OpenBSD: mbufs.c,v 1.30 2010/11/02 10:24:34 dlg Exp $ */ /* * Copyright (c) 2008 Can Erkin Acar * *************** *** 41,46 **** --- 41,47 ---- int mclpool_count = 0; int mbpool_index = -1; struct pool mbpool; + u_int mcllivelocks = 0; /* interfaces */ static int num_ifs; *************** *** 198,203 **** --- 199,213 ---- int i, p, nif, ret = 1; 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; if (getifaddrs(&ifap)) { error("getifaddrs: %s", strerror(errno)); *************** *** 341,346 **** --- 351,357 ---- print_fld_str(FLD_MB_IFACE, ifi->name); 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_MALIVE, mbpool.pr_nget - mbpool.pr_nput); print_fld_size(FLD_MB_MHWM, mbpool.pr_hiwat); *************** *** 349,356 **** #if NOTYET print_fld_uint(FLD_MB_RXDELAY, ifi->data.ifi_rxdelay); 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 if (p >= 0 && p < mclpool_count) { --- 360,365 ----