summaryrefslogtreecommitdiffstats
path: root/bin/ps/print.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Use AM/PM time only when available in localeache2001-03-021-2/+4
|
* Catch up to new priority interface.jake2001-02-121-14/+14
|
* Use decimal point from localeache2001-02-111-1/+5
|
* - Catch up to new proc flags.jhb2001-01-241-5/+6
|
* Change the proc information returned from the kernel so that itmckusick2000-12-121-91/+56
| | | | | | | | | | | | no longer contains kernel specific data structures, but rather only scalar values and structures that are already part of the kernel/user interface, specifically rusage and rtprio. It no longer contains proc, session, pcred, ucred, procsig, vmspace, pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If any of these changed in size, ps, w, fstat, gcore, systat, and top would all stop working. The new structure has over 200 bytes of unassigned space for future values to be added, yet is nearly 100 bytes smaller per entry than the structure that it replaced.
* Introduce a 'mtxname' keyword that displays the current mutex that ajhb2000-11-291-0/+18
| | | | process is blocked on or '-'.
* No need to work around SCCS variable expansion any more.kris2000-09-281-6/+2
|
* Major update to the way synchronization is done in the kernel. Highlightsjasone2000-09-071-1/+9
| | | | | | | | | | | | | | | include: * Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.) * Per-CPU idle processes. * Interrupts are run in their own separate kernel threads and can be preempted (i386 only). Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
* $Id$ -> $FreeBSD$peter1999-08-271-1/+1
|
* This Implements the mumbled about "Jail" feature.phk1999-04-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a seriously beefed up chroot kind of thing. The process is jailed along the same lines as a chroot does it, but with additional tough restrictions imposed on what the superuser can do. For all I know, it is safe to hand over the root bit inside a prison to the customer living in that prison, this is what it was developed for in fact: "real virtual servers". Each prison has an ip number associated with it, which all IP communications will be coerced to use and each prison has its own hostname. Needless to say, you need more RAM this way, but the advantage is that each customer can run their own particular version of apache and not stomp on the toes of their neighbors. It generally does what one would expect, but setting up a jail still takes a little knowledge. A few notes: I have no scripts for setting up a jail, don't ask me for them. The IP number should be an alias on one of the interfaces. mount a /proc in each jail, it will make ps more useable. /proc/<pid>/status tells the hostname of the prison for jailed processes. Quotas are only sensible if you have a mountpoint per prison. There are no privisions for stopping resource-hogging. Some "#ifdef INET" and similar may be missing (send patches!) If somebody wants to take it from here and develop it into more of a "virtual machine" they should be most welcome! Tools, comments, patches & documentation most welcome. Have fun... Sponsored by: http://www.rndassociates.com/ Run for almost a year by: http://www.servetheweb.com/
OpenPOWER on IntegriCloud