Commit Graph

15 Commits

Author SHA1 Message Date
Mitchell Horne
8a250c7568 procstat: Recognize HWCAP and HWCAP2 with auxv command
The two most recent additions to the elf auxiliary vector are
HWCAP and HWCAP2 which describe platform specific cpu capabilities.

Make procstat recognize these fields so that they aren't displayed
as UNKNOWN.

Reviewed by:	trociny, markj
Approved by:	markj (mentor)
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D20582
2019-06-11 00:59:46 +00:00
John Baldwin
6d7f919489 Teach procstat -x about the AT_EHDRFLAGS ELF auxiliary vector.
Submitted by:	Shawn Webb <lattera@gmail.com>
Reviewed by:	brooks
Obtained from:	HardenedBSD (bb71e9889d1362df01c2e5162e84cd7a4fc029c8)
MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D17067
2018-10-29 23:48:20 +00:00
Pedro F. Giffuni
1de7b4b805 various: general adoption of SPDX licensing ID tags.
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.
2017-11-27 15:37:16 +00:00
Brooks Davis
2a243b9539 Switch procstat from subcommand flags to verbs
- 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
2017-10-14 18:38:36 +00:00
Allan Jude
dafe59a9ec Fix inverted output re: stack protection no-execute flag in procstat(1)
PR:		196110
Submitted by:	Joerg Pernfuss <code.jpe@gmail.com>
Approved by:	bapt (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D3576
2015-09-06 17:47:03 +00:00
Allan Jude
474b62b876 Introduce libxo to procstat(1)
Reviewed by:	rodrigc, bapt
Approved by:	marcel (mentor)
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D2446
2015-09-05 17:02:01 +00:00
Mikolaj Golub
61e1b7c67b Use libprocstat(3) to retrieve ELF auxiliary vector.
MFC after:	1 month
2013-04-20 08:15:43 +00:00
Konstantin Belousov
2a43855795 Handle AT_TIMEKEEP in procstat(1) -x [1]. Remove the AT_COUNT switch
case, since AT_COUNT is not an aux vector, it is the counter of total
number of defined vectors.

PR:	bin/171662 [1]
MFC after:	1 week
2012-09-16 05:52:54 +00:00
Mikolaj Golub
8d2393a033 Always return 0 if the sysctl failed.
This fixes the bug: when procstat -xa was run and the sysctl for a
process returned ESRCH or EPERM, for this process procstat output the
result collected for the previous successful process.
2012-01-29 20:39:42 +00:00
Mikolaj Golub
cc1ff620b9 Make 64-bit procstat output ELF auxiliary vectors for 32-bit processes.
Reviewed by:	kib
MFC after:	1 week
2011-12-12 22:01:33 +00:00
Mikolaj Golub
cc43fe5b46 Don't output a warning if kern.proc.auxv sysctl has returned EPERM.
After r228288 this is rather a normal situation.

MFC after:	1 week
2011-12-05 19:39:15 +00:00
Mikolaj Golub
6bfefd99ce Cast a_val on printing. This fixes build on mips. 2011-11-28 07:09:29 +00:00
Mikolaj Golub
d3c10c5235 Make proctstat -x output more readable.
This also fixes the issue, spotted by mdf, with values that were
printed as decimal and had hex prefixes.

Discussed with:	kib, rwatson
MFC after:	2 weeks
2011-11-27 15:53:58 +00:00
Mikolaj Golub
7294321939 Fix build, hopefully.
Reviewed by:	kib
2011-11-23 07:34:09 +00:00
Mikolaj Golub
e99272c732 Add new options, -e and -x, to display process environment variables
and ELF auxiliary vectors.

MFC after:	2 weeks
2011-11-22 20:59:52 +00:00