summaryrefslogtreecommitdiff
path: root/usr.bin/procstat/procstat_threads.c
Commit message (Collapse)AuthorAgeFilesLines
* Consistently use __FBSDID("FreeBSD") for ids in usr.bin/procstat.Konstantin Belousov2020-09-271-2/+3
| | | | | | | | | Submitted by: Juraj Lutter <juraj@lutter.sk> MFC after: 1 week Differential revision: https://reviews.freebsd.org/D26568 Notes: svn path=/head/; revision=366210
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* Switch procstat from subcommand flags to verbsBrooks Davis2017-10-141-1/+1
| | | | | | | | | | | | | - Use an enumerated value instead of separate flags for commands - Look for a verb if no command flag is set - Lookup the "xocontainer" value based on the command - Document the new command verbs in the man-page Submitted by: kdrakehp@zoho.com Differential Revision: https://reviews.freebsd.org/D10916 Notes: svn path=/head/; revision=324619
* Export the whole thread name in kinfo_procEric van Gyzen2016-12-071-5/+4
| | | | | | | | | | | | | | | | | | kinfo_proc::ki_tdname is three characters shorter than thread::td_name. Add a ki_moretdname field for these three extra characters. Add the new field to kinfo_proc32, as well. Update all in-tree consumers to read the new field and assemble the full name, except for lldb's HostThreadFreeBSD.cpp, which I will handle separately. Bump __FreeBSD_version. Reviewed by: kib MFC after: 1 week Relnotes: yes Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D8722 Notes: svn path=/head/; revision=309676
* Introduce libxo to procstat(1)Allan Jude2015-09-051-14/+30
| | | | | | | | | | | Reviewed by: rodrigc, bapt Approved by: marcel (mentor) Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D2446 Notes: svn path=/head/; revision=287486
* Use procstat_getprocs(3) for retrieving thread information instead ofMikolaj Golub2013-04-201-32/+7
| | | | | | | | | direct sysctl calls. MFC after: 1 month Notes: svn path=/head/; revision=249668
* Rename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN.Bjoern A. Zeeb2011-07-181-3/+3
| | | | | | | | | | | | Provide backward compatibility defines under BURN_BRIDGES. Suggested by: jhb Reviewed by: emaste Sponsored by: Sandvine Incorporated Approved by: re (kib) Notes: svn path=/head/; revision=224199
* - Commit work from libprocstat project. These patches add support for runtimeStanislav Sedov2011-05-121-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=221807
* Include param.h instead of types.h before user.h so that the nestedRobert Watson2008-12-291-1/+1
| | | | | | | | | include of param.h can be removed from audit.h. MFC after: 3 weeks Notes: svn path=/head/; revision=186567
* WARNS fixes: mainly constness and avoid comparing signed withDavid Malone2008-02-081-1/+2
| | | | | | | | unsigned by making array indicies unsigned. Also note one or two unused parameters. Notes: svn path=/head/; revision=176107
* Display per-thread command line in TDNAME field for -k and -t; ifRobert Watson2007-12-031-3/+6
| | | | | | | | | | | | no per-thread name is available or the name is identical to the process name, display "-" instead. Very slightly shrink the COMM entry to make a bit more room, although this doesn't help with stack traces much. Suggested by: thompsa Notes: svn path=/head/; revision=174230
* Add procstat(1), a process inspection utility. This provides both someRobert Watson2007-12-021-0/+138
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> Notes: svn path=/head/; revision=174199