summaryrefslogtreecommitdiffstats
path: root/bin/ps/keyword.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r267196:pluknet2014-06-261-0/+2
| | | | Add support for inspecting process flags set in p_flag2.
* Add the ability to display the default FIB number for a process to thewill2013-08-261-0/+1
| | | | | | | | | | | | | | | | | | ps(1) utility, e.g. "ps -O fib". bin/ps/keyword.c: Add the "fib" keyword and default its column name to "FIB". bin/ps/ps.1: Add "fib" as a supported keyword. sys/compat/freebsd32/freebsd32.h: sys/kern/kern_proc.c: sys/sys/user.h: Add the default fib number for a process (p->p_fibnum) to the user land accessible process data of struct kinfo_proc. Submitted by: Oliver Fromme <olli@fromme.com>, gibbs
* - Add 'dsiz' and 'ssiz' keywords to show data and stack size respectively.zont2012-09-181-0/+2
| | | | | Approved by: kib (mentor) MFC after: 1 week
* Add 'cow' keyword to show per-process cow count.kib2012-05-231-0/+1
| | | | | Submitted by: Andrey Zonov <andrey zonov org> MFC after: 1 week
* Make ps(1) automatically size its column widths.trasz2011-09-291-162/+100
|
* Rename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN.bz2011-07-181-2/+2
| | | | | | | | | Provide backward compatibility defines under BURN_BRIDGES. Suggested by: jhb Reviewed by: emaste Sponsored by: Sandvine Incorporated Approved by: re (kib)
* Add "gid" and "group" keywords to display the effective group IDtrasz2011-06-141-0/+7
| | | | | | | and effective group name. Also, add "egid", "egroup" and "euid" aliases. PR: bin/146331 Submitted by: Jeremie Le Hen <jeremie at le-hen dot org>
* Get rid of DSIZ; instead just call the sizing function if provided.trasz2011-04-121-11/+11
|
* Add proper width calculation for time fields (time, cputime and usertime).trasz2011-03-241-4/+6
| | | | This fixes the ugly overflow in "ps aux" output for "[idle]".
* Make "LOGIN" and "CLASS" columns width scale properly instead of wasting space.trasz2011-03-241-4/+4
|
* Implement the usertime and systime keywords for ps, printing thekib2011-03-171-0/+3
| | | | | | | corresponding times reported by getrusage(). Submitted by: Dan Nelson <dnelson allantgroup com> MFC after: 1 week
* Export login class information via kinfo and make it possible to viewtrasz2011-03-051-0/+2
| | | | it using "ps -o class".
* Make a thread's address available via the kern proc sysctl, just like theemaste2010-10-081-0/+2
| | | | | | | | process address. Add "tdaddr" keyword to ps(1) to display this thread address. Distilled from Sandvine's patch set by Mark Johnston.
* Fix alignment for the 'flags' label, and make more room for 'tdev'.trasz2010-07-241-2/+2
| | | | MFC after: 1 month
* o) Add a keyword to displaying elapsed time in integer seconds, "etimes".jmallett2010-03-171-0/+1
| | | | | | o) Give slightly better (i.e. any) documentation of the format of "etime". Reviewed by: jilles
* Fix small resource leak (memory).netchild2009-11-171-0/+1
| | | | | Reviewed by: gad MFC after: 1 week
* Increase width for %CPU, RSS and VSZ columns for now. Modern systemsdelphij2009-11-031-3/+3
| | | | tend to have larger memory, larger process, and more CPU.
* [1] When showing threads, the thread name just appears if the commattilio2009-02-261-9/+12
| | | | | | | | | | | | | | | | | | | label is choosen as last printout (ucomm suffers of this such bug too). That bug is caused by the fact that the fixed size of printout doesn't leave enough space for them to be printed out. Implement ucomm and comm commands with a dynamic size lenght for buffers. [2] On AMD64 architecture pointers don't have enough chars space to be shown (8 chars while they need 16). Fix them by providing a variadic space so that it fits well on both 64 and 32 bits architectures. [3] Check a return value of malloc() that wasn't checked before. PR: bin/128841, bin/128842 Reviewed by: jhb, emaste Sponsored by: Sandvine Incorporated
* fix sorting of 'tdnam' keyword in keyword list.julian2007-10-281-2/+1
|
* Introduce a way to make pure kernal threads.julian2007-10-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | kthread_add() takes the same parameters as the old kthread_create() plus a pointer to a process structure, and adds a kernel thread to that process. kproc_kthread_add() takes the parameters for kthread_add, plus a process name and a pointer to a pointer to a process instead of just a pointer, and if the proc * is NULL, it creates the process to the specifications required, before adding the thread to it. All other old kthread_xxx() calls return, but act on (struct thread *) instead of (struct proc *). One reason to change the name is so that any old kernel modules that are lying around and expect kthread_create() to make a process will not just accidentally link. fix top to show kernel threads by their thread name in -SH mode add a tdnam formatting option to ps to show thread names. make all idle threads actual kthreads and put them into their own idled process. make all interrupt threads kthreads and put them in an interd process (mainly for aesthetic and accounting reasons) rename proc 0 to be 'kernel' and it's swapper thread is now 'swapper' man page fixes to follow.
* Re-correct commit 1.73, but this time in a way that does not causegad2006-04-061-9/+18
| | | | | | | | | | | all column-headers to print in lowercase by default. I was in too much of a rush in committing 1.75, and didn't notice that the case had changed. This time I did considerably more testing, and used 'diff' instead of just quickly eyeballing the results... Apologies. I expect this means the dunce cap is mine for awhile. If this doesn't work, I'll just drop back to 1.72 and hide under my desk for awhile.
* Fix a problem introduced by change 1.73, which causes a seg-fault ifgad2006-04-051-0/+2
| | | | | | | | the user specifies a keyword which is an alias to some other keyword. E.g.: stat (for state) or pcpu (for %cpu).. Submitted by: Kostik Belousov MFC plans: "soon"
* Collapse strncpy/strncat/strncat into a single snprintf, as suggestedgad2006-03-081-3/+1
| | | | | | by pjd. MFC after: 3 weeks
* Fix the case where the user specifies an alternate heading for somegad2006-03-081-6/+13
| | | | | | | | | output-format keyword, and the keyword they picked is an alias to some other keyword. E.g.: ps -o stat=Zustand $$ ('stat' is defined as an alias for 'state') PR: bin/57833 MFC after: 3 weeks
* Add and document the 'jid' keyword for the '-o' option.pjd2005-03-201-0/+1
| | | | | Reviewed by: gad MFC after: 3 days
* Since it is not un-common for a process's resident set size (rss)csjp2005-02-061-1/+1
| | | | | | | | | | | | | to exceed 10 megabytes in size (especially in X), bump the max column width from 4 bytes to 5. This will make the ps auxw output uniform again when a process's rss exceeds 10 megs. It should be noted that when 5 digits becomes to small, other solutions should be explored such as displaying them in megabytes or having ps automatically re-size column widths. Discussed with: gad MFC after: 1 week
* Change "struct varent" to use the standard queue(8) macros, instead ofgad2004-06-231-9/+2
| | | | | | using it's own version of the same basic algorithm. Submitted by: part by Cyrille Lefevre, part of it done by me
* Make sure the value of "upr" (scheduling priority on return from system call)gad2004-06-231-2/+1
| | | | | | is scaled in the same way that "pri" (scheduling priority) is scaled. Submitted by: Cyrille Lefevre
* Add the `-O emul' format option, which prints the name of the system-callgad2004-06-201-0/+3
| | | | | | | | emulation environment the process is in. "emul" as a keyword is picked up from OpenBSD. PR: bin/65803 Submitted by: Cyrille Lefevre
* Add new output-format keywords of LWP and NLWP, which show the thread-idgad2004-06-201-0/+8
| | | | | | | | | | and number-of-threads tied to a process. Result can be seen by typing, e.g.: ps -HO lwp,nlwp These new options are not documented yet. More options will be coming, and I will update the man page after I get farther along. PR: bin/65803 (though adjusted to fit our present source) Submitted by: Cyrille Lefevre
* Remove clause 3 from the UCB licenses.markm2004-04-061-4/+0
| | | | OK'ed by: imp, core
* MFp4 @46705:jmallett2004-02-081-0/+2
| | | | | | | Support "uprocp" exactly like "paddr" with the former having been documented in the manual but not implemented. PR: 42484
* Implement the nwchan keyword that has been in the man page, but washarti2003-08-131-0/+1
| | | | | not implemented. This is just handy if you want to ddb the address some process is waiting on.
* Display residency and sleep times (re and sl fields) larger than 127 as 127.tjr2003-04-121-2/+2
| | | | | | | This is what the manual page says ps should do, and what OpenBSD and NetBSD do. Based on a patch from Ken Stailey. PR: 27433, 46232
* Fix slight disorder that broke sorting. Put in bold warning about thesobomax2003-02-051-2/+3
| | | | | | fact that in this case order matters. Submitted by: Peter Edwards <pmedwards@eircom.net>
* Display elapsed time (-o etime) using [[dd-]hh:]mm:ss, which according tocharnier2003-02-051-1/+1
| | | | | | Solaris man page is the POSIX way. Reviewed by: jmallett
* Per-variable\ entry headers, to allow the 'ps -otime -otime=FOO' or similarjmallett2003-01-191-6/+13
| | | | | case to do the right thing and affect exactly one column. This is consistent with GNU ps(1) in BSD mode, and POLA.
* When inserting a non-user-specified (e.g. not via -o or -O) format, don't dupejmallett2003-01-191-5/+15
| | | | | | | | one that is already there. This is consistent with GNU ps(1)'s BSD mode, and POLA. Reported by: Andy Farkas <andyf@speednet.com.au> Tested by: Andy Farkas <andyf@speednet.com.au>
* Use the MAC interface to list process MAC labels rather than usingrwatson2002-10-241-1/+2
| | | | | | | | | | the LOMAC-specific interface (which is being deprecated). The revised LOMAC using the MAC framework will export levels listable using this mechanism. Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Catch up to SMTX -> SLOCK changes.jhb2002-10-021-1/+1
|
* List valid keywords, ala kill(1), rather than the csh builtin kill, whichjmallett2002-09-271-2/+5
| | | | | | | tells people to type kill -l, when no valid ones are specified. Sponsored by: Bright Path Solutions MFC after: 4 days
* Ala kill(1), tell people to type 'ps -L' for a list of format keywords.jmallett2002-09-271-1/+1
| | | | | Sponsored by: Rachel Hestilow <rachel@jerkcity.com> MFC after: 2 weeks
* Rename new PLONG type to PGTOK as the conversion is more important than thejmallett2002-09-171-2/+2
| | | | | | size (which is mostly undefined anyway). Submitted by: bde
* Conglomerate printing of ps_pgtok'd data into a PLONG type. I couldn't thinkjmallett2002-09-171-2/+2
| | | | | of a better name, except PINT, but I decided to go with assuming LONG to be safe, rather than assuming INT.
* Perform keyword.c:1.27 properly, implement -orss in the New World Order ofjmallett2002-09-161-2/+1
| | | | | | | | ps(1) formatting, using pgtok() to get the value in K, rather than printing it in pages. This is consistent with behaviour before keyword.c:1.26 (et al) which exists in STABLE today, and which uses the same metric as VSZ. Submitted by: bde
* Remove some NOTINUSE stuff. Good housekeeping.jmallett2002-09-161-9/+0
|
* - Use (MAXLOGNAME - 1) where UT_NAMESIZE was used to be able torobert2002-07-081-2/+1
| | | | (-)remove the inclusions of <utmp.h>.
* Consistently use FBSDIDobrien2002-06-301-4/+2
|
* Allow whitespace to act as a delimiter in the keywords list given to the -o,jmallett2002-06-081-3/+12
| | | | | | | | again, but also allow it in the user-specified header, too. This is far more backwards compatible and SUSv3-happy than allowing only comma to seperate the keywords list. Submitted by: tjr
* Implement a SUSv3-ignorant but "time"-similar format for "etime", elapsedjmallett2002-06-061-0/+1
| | | | | run time (NOT cpu time). cputime() and elapsed() both need to honour SUSv3 now.
OpenPOWER on IntegriCloud