summaryrefslogtreecommitdiffstats
path: root/usr.bin/procstat/procstat.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC 266293:jhb2014-06-271-7/+18
| | | | | | | | - Add support for dumping current resource usage for processes via a new -r flag to procstat. - Add an -H flag to request information about threads rather than processes when dumping statistics. Currently it is only used for -r to display resource usage for individual threads instead of the entire process.
* Make use of newly added libprocstat(3) ability to extract procstattrociny2013-04-201-15/+28
| | | | | | | | | | | | | | | | | | | | | | | | info from a process core file. So now one can run procstat(1) on a process core e.g. to get a list of files opened by a process when it crashed: root@lisa:/ # procstat -f /root/vi.core PID COMM FD T V FLAGS REF OFFSET PRO NAME 658 vi text v r r-------- - - - /usr/bin/vi 658 vi ctty v c rw------- - - - /dev/pts/0 658 vi cwd v d r-------- - - - /root 658 vi root v d r-------- - - - / 658 vi 0 v c rw------- 11 3208 - /dev/pts/0 658 vi 1 v c rw------- 11 3208 - /dev/pts/0 658 vi 2 v c rw------- 11 3208 - /dev/pts/0 658 vi 3 v r r----n-l- 1 0 - /tmp/vi.0AYKz3Lps7 658 vi 4 v r rw------- 1 0 - /var/tmp/vi.recover/vi.GaGYsz 658 vi 5 v r rw------- 1 0 - - PR: kern/173723 Suggested by: jhb MFC after: 1 month
* Use procstat_getkstack(3) for retrieving process kernel stackstrociny2013-04-201-1/+1
| | | | | | instead of direct sysctl calls. MFC after: 1 month
* Use libprocstat(3) to retrieve ELF auxiliary vector.trociny2013-04-201-1/+1
| | | | MFC after: 1 month
* Use libprocstat(3) to retrieve process command line arguments andtrociny2013-04-201-2/+2
| | | | | | environment variables. MFC after: 1 month
* Use libprocstat(3) when retrieving binary information for a process.trociny2013-04-201-1/+1
| | | | MFC after: 1 month
* Use procstat_getrlimit(3) for retrieving rlimit information instead oftrociny2013-04-201-1/+1
| | | | | | direct sysctl calls. MFC after: 1 month
* Use procstat_getgroups(3) for retrieving groups information instead oftrociny2013-04-201-1/+1
| | | | | | direct sysctl. MFC after: 1 month
* Use more generic procstat_getvmmap(3) for retrieving VM layout of a process.trociny2013-04-201-1/+1
| | | | MFC after: 1 month
* Use procstat_getprocs(3) for retrieving thread information instead oftrociny2013-04-201-1/+1
| | | | | | direct sysctl calls. MFC after: 1 month
* procstat: only one mode flag can be specified, but required check for 'i'mjg2013-01-121-2/+2
| | | | | | and 'j' modes was missing. Fix that. MFC after: 3 days
* usr.bin/procstattrociny2011-11-241-6/+12
| | | | | | | | Add -l flag to display resource limits. PR: bin/161257 Reviewed by: kib MFC after: 2 weeks
* Add new options, -e and -x, to display process environment variablestrociny2011-11-221-5/+20
| | | | | | and ELF auxiliary vectors. MFC after: 2 weeks
* Updates to libprocstat(3) and procstat(1) to allow monitoring Capsicumrwatson2011-08-141-4/+12
| | | | | | | | | | 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
* - Commit work from libprocstat project. These patches add support for runtimestas2011-05-121-68/+49
| | | | | | | | | | | | | | | | | | | | | | | 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
* Teach procstat(1) to display some information about signal dispositionkib2010-03-081-5/+21
| | | | | | | and pending/blocked status for signals. Reviewed by: rwatson MFC after: 2 weeks
* Include param.h instead of types.h before user.h so that the nestedrwatson2008-12-291-1/+1
| | | | | | include of param.h can be removed from audit.h. MFC after: 3 weeks
* WARNS fixes: mainly constness and avoid comparing signed withdwmalone2008-02-081-6/+7
| | | | | unsigned by making array indicies unsigned. Also note one or two unused parameters.
* Add procstat(1), a process inspection utility. This provides both somerwatson2007-12-021-0/+252
of the missing functionality from procfs(4) and new functionality for monitoring and debugging specific processes. procstat(1) operates in the following modes: -b Display binary information for the process. -c Display command line arguments for the process. -f Display file descriptor information for the process. -k Display the stacks of kernel threads in the process. -s Display security credential information for the process. -t Display thread information for the process. -v Display virtual memory mappings for the process. Further revision and modes are expected. Testing, ideas, etc: cognet, sam, Skip Ford <skip at menantico dot com> Wesley Shields <wxs at atarininja dot org>
OpenPOWER on IntegriCloud