0daf62d9f5
file and processes information retrieval from the running kernel via sysctl in the form of new library, libprocstat. The library also supports KVM backend for analyzing memory crash dumps. Both procstat(1) and fstat(1) utilities have been modified to take advantage of the library (as the bonus point the fstat(1) utility no longer need superuser privileges to operate), and the procstat(1) utility is now able to display information from memory dumps as well. The newly introduced fuser(1) utility also uses this library and able to operate via sysctl and kvm backends. The library is by no means complete (e.g. KVM backend is missing vnode name resolution routines, and there're no manpages for the library itself) so I plan to improve it further. I'm commiting it so it will get wider exposure and review. We won't be able to MFC this work as it relies on changes in HEAD, which was introduced some time ago, that break kernel ABI. OTOH we may be able to merge the library with KVM backend if we really need it there. Discussed with: rwatson
37 lines
581 B
Makefile
37 lines
581 B
Makefile
# $FreeBSD$
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
LIB= procstat
|
|
|
|
SRCS= cd9660.c \
|
|
common_kvm.c \
|
|
libprocstat.c \
|
|
msdosfs.c \
|
|
ntfs.c \
|
|
nwfs.c \
|
|
smbfs.c \
|
|
udf.c
|
|
|
|
INCS= libprocstat.h
|
|
CFLAGS+= -I. -I${.CURDIR} -D_KVM_VNODE
|
|
SHLIB_MAJOR= 1
|
|
WITHOUT_MAN= yes
|
|
|
|
# XXX This is a hack.
|
|
.if ${MK_CDDL} != "no"
|
|
CFLAGS+= -DZFS
|
|
OBJS+= zfs/zfs.o
|
|
SOBJS+= zfs/zfs.So
|
|
POBJS+= zfs/zfs.po
|
|
SUBDIR= zfs
|
|
zfs/zfs.o: .PHONY
|
|
@cd ${.CURDIR}/zfs && ${MAKE} zfs.o
|
|
zfs/zfs.So: .PHONY
|
|
@cd ${.CURDIR}/zfs && ${MAKE} zfs.So
|
|
zfs/zfs.po: .PHONY
|
|
@cd ${.CURDIR}/zfs && ${MAKE} zfs.po
|
|
.endif
|
|
|
|
.include <bsd.lib.mk>
|