summaryrefslogtreecommitdiffstats
path: root/bin/ps/keyword.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Support the SUSv3 `rgroup' format.jmallett2002-06-061-0/+2
| | | | Clean up some local style bogons.
* SUSv3 conform on the "comm" and "args" formats, and make correct the "command"jmallett2002-06-061-3/+5
| | | | format, since it's BSDlike, and "comm" is actually different.
* As per behaviour on SVR4 systems, to allow any desirable type of header in thejmallett2002-06-061-2/+4
| | | | | | | | | | | | | | | | override, seperate by comma (',') only, rather than any type of whitespace (the literal space character (' ') had already been removed from this list). This allows things like: miamivice# ps -opid='Process > Identifier' Process Identifier 1350 1445 1450 To work.
* Widen the scope of fmt.c::1.19 and consistently use errx(3) if malloc(3) [orjmallett2002-06-051-2/+2
| | | | | | | | | | realloc(3)] happens to fail, everywhere in ps(1). Discussed with: bde, charnier (a while ago) fmt_argv() can no longer return NULL, so don't bother checking. Submitted by: bde
* Support the 'comm' keyword, which is equivalent to our 'command', butjmallett2002-06-051-0/+2
| | | | specified by SUSv3.
* A space cannot be a header string seperator it appears given the SUSv3jmallett2002-06-051-1/+1
| | | | | description of ps(1), which uses them. I question whether newline and tab can be either, but I'm not touching them. Yet.
* To comply with SUSv3, duplicate the variable contents for each given format,jmallett2002-06-051-1/+4
| | | | | | | | | | | | so that multiple -ovar=header lines do not overwrite eachother. This means that ps -ouser=USERNAME -ouser=WHO would now possibly print: USERNAME WHO juli juli Whereas before it would be: WHO WHO juli juli
* Duplicate the pointer to the string containing the header so it does not getjmallett2002-06-051-1/+1
| | | | frobbed when/if the pointer it is actually a part of gets freed.
* Revert wchan functionality. Add 'mwchan' to supply new duel mutex/msleepdillon2002-02-211-0/+1
| | | | | | functionality and make it the default. With additional improvements by: Mark Peek <mp@FreeBSD.org>
* WARNS=4 fixes (incomplete, so set NO_WERROR), and lots of extramarkm2002-02-031-116/+134
| | | | cleanup courtesy of automatic checking (lint).
* o __P has been reovedimp2002-02-021-9/+6
| | | | | | | | | o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are.
* Put the "mtxname" keyword in alphabetical order (t comes after s) sopeter2002-01-051-1/+1
| | | | that the keyword is recognized.
* Add LOMAC options (the "Z" flag in both cases) to display extra informationgreen2001-11-261-0/+1
| | | | | | in ls(1) and ps(1). Sponsored by: DARPA, NAI Labs
* On today's kernels masking with ~KERNBASE is turning out to be lesspeter2001-08-241-2/+2
| | | | | | than useful. It still hits at least 8 digits. Adjust for reality. This is still not satisfactory for the alpha if you add "-O paddr".
* Depollute headers now that the VM headers DTRT.markm2001-05-031-1/+0
|
* Compensate for header dethreading.markm2001-05-011-0/+1
|
* Introduce -osid and -otsidbrian2001-04-111-0/+4
| | | | Submitted by: dd
* Do not coredump if no options are supplied. (ps -o,)jlemon2001-02-141-1/+1
| | | | | Submitted by: rgrimes Obtained from: NetBSD
OpenPOWER on IntegriCloud