Commit Graph

14 Commits

Author SHA1 Message Date
rwatson
35b7068df5 Updates to libprocstat(3) and procstat(1) to allow monitoring Capsicum
capability mode and capabilities.

Right now no attempt is made to unwrap capabilities when operating on
a crashdump, so further refinement is required.

Approved by:	re (bz)
Sponsored by:	Google Inc
2011-08-14 00:42:09 +00:00
pluknet
abc803dba2 Mention myself in the AUTHORS section.
Requested by:	stas
2011-07-12 19:48:21 +00:00
pluknet
254766d869 Provide a simple manual page for libprocstat(3).
Reviewed by:	jilles, gjb
2011-07-12 13:46:13 +00:00
pluknet
9e3d2fba08 Add missing libkvm and libutil dependencies.
Now libprocstat takes care of its own dependencies and does not
require applications to specify them.

Reviewed by:	stas, jilles
2011-06-25 11:21:23 +00:00
jilles
2c34fd40cf libprocstat: For MAP_PRIVATE, do not consider the file open for writing.
If a file is mapped with with MAP_PRIVATE, no write permission is required
and changes do not end up in the file. Therefore, tools like fuser and fstat
should not show the file as open for writing.

The protection as displayed by procstat -v still includes write in this
case, and shows 'C' for copy-on-write.
2011-06-18 23:01:26 +00:00
jilles
54b5af424b libprocstat: Fix typo in error messages. 2011-06-18 22:16:55 +00:00
jilles
fe5611be56 libprocstat: Remove spaces between function name and open parenthesis. 2011-06-18 21:46:11 +00:00
jilles
73191046d3 libprocstat: Correct format for size_t (should be %zu, not %zd). 2011-06-18 21:29:25 +00:00
benl
2071e3510a Fix clang warnings.
Approved by:	philip (mentor)
2011-06-18 13:56:33 +00:00
pluknet
1fb58e61b4 Release allocated memory in procstat_close().
Reviewed by:	stass
2011-05-18 10:04:54 +00:00
stas
6a2ccc4ca4 - Whitespace fix. 2011-05-15 00:46:25 +00:00
stas
8cea38a9eb - Add symbol versioning to libprocstat.
Suggested by:	kib
2011-05-14 22:15:38 +00:00
stas
6fd0f335d9 - Don't try to build NWFS support module if NCP/IPX is disabled in the build.
- Rename ZFS definition to LIBPROCSTAT_ZFS to be consistent with NWFS and to
  prevent possible collisions.

Reported by:	many
2011-05-12 22:21:39 +00:00
stas
5f9f795476 - Commit work from libprocstat project. These patches add support for runtime
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
2011-05-12 10:11:39 +00:00