aboutsummaryrefslogtreecommitdiff
path: root/bin/ps
Commit message (Collapse)AuthorAgeFilesLines
* MFC r326430:Edward Tomasz Napierala2018-04-162-0/+4
| | | | | | | Add "vmaddr" ps(1) keyword. Notes: svn path=/stable/11/; revision=332594
* Revert r330897:Eitan Adler2018-03-297-14/+0
| | | | | | | | | | | | | | | | | | | | This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code. Revert with prejudice. This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes. Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes. Requested by: gjb (re) Notes: svn path=/stable/11/; revision=331722
* MFC 330872:John Baldwin2018-03-244-1/+19
| | | | | | | Add a "jail" keyword to list the name of a jail rather than its ID. Notes: svn path=/stable/11/; revision=331471
* Partial merge of the SPDX changesEitan Adler2018-03-147-0/+14
| | | | | | | | | | These changes are incomplete but are making it difficult to determine what other changes can/should be merged. No objections from: pfg Notes: svn path=/stable/11/; revision=330897
* MFC 328306: Remove some KSE references from ps(1).John Baldwin2018-02-282-10/+7
| | | | | | | | | | | - Simplify the description of -H to assume 1:1 threading. - Drop 'process' from description of 'lwp' field and the corresponding XO field name. - Do add an expansion of LWP in the description of 'lwp' and 'nlwps'. - Add 'tid' as an alias for the 'lwp' field. Notes: svn path=/stable/11/; revision=330130
* MFC r304007:Eitan Adler2018-02-111-1/+2
| | | | | | | | | | Correct the history of where ps first appeared. PR: 211741 Submitted by: Sevan Janiyan <venture37@geeklan.co.uk> Notes: svn path=/stable/11/; revision=329120
* MFC r324427:Edward Tomasz Napierala2017-11-142-2/+5
| | | | | | | | | | | | | | | | Document "tdnam" keyword to ps(1), and add "tdname" alias. MFC r324429: Fix long name (used by libxo) for the "tdnam" ps(1) keyword. MFC r324430: Undocument "tdnam" (leaving it as an alias), and rename the column to TDNAME. Notes: svn path=/stable/11/; revision=325821
* MFC r324367:Edward Tomasz Napierala2017-11-141-1/+5
| | | | | | | | | | | Fix kvm_getprocs(3) error reporting in ps(1). Previously it just didn't work at all - kvm_getprocs(3) doesn't update the &nentries when it returns NULL. The end result was that ps(1) showed garbage data instead of reporting kinfo_proc size mismatch. Notes: svn path=/stable/11/; revision=325820
* MFC r323263:Edward Tomasz Napierala2017-10-041-2/+2
| | | | | | | Hint that the "-o emul" option for ps(1) shows the ABI. Notes: svn path=/stable/11/; revision=324272
* MFC r323228:Edward Tomasz Napierala2017-10-042-1/+7
| | | | | | | Make ps(1) flag processes in capsicum(4) capability mode with "C". Notes: svn path=/stable/11/; revision=324271
* MFC r323225:Edward Tomasz Napierala2017-10-041-2/+2
| | | | | | | | | | | | | Reflect realtime and idle priorities in ps(1) state flags, same like we do for the usual nice values. It could be argued that they should use another set of indicators, since the underlying mechanism is different, but they match the description in the manual page, and so I think it's ok to not overcomplicate things. PR: 81757 Notes: svn path=/stable/11/; revision=324270
* MFC r321368:Edward Tomasz Napierala2017-08-051-2/+2
| | | | | | | | Use the "tree" word in ps(1) -d option description, to make it easier to find. Notes: svn path=/stable/11/; revision=322092
* MFC r309676Eric van Gyzen2016-12-151-6/+10
| | | | | | | | | | | | | | | | Export the whole thread name in kinfo_proc 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. Sponsored by: Dell EMC Notes: svn path=/stable/11/; revision=310120
* MFC r303423:Konstantin Belousov2016-08-151-0/+1
| | | | | | | Force SIGSTOP to be the first signal reported after the attach. Notes: svn path=/stable/11/; revision=304189
* MFC 302900,302902,302921,303461,304009:John Baldwin2016-08-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a mask of optional ptrace() events. 302900: Add a test for user signal delivery. This test verifies we get the correct ptrace event details when a signal is posted to a traced process from userland. 302902: Add a mask of optional ptrace() events. ptrace() now stores a mask of optional events in p_ptevents. Currently this mask is a single integer, but it can be expanded into an array of integers in the future. Two new ptrace requests can be used to manipulate the event mask: PT_GET_EVENT_MASK fetches the current event mask and PT_SET_EVENT_MASK sets the current event mask. The current set of events include: - PTRACE_EXEC: trace calls to execve(). - PTRACE_SCE: trace system call entries. - PTRACE_SCX: trace syscam call exits. - PTRACE_FORK: trace forks and auto-attach to new child processes. - PTRACE_LWP: trace LWP events. The S_PT_SCX and S_PT_SCE events in the procfs p_stops flags have been replaced by PTRACE_SCE and PTRACE_SCX. PTRACE_FORK replaces P_FOLLOW_FORK and PTRACE_LWP replaces P2_LWP_EVENTS. The PT_FOLLOW_FORK and PT_LWP_EVENTS ptrace requests remain for compatibility but now simply toggle corresponding flags in the event mask. While here, document that PT_SYSCALL, PT_TO_SCE, and PT_TO_SCX both modify the event mask and continue the traced process. 302921: Rename PTRACE_SYSCALL to LINUX_PTRACE_SYSCALL. 303461: Note that not all optional ptrace events use SIGTRAP. New child processes attached due to PTRACE_FORK use SIGSTOP instead of SIGTRAP. All other ptrace events use SIGTRAP. 304009: Remove description of P_FOLLOWFORK as this flag was removed. Notes: svn path=/stable/11/; revision=304188
* MFC r303213:Konstantin Belousov2016-07-301-0/+1
| | | | | | | | | Add missed required call to xo_finish() when only header is printed. Approved by: re (gjb) Notes: svn path=/stable/11/; revision=303550
* ps(1): Expand variables to match expanded fieldsConrad Meyer2016-06-012-2/+2
| | | | | | | | | | | ki_flag and ki_tdflag have been 'long', not 'int', since 2000 and 2005, respectively. Submitted by: Shawn Wills <swills at isilon dot com> Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=301160
* Fix CID 1011370 (Resource leak) in ps.Don Lewis2016-05-252-8/+11
| | | | | | | | | | | | | | | | There is no need to to call strdup() on the value returned by fmt(). The latter calls fmt_argv() which always returns a dynamically allocated string, and calling strdup() on that leaks the memory allocated by fmt_argv(). Wave some const magic on ki_args and ki_env to make the direct assignment happy. This requires a tweak to the asprintf() case to avoid a const vs. non-const mismatch. Reported by: Coverity CID: 1011370 MFC after: 1 week Notes: svn path=/head/; revision=300648
* Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-191-1/+1
| | | | | | | | | kvm_open(3) will return NULL when it cannot access kernel virtual memory. MFC after: 2 weeks. Notes: svn path=/head/; revision=298233
* MFHGlen Barber2016-02-101-1/+1
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295458
| * Rename P_KTHREAD struct proc p_flag to P_KPROC.Konstantin Belousov2016-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | I left as is an apparent bug in ntoskrnl_var.h:AT_PASSIVE_LEVEL() definition. Suggested by: jhb Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=295435
* | Explicitly add unmarked bin/ binaries to the runtime package.Glen Barber2016-02-091-0/+1
|/ | | | | | | | | | | Note: tcsh(1) has a MK_TCSH=no test, so this should be a separate package, which requires pre-install/post-install scripts, to be added later. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295439
* Fix spelling, as recommended by igor tool.Craig Rodrigues2015-12-011-1/+1
| | | | Notes: svn path=/head/; revision=291608
* Add more text to explain --libxo flag.Craig Rodrigues2015-12-011-1/+8
| | | | Notes: svn path=/head/; revision=291607
* Update dependencies after r291406 added libelf to libkvm.Bryan Drewery2015-12-011-0/+1
| | | | | | | | | | | Unfortunately filemon/meta mode tracks all indirect dependencies here since ld(1) is reading libelf when linking in libkvm. Churn would be reduced if this was able to be limited to direct dependencies. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291558
* Make libxo depend on libutil because it uses humanize_number after r287111Enji Cooper2015-10-181-1/+1
| | | | | | | | | | | Remove overlinking in lib/libxo/tests, sbin/savecore, and usr.bin/{iscsictl,wc,xo} PR: 203673 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289490
* Update META_MODE dependencies.Bryan Drewery2015-09-171-0/+1
| | | | Notes: svn path=/head/; revision=287905
* Upgrade libxo to 0.4.5.Marcel Moolenaar2015-08-241-1/+1
| | | | | | | | | | Local changes incorporated by 0.4.5: r284340 Local changes retained: r276260, r282117 Obtained from: https://github.com/Juniper/libxo Notes: svn path=/head/; revision=287111
* mdoc: minor Xr fixesJoel Dahl2015-07-141-2/+2
| | | | Notes: svn path=/head/; revision=285556
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-277-177/+260
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=283595
| * \ Merge from head@274682Simon J. Gerraty2014-11-192-2/+4
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ \ Merge head from 7/28Simon J. Gerraty2014-08-192-1/+15
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | | Updated dependenciesSimon J. Gerraty2014-05-101-0/+3
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | | | Merge from headSimon J. Gerraty2014-05-083-7/+62
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * \ \ \ \ Merge headSimon J. Gerraty2014-04-282-10/+5
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * \ \ \ \ \ Merge from headSimon J. Gerraty2013-09-052-0/+4
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * \ \ \ \ \ \ sync from headSimon J. Gerraty2013-04-121-1/+5
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * | | | | | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | | | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | | | | | Sync with HEAD.David E. O'Brien2013-02-084-14/+35
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * \ \ \ \ \ \ \ \ Sync from headSimon J. Gerraty2012-11-044-7/+15
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | | | | | | Remove unused variable, this variable fmtstr was introduced at revision r225868Marcelo Araujo2015-06-011-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and it is not used anymore after the convertion to use libxo at revision r283304. Differential Revision: D2678 Reviewed by: marcel Notes: svn path=/head/; revision=283867
* | | | | | | | | | | Document recent p_flag2 additions.Sergey Kandaurov2015-05-271-1/+4
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=283606
* | | | | | | | | | Convert to use libxo. Document use of libxo as well.Marcel Moolenaar2015-05-226-166/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obtained from: Phil Shafer <phil@juniper.net> Sponsored by: Juniper Networks, Inc. Notes: svn path=/head/; revision=283304
* | | | | | | | | | Use 24h timestamps in the ps(1) STARTED columnMark Felder2015-03-172-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous 12h AM/PM format was perplexing as it didn't follow the locale of the user and was a minor annoyance to FreeBSD users coming from Linux. Additionally, the man page was incorrect about the strftime format. There are three time formats that may be displayed in the STARTED column depending on the age of the process. Below is an example. For a process started at 14:30 on Monday 16 March 2015, the following formats may be used: 14:30 for process < 24h old (24h Timestamp) Mon14 for process > 24h, < 1 week old (Weekday Hour) 16Mar15 for process > 1 week old (Day Month Year) Differential Revision: https://reviews.freebsd.org/D1620 Reviewed by: brd Approved by: trasz Notes: svn path=/head/; revision=280171
* | | | | | | | | | Prevent access to an uninitialized variablePedro F. Giffuni2015-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "-h" option may access an uninitialized value. Prevent it by properly initializing the value. CID: 1006559 Notes: svn path=/head/; revision=277979