summaryrefslogtreecommitdiffstats
path: root/bin/ps/print.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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/
* Look at p_lock instead of P_NOSWAP etc as an indicator of unswappability.peter1999-04-061-2/+4
| | | | | (While here, put a #ifndef pgtok around the macro that gets a redefinition warning)
* Fix formatting of %CPU value on alpha.dfr1998-11-251-3/+3
| | | | Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
* Portability fixes when sizeof(int) != sizeof(long).dfr1998-09-141-3/+9
|
* Fixed printf format errors (second round with non-i386 typedefs).bde1998-06-281-2/+3
|
* Oops, the previous log message should have read "Fixed type mismatches -bde1998-06-281-1/+1
| | | | don't assume that time_t is long".
* Fixed printf format errors.bde1998-06-281-4/+7
|
* Fixed imperfections in previous commit (a poor variable name,bde1998-05-311-14/+14
| | | | excessive 64-bit arithmetic, and excessive changes).
* Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.phk1998-05-281-14/+14
| | | | | | | | | | | | | | | | | | | | Clean up (or if antipodic: down) some of the msgbuf stuff. Use an inline function rather than a macro for timecounter delta. Maintain process "on-cpu" time as 64 bits of microseconds to avoid needless second rollover overhead. Avoid calling microuptime the second time in mi_switch() if we do not pass through _idle in cpu_switch() This should reduce our context-switch overhead a bit, in particular on pre-P5 and SMP systems. WARNING: Programs which muck about with struct proc in userland will have to be fixed. Reviewed, but found imperfect by: bde
* If no value is present for the login name set it to '-'.steve1998-05-251-2/+35
| | | | | | | Also pretty-up the display of 'ps -Ortprio'. PR: 4947 Submitted by: Martin Kammerhofer <dada@sbox.tu-graz.ac.at>
* Correct use of .Nm. Add rcsid.charnier1998-05-151-3/+5
|
* Display VSZ much more accurately now.dyson1998-02-021-3/+2
|
* Fix "lstart". (Displays "19" rather than time)peter1997-08-031-2/+2
| | | | | PR: 4206 Submitted by: Tetsuya Furukawa <tetsuya@secom-sis.co.jp>
* Kill #ifndef NEWVM etc. It affected a lot of other things besidespeter1997-08-031-98/+4
| | | | | | | VM structure (eg: credentials etc) and it's highly unlikely we'll ever get to see the "tainted" BSD<=4.3 VM code in public use. Although it indicated the way some things used to be done, it obfuscates things too much.
* Dynamically adjust size of displayed username to the longest username whichjkh1997-04-291-1/+23
| | | | | | | appears, not the longest _maximum_ username (this should probably also go into 2.2, for the day when we bump up the username length there too). Submitted-By: Terry Lambert <terry@lambert.org>
* When "-c" is specified, don't pad the command with spaces if it isjdp1997-04-161-2/+5
| | | | | the last field on the line. "ps -axlc" was needlessly wrapping around on 80-character windows.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* -Wall cleaning.steve1996-12-141-4/+4
|
* Implement a -c option to ps to display the short command name instead ofpeter1996-10-211-2/+8
| | | | | | | | | the full argument vector. I've bumped into a few things that expected this switch to be present, the most recent was the snmp package in ports. I'm not 100% sure of the origins of this, but Linux has it, so does the "BSD-compatable" version of ps on our SVR4 systems (so I assume SunOS has it too).
* Make %CPU add up closer to 100%.. At least, it now agrees with top.. :-)peter1996-06-291-3/+4
| | | | Pointed out by: bde
OpenPOWER on IntegriCloud