summaryrefslogtreecommitdiffstats
path: root/bin/ps/print.c
Commit message (Collapse)AuthorAgeFilesLines
* For pts, print the pts number, instead of the full name. As it was, we endedcognet2006-02-211-0/+2
| | | | | | up always printing "pts". Submitted by: Michal Mertl <mime at traveller dot cz>
* Use warn() instead of perror().tjr2004-07-201-2/+2
|
* Change the "rtprio" format so it prints an informative string forgad2004-06-271-0/+3
| | | | | | the PRI_ITHD case (instead of just printing the digit '1'). Submitted by: Cyrille Lefevre
* Change "struct varent" to use the standard queue(8) macros, instead ofgad2004-06-231-14/+12
| | | | | | using it's own version of the same basic algorithm. Submitted by: part by Cyrille Lefevre, part of it done by me
* Avoid padding the value of "ucomm" when it is the last column in the line.gad2004-06-231-1/+4
| | | | Submitted by: Cyrille Lefevre
* Make sure the value of "upr" (scheduling priority on return from system call)gad2004-06-231-1/+13
| | | | | | is scaled in the same way that "pri" (scheduling priority) is scaled. Submitted by: Cyrille Lefevre
* Have `ps' return the cputimes for zombies, with the assumption thatgad2004-06-211-1/+1
| | | | | | | kvm_getprocs() will provide useful information if it can, or *it* will provide a zero value if it can not find something appropriate. Submitted by: bde
* Add the `-O emul' format option, which prints the name of the system-callgad2004-06-201-0/+9
| | | | | | | | emulation environment the process is in. "emul" as a keyword is picked up from OpenBSD. PR: bin/65803 Submitted by: Cyrille Lefevre
* From SUSv3:gad2004-06-201-1/+1
| | | | | | | | | | | Any [standard output] field need not be meaningful in all implementations. In such a case a hyphen ('-') should be output in place of the field value So have the `-O label' option print out the string " -" if the process has no label. Approved by: Silence from rwatson and green (when asked in March...)
* Remove clause 3 from the UCB licenses.markm2004-04-061-4/+0
| | | | OK'ed by: imp, core
* Fix `-o rtprio' so it prints the correct value.gad2004-03-281-2/+2
| | | | | | PR: bin/59417 Submitted by: Jan Willem Knopper This fix by: bde (in the audit-trail of the PR)
* Implement the nwchan keyword that has been in the man page, but washarti2003-08-131-0/+13
| | | | | not implemented. This is just handy if you want to ddb the address some process is waiting on.
* Revert the zombie part of previous commitcharnier2003-04-151-1/+1
|
* Correct style bugs. Don't skip zombies in cputime(), according to Bruce,charnier2003-04-141-58/+42
| | | | | | zombie CPU times are valid. Adjust array size in strftime(3). Submitted by: Bruce
* Display residency and sleep times (re and sl fields) larger than 127 as 127.tjr2003-04-121-1/+3
| | | | | | | 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
* Display elapsed time (-o etime) using [[dd-]hh:]mm:ss, which according tocharnier2003-02-051-3/+20
| | | | | | 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-4/+4
| | | | | case to do the right thing and affect exactly one column. This is consistent with GNU ps(1) in BSD mode, and POLA.
* Refer to the process label as proclabel, as there is a function called label,jmallett2003-01-181-10/+10
| | | | and that's what these locals were called before.
* Do not print a header line if it would be empty; required by 1003.1-2001.tjr2002-10-311-0/+9
|
* Use the MAC interface to list process MAC labels rather than usingrwatson2002-10-241-3/+46
| | | | | | | | | | 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-9/+9
|
* Rename new PLONG type to PGTOK as the conversion is more important than thejmallett2002-09-171-1/+1
| | | | | | 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-18/+3
| | | | | 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-0/+10
| | | | | | | | 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
* Do not risk using the kernel pgtok() which assumes the page size ispeter2002-09-131-6/+2
| | | | constant.
* Fixed a printf format error that was fatal on alphas. Adding WFORMAT=0bde2002-07-111-2/+1
| | | | | | | | to the Makefile didn't affect this bug because WFORMAT only controls higher- level format checking (not the -Wformat that is implicit in -Wall). Fixed a nearby printf format error that was benign and 3 nearby style bugs.
* Make printval() take a 'void *' thus negating any assumptions the compilerjmallett2002-07-071-2/+2
| | | | may try to make about the alignment of the dereferenced datum.
* Consistently use FBSDIDobrien2002-06-301-4/+2
|
* Cast to long to match format. Hidden by revision 1.18 of Makefile.jmallett2002-06-071-1/+2
|
* Use a global `now' variable for the current time, and initialise it atjmallett2002-06-061-6/+0
| | | | startup, right after calling setlocale(3).
* Implement a SUSv3-ignorant but "time"-similar format for "etime", elapsedjmallett2002-06-061-0/+17
| | | | | run time (NOT cpu time). cputime() and elapsed() both need to honour SUSv3 now.
* Support the SUSv3 `rgroup' format.jmallett2002-06-061-5/+18
| | | | Clean up some local style bogons.
* SUSv3 conform on the "comm" and "args" formats, and make correct the "command"jmallett2002-06-061-0/+30
| | | | format, since it's BSDlike, and "comm" is actually different.
* 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
* Use a const char * where it is meant to be used. There's no reason to tryjmallett2002-06-051-1/+2
| | | | to discard the const qualifier here.
* ANSIfy.markm2002-02-221-1/+1
|
* Revert wchan functionality. Add 'mwchan' to supply new duel mutex/msleepdillon2002-02-211-1/+24
| | | | | | functionality and make it the default. With additional improvements by: Mark Peek <mp@FreeBSD.org>
* Fixed divots that I created when I moved prototypes of group_from_gidimp2002-02-191-0/+2
| | | | | | | and user_from_uid to grp.h and pwd.h. Update the man pages. Submitted by: David Malone Pointy hat to: imp
* When blocked on a mutex, display the mutex name via the wchan string fielddillon2002-02-161-1/+4
| | | | | so we can at least tell the difference between being blocked in Giant and being blocked in some other mutex.
* WARNS=4 fixes (incomplete, so set NO_WERROR), and lots of extramarkm2002-02-031-34/+17
| | | | cleanup courtesy of automatic checking (lint).
* o __P has been reovedimp2002-02-021-93/+33
| | | | | | | | | 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.
* Add missed includes.sobomax2002-01-151-0/+1
| | | | Reviewed by: md5
* Add LOMAC options (the "Z" flag in both cases) to display extra informationgreen2001-11-261-0/+11
| | | | | | in ls(1) and ps(1). Sponsored by: DARPA, NAI Labs
* KSE Milestone 2julian2001-09-121-2/+3
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* UPAGES as a constant is gone in KSE. We are going to have to trustpeter2001-09-101-3/+1
| | | | and/or fix ki_rssize.
* 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".
* Check for the PS_SINTR flag in the right field of struct kinfo_proctegge2001-06-161-1/+1
| | | | (ki_sflag).
* Depollute headers now that the VM headers DTRT.markm2001-05-031-1/+0
|
* Compensate for header dethreading.markm2001-05-011-0/+1
|
* Small optimization: set use_ampm only when neededache2001-03-031-0/+5
|
OpenPOWER on IntegriCloud