summaryrefslogtreecommitdiffstats
path: root/bin/ps/print.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fix (I think) the %MEM count in 'ps -u'. It was bogusly taking thepeter1996-06-291-2/+2
| | | | | vm_rssize (in pages, not bytes), then dividing (bogusly) by the page size, then using that as a fraction of the total pages.
* CLSIZE -> getpagesize()phk1996-05-021-2/+2
|
* Replace NBPG with getpagesize()phk1996-05-021-3/+3
|
* I add #include <sys/user.h>phk1995-10-281-1/+2
|
* Correct the alignment of the tty column, which was affected by my change topeter1995-09-261-3/+3
| | | | | | | | allow more than two tty characters. David Greenman pointed out that when a process that had been revoked from it's controlling tty, the "-" sign was detached from any two-character names.
* Increase the tty column width from 2 to 3 characters.peter1995-09-041-2/+2
| | | | | | | | This gives us more room to breath with tty names, especially with drivers that support large numbers of ports.. eg: specialix and digiboard. This does not actually change the current tty names, it just allows room for reporting more characters if the drivers use them.
* Delete bogus referneces to timezone code internal header file `tzfile.h',wollman1995-08-071-4/+3
| | | | which is no longer bogusly installed in /usr/include.
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
| | | | Reviewed by: phk
* You will find enclosed some changes to make gcc -Wall more happy injoerg1995-03-191-5/+5
| | | | | | | | | /usr/src/bin. Note that some patches are still needed in that directory. I (Joerg) finished most of Philippe's cleanup. /bin/sh will still need *allot* of work, however. Submitted by: charnier@lirmm.fr (Philippe Charnier)
* Skip 'cua' 3 chars like 'tty' 3 charsache1994-10-021-2/+3
|
* On second thought...back out previous commit.dg1994-10-021-2/+1
|
* Include rtprio.hdg1994-10-021-1/+2
|
* Added $Id$dg1994-09-241-0/+2
|
* BSD 4.4 Lite bin Sourcesrgrimes1994-05-261-0/+741
OpenPOWER on IntegriCloud