summaryrefslogtreecommitdiffstats
path: root/bin/ps/ps.c
Commit message (Collapse)AuthorAgeFilesLines
* $Id$ -> $FreeBSD$peter1999-08-271-1/+1
|
* On FreeBSD/alpha, ps(1) does not correctly report process start timeswpaul1999-04-011-1/+40
| | | | | | | | | | | | | | | | | and CPU runtime because it can't access the user area via /proc/<pid>/mem. This is because the uarea is not mapped into the process address space at USRSTACK on the alpha like it is on the x86. Since I'm haven't been able to wrap my brain around the VM system enough to be able to figure out how to achieve this mapping, and since it's questionable that such an architectural change is correct, I implemented a workaround to allow ps(1) to read the uarea from /dev/kmem using kvm_read() instead of from the process address space via kvm_uread(). The kludge is hidden inside #ifdef __alpha__/#endif so as not to impact the x86. (Note that top(1) probably uses this same gimmick since it works on FreeBSD/alpha.) Reviewed by: dfr
* Pick up kernel variables/constants using sysctl rather than through /dev/memphk1998-06-301-4/+10
| | | | | | | | Use /dev/null for opening the kvm library, we don't need access to /dev/mem anymore. ps can now run without the setgid(kmem) bit. If it does it will not be able to show argv/envp for another uid's processes unless you are root.
* Correct use of .Nm. Add rcsid.charnier1998-05-151-3/+5
|
* cosmetic change for optstringdima1998-02-181-2/+2
|
* Add an option to building PS, so that the upages are explicitly paged in onlydyson1997-12-051-11/+36
| | | | | | | | | | | | | for users who are root, or in group wheel. This is useful on large timesharing systems where a PS command can cause the system to grind to a halt. The ability to get the information isn't diminished for those who really need the additional detail (administrators.) Normal users won't see any difference unless the processes are swapped out. The "really get it mode" is invoked by the use of an additional flag in the command string "-f". New/old behavior is selectable with a compile option. PR: 5196 Submitted by: Matt Dillon <dillon@best.net>
* Kill #ifndef NEWVM etc. It affected a lot of other things besidespeter1997-08-031-9/+1
| | | | | | | 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.
* Cosmetic change in usage string.charnier1997-06-061-6/+5
|
* Dynamically adjust size of displayed username to the longest username whichjkh1997-04-291-5/+46
| | | | | | | 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>
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-281-2/+2
| | | | posix standard on the topic.
* 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-3/+3
|
* Remove unneeded #include <sys/proc.h>.hsu1996-11-101-2/+1
|
* Implement a -c option to ps to display the short command name instead ofpeter1996-10-211-5/+9
| | | | | | | | | 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).
* Use the correct buffer size from limits.h for the error buffermpp1996-01-201-2/+3
| | | | | | passed to kvm_open. Closes PR# 476. Submitted by: Jeffrey Hsu <hsu@freebsd.org>
* oops. I forgot to add the "[-U username]" option to the usage string.peter1996-01-121-2/+2
|
* Implement a new option to ps.. `-U username'. This allows you topeter1995-12-261-3/+14
| | | | | | list the processes belonging to a particular user without having to use `-u' and grepping for the username. Basically you can now get a short `ps -x' like list (with more space for the command) for other users.
* Change local to LC_ALL, there is no bitmaskache1995-10-261-2/+3
|
* Add setlocale LC_CTYPE|LC_TIMEache1995-10-231-1/+3
|
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
| | | | Reviewed by: phk
* You will find enclosed some changes to make gcc -Wall more happy injoerg1995-03-191-4/+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)
* Use kvm_uread instead of kvm_read to access the upages.dg1994-10-181-2/+3
|
* On second thought...back out previous commit.dg1994-10-021-3/+2
|
* Include rtprio.hdg1994-10-021-2/+3
|
* Added $Id$dg1994-09-241-0/+2
|
* BSD 4.4 Lite bin Sourcesrgrimes1994-05-261-0/+504
OpenPOWER on IntegriCloud