summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pstat
Commit message (Collapse)AuthorAgeFilesLines
* Significantly reduce the memory leak as noted in BUGS section forscf2007-07-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | setenv(3) by tracking the size of the memory allocated instead of using strlen() on the current value. Convert all calls to POSIX from historic BSD API: - unsetenv returns an int. - putenv takes a char * instead of const char *. - putenv no longer makes a copy of the input string. - errno is set appropriately for POSIX. Exceptions involve bad environ variable and internal initialization code. These both set errno to EFAULT. Several patches to base utilities to handle the POSIX changes from Andrey Chernov's previous commit. A few I re-wrote to use setenv() instead of putenv(). New regression module for tools/regression/environ to test these functions. It also can be used to test the performance. Bump __FreeBSD_version to 700050 due to API change. PR: kern/99826 Approved by: wes Approved by: re (kensmith)
* Back out all POSIXified *env() changes.ache2007-05-011-3/+3
| | | | | | | | | Not because I admit they are technically wrong and not because of bug reports (I receive nothing). But because I surprisingly meets so strong opposition and resistance so lost any desire to continue that. Anyone who interested in POSIX can dig out what changes and how through cvs diffs.
* Preparing for upcoming POSIXed putenv() rewrite:ache2007-04-301-3/+3
| | | | don't allow const as putenv() arg, dup it
* - Recognize -g and -m in pstat(8) too.ru2007-04-032-6/+6
| | | | | | - Document -g and -m support in swapinfo(8). Reviewed by: markm
* Add -m (megabytes) and -g (gigabytes) options. I'm tired of being toldmarkm2007-04-012-4/+20
| | | | | | I can't do this. MFC: 1 month
* Another crashdump fix: nfiles was renamed to openfiles in 5.x.jhb2007-02-141-1/+1
| | | | MFC after: 3 days
* Print (total - used) as the amount of available swap for a swap devicerwatson2005-11-171-1/+1
| | | | | | | | when printing swapinfo output, rather than (total), as that is (strictly speaking) more accurate. Pointed out by: Rob <spamrefuse at yahoo dot com> MFC after: 3 days
* Remove unused variables.stefanf2005-04-091-2/+0
|
* Use a designator for initializing only one member of the nlistkeramida2005-03-212-6/+6
| | | | | | | | structs, making pstat WARNS=3 clean on i386, sparc64 and amd64. Bump WARNS level to 3. Approved by: sam, pjd
* - Add a -h flag to pstat to print swap sizes in "human readable"keramida2005-03-213-24/+50
| | | | | | | | | | | | | | | | | | | format, with humanize_number(3). - Move the common parts of the code that prints the sizes for a single swap device and the total to a single function to avoid repeating the humanize_number() stuff all over the place. - Change the type of CONVERT() from intmax_t to int64_t, since this makes calling humanize_number() easier but cast the values to intmax_t before printing them, to make use of the %jd format that printf() supports. - Document the new -h flag in the manpage and bump its date. Approved by: pjd Useful tips: brooks MFC after: 2 weeks
* Sort sections.ru2005-01-181-4/+4
|
* Don't include sys/user.h merely for its side-effect of recursivelydas2004-11-271-1/+2
| | | | including other headers.
* Corrected the description of the -t output columns to reflect reality.dds2004-11-111-12/+11
| | | | MFC after: 2 weeks
* Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived softwareimp2004-08-072-8/+0
| | | | (with permission of addtional copyright holders where appropriate)
* Eliminated double whitespace.ru2004-07-031-1/+1
|
* Mechanically kill hard sentence breaks.ru2004-07-021-2/+4
|
* Update kvm mode to match kernel changes.phk2004-06-091-3/+3
|
* -N without -M is pointless.ru2004-03-262-12/+10
|
* Update information of how pstat(8) accesses the running system.ru2004-03-261-12/+15
|
* Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)markm2004-03-051-1/+1
| | | | | | | | | | | | | | | that this provokes. "Wherever possible" means "In the kernel OR NOT C++" (implying C). There are places where (void *) pointers are not valid, such as for function pointers, but in the special case of (void *)0, agreement settles on it being OK. Most of the fixes were NULL where an integer zero was needed; many of the fixes were NULL where ascii <nul> ('\0') was needed, and a few were just "other". Tested on: i386 sparc64
* Remove options processing for dumping swapdevice radix map.phk2003-07-312-5/+1
|
* When dumping swap information, drop the "Type" field which displaysphk2003-07-311-7/+4
| | | | | | | a constant string of little information these days. This removes the need to #include <vm/swap_pager.h> which is due to become a kernel only include file.
* Report NODEV devices as <NFSfile>phk2003-06-051-2/+6
|
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.obrien2003-05-031-4/+4
|
* style.Makefile(5)obrien2003-04-041-2/+2
|
* - Modernize the format of the open file showing mode output:robert2003-01-311-10/+23
| | | | | | | | | | | | | | | | | | . Print the column headers centered (except for the left-aligned TYPE header) using a different header for architectures where sizeof(uintptr_t) is not four. . Consistently do not print a '0x' prefix for hexadecimal values. . Separate columns by a single space character. . Pad the columns presenting an address or offset enough to hold their respective largest value. . Do not restrict the output to unknown file types, inodes and sockets; allow displaying of pipes, fifos, kqueues and crypto file descriptors too. - Shorten an overly long line by removing a cast of printf's return value to void. PR: alpha/45240 Tested on: i386, sparc64, alpha
* Bow to the whining masses and change a union back into void *. Retaindillon2003-01-131-1/+1
| | | | | removal of unnecessary casts and throw in some minor cleanups to see if anyone complains, just for the hell of it.
* Change struct file f_data to un_data, a union of the correct structdillon2003-01-121-1/+1
| | | | | | | | | | pointer types, and remove a huge number of casts from code using it. Change struct xfile xf_data to xun_data (ABI is still compatible). If we need to add a #define for f_data and xf_data we can, but I don't think it will be necessary. There are no operational changes in this commit.
* Make struct swblock kernel only, to make vm/swap_pager.h userland includable.phk2003-01-031-1/+1
| | | | | Move struct swdevt from sys/conf.h to the more appropriate vm/swap_pager.h. Adjust #include use in libkvm and pstat(8) to match.
* Back out rev 1.78; getbsize(3)'s original interface has been restored.mike2002-12-301-8/+6
| | | | Approved by: markm
* Adjust argument passed to getbsize().markm2002-10-231-6/+8
|
* Use struct xfile, not struct file.des2002-07-312-26/+22
|
* The .Nm utilitycharnier2002-07-141-3/+4
|
* If unable to retrive maxfiles / openfiles, fail rather than print garbage.des2002-05-281-33/+21
| | | | | | | | Gratuitously rename a couple of variables. Remove unused macros. Add NAI copyright. Sponsored by: DARPA, NAI Labs
* Remove the code that was disabled in a recent commit; it is of very limiteddes2002-05-282-101/+56
| | | | | | | | | use and has been broken in -CURRENT for a long time. Clean up unneeded entries in the nlist array. Implement kvm-backed ttymode (which we never had before). Incomplete as we do not (yet?) print the correct device, sid or pgid. Sponsored by: DARPA, NAI Labs
* Oops, don't print /dev/ twice.des2002-05-281-1/+1
|
* struct tty -> struct xtty. Reenable some previously disable code, butdes2002-05-281-35/+43
| | | | | | temporarily disable some rarely-used code that needs more work. Sponsored by: DARPA, NAI Labs
* Un-kmemize. Portions of the tty mode code have been temporarily disabled;des2002-05-232-84/+147
| | | | | | everything else, including dead kernel support, works just like before. Sponsored by: DARPA, NAI Labs
* Nits in previous commits.des2002-05-231-3/+3
| | | | Sponsored by: DARPA, NAI Labs
* Cull large amounts of dead code (deprecated since 1997)des2002-05-232-586/+6
| | | | Sponsored by: DARPA, NAI Labs
* ANSIfy.des2002-05-231-61/+40
| | | | Sponsored by: DARPA, NAI Labs
* Staticize.des2002-05-231-50/+50
| | | | Sponsored by: DARPA, NAI Labs
* Whitespace cleanup.des2002-05-231-6/+6
| | | | Sponsored by: DARPA, NAI Labs
* Unbreak tty mode (cons was renamed to constty a while ago)des2002-05-231-1/+1
| | | | Sponsored by: DARPA, NAI Labs
* Replace /kernel with /boot/kernel/kernel.joe2002-05-091-3/+3
| | | | | PR: docs/37757 Submitted by: Hiten Pandya <hiten@uk.FreeBSD.org>
* Oops, remove references to NLOCKED and NWANTED, now that they noiedowse2002-04-282-8/+0
| | | | longer exist.
* Change the vnode list under the mount point from a LIST to a TAILQdillon2001-10-231-2/+2
| | | | | | in preparation for an implementation of limiting code for kern.maxvnodes. MFC after: 3 days
* Userland part of nfs client/server split and cleanup.peter2001-09-182-14/+2
|
* SECURITY: Drop `setgid kmem' bit as early as possible.ru2001-08-311-0/+1
|
* Fix the third argument to sysctlbyname() to be of the type size_t *tmm2001-07-301-1/+2
| | | | | | (instead of int *). MFC after: 2 days
OpenPOWER on IntegriCloud