freebsd-nq/usr.bin/netstat/Makefile
Robert Watson c8e6b6899a Modify "netstat -mb" to use libmemstat(3) when acting on a live system,
with a number of positive benefits:

- Start using UMA(9) statistics for mbufs and clusters, which avoids
  using the mbuf allocator statistics which suffer from races under
  load on SMP.  This should eliminate "negative" mbuf counts in
  netstat -mb.

- We are now able to track cached (free) mbufs and clusters and count
  it towards memory allocated by the network stack.

- We are now also able to track memory allocated to mbuf tags since
  libmemstat(3) can also query malloc(9).  We don't print this except
  as part of the total (for now - #if 0).

- We are now able to track mbuf/cluster/packet allocation failures,
  although they are not currently printed (#if 0).

- Don't print out sfbuf statistics when running on a kernel core, as
  currently that code is able only to query sysctl for statistics.

MFC after:	1 week
2005-07-18 08:34:15 +00:00

22 lines
433 B
Makefile

# @(#)Makefile 8.1 (Berkeley) 6/12/93
# $FreeBSD$
PROG= netstat
SRCS= if.c inet.c inet6.c main.c mbuf.c mcast.c mroute.c ipx.c route.c \
unix.c atalk.c netgraph.c mroute6.c ipsec.c
WARNS?= 2
NO_WERROR=
CFLAGS+=-DIPSEC
.if !defined(NO_INET6)
CFLAGS+=-DINET6
.endif
BINGRP= kmem
BINMODE=2555
DPADD= ${LIBKVM} ${LIBIPX} ${LIBMEMSTAT} ${LIBNETGRAPH} ${LIBUTIL}
LDADD= -lkvm -lipx -lmemstat -lnetgraph -lutil
.include <bsd.prog.mk>