summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat
Commit message (Collapse)AuthorAgeFilesLines
* Fixed dependencies (make checkdpadd).ru2010-02-251-2/+2
|
* Perform all trivial ports to utmpx for usr.bin/.ed2010-01-132-4/+3
| | | | | They were already converted to use libulog, so it's easy to convert them to utmpx.
* Build usr.bin/ with WARNS=6 by default.ed2010-01-021-0/+2
| | | | Also add some missing $FreeBSD$ to keep svn happy.
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-1311-0/+17
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-1111-17/+0
| | | | Tested with: make universe
* Let systat's vmstat use utmpx.ed2009-12-052-16/+9
|
* Use ncursesw to output the date field of vmstat displayume2009-11-132-2/+2
| | | | with multi-byte string, correctly.
* - Catch SIGHUP to perform cleanup before exiting.jh2009-10-112-4/+8
| | | | | | | | | | | | | | | | - Exit if getch() returns with an error other than EINTR. Otherwise systat(1) may get stuck in an infinite loop if it doesn't receive SIGHUP when terminal closes. [1] - Remove attempt to clear stdio error indicators. getch() doesn't use stdio, making it useless. [2] - Remove unneeded masking of getch() return value. [2] PR: bin/107171 Reviewed by: bde Approved by: trasz (mentor) Obtained from: OpenBSD [1] Suggested by: bde [2] MFC after: 1 month
* Correct a number of evolved problems with inp_vflag and inp_flags:rwatson2009-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | certain flags that should have been in inp_flags ended up in inp_vflag, meaning that they were inconsistently locked, and in one case, interpreted. Move the following flags from inp_vflag to gaps in the inp_flags space (and clean up the inp_flags constants to make gaps more obvious to future takers): INP_TIMEWAIT INP_SOCKREF INP_ONESBCAST INP_DROPPED Some aspects of this change have no effect on kernel ABI at all, as these are UDP/TCP/IP-internal uses; however, netstat and sockstat detect INP_TIMEWAIT when listing TCP sockets, so any MFC will need to take this into account. MFC after: 1 week (or after dependencies are MFC'd) Reviewed by: bz
* Update top and systat for vfs.bufcache now being a long rather than an int.jhb2009-03-101-1/+1
|
* ANSIfy and remove register.delphij2008-01-1618-169/+99
| | | | Resulting binary verified with strip(1)+md5(1).
* - Handle the case where interface from "middle" is missing bydelphij2008-01-121-4/+4
| | | | | | | | | more carefully inspecting the return value from sysctl(3). [1] - Use calloc instead of malloc+memset of zero. Submitted by: Alexander Chernikov <admin su29 net> [1] PR: bin/119581 MFC after: 2 weeks
* Backout sensors framework.netchild2007-10-155-278/+1
| | | | | Requested by: phk Discussed on: cvs-all
* Bump document date for the last change.ru2007-10-141-1/+1
|
* Import OpenBSD's sysctl hardware sensors framework.netchild2007-10-145-1/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit includes the following core components: * sample configuration file for sensorsd * rc(8) script and glue code for sensorsd(8) * sysctl(3) doc fixes for CTL_HW tree * sysctl(3) documentation for hardware sensors * sysctl(8) documentation for hardware sensors * support for the sensor structure for sysctl(8) * rc.conf(5) documentation for starting sensorsd(8) * sensor_attach(9) et al documentation * /sys/kern/kern_sensors.c o sensor_attach(9) API for drivers to register ksensors o sensor_task_register(9) API for the update task o sysctl(3) glue code o hw.sensors shadow tree for sysctl(8) internal magic * <sys/sensors.h> * HW_SENSORS definition for <sys/sysctl.h> * sensors display for systat(1), including documentation * sensorsd(8) and all applicable documentation The userland part of the framework is entirely source-code compatible with OpenBSD 4.1, 4.2 and -current as of today. All sensor readings can be viewed with `sysctl hw.sensors`, monitored in semi-realtime with `systat -sensors` and also logged with `sensorsd`. Submitted by: Constantine A. Murenin <cnst@FreeBSD.org> Sponsored by: Google Summer of Code 2007 (GSoC2007/cnst-sensors) Mentored by: syrinx Tested by: many OKed by: kensmith Obtained from: OpenBSD (parts)
* - Move all of the PS_ flags into either p_flag or td_flags.jeff2007-09-171-1/+1
| | | | | | | | | | | | | | - p_sflag was mostly protected by PROC_LOCK rather than the PROC_SLOCK or previously the sched_lock. These bugs have existed for some time. - Allow swapout to try each thread in a process individually and then swapin the whole process if any of these fail. This allows us to move most scheduler related swap flags into td_flags. - Keep ki_sflag for backwards compat but change all in source tools to use the new and more correct location of P_INMEM. Reported by: pho Reviewed by: attilio, kib Approved by: re (kensmith)
* - Stop computing %CPU for the imaginary idle process; we nowru2007-09-111-54/+6
| | | | | | | | | | | | have real idle processes for that. - Fix the display on SMP by not scaling the sum of %CPU down to 1. Instead, display raw data as computed by the kernel, like in top(1). Reviewed by: bde Approved by: re (bmah) MFC after: 1 week
* Expand TCP counters from 9 digits to 12.jhb2007-06-151-25/+25
| | | | | MFC after: 1 week PR: bin/112881
* Consistently indent the R() macro for fields on the right-side of thejhb2007-06-151-17/+17
| | | | | | display to make the code easier to read. PR: bin/112881
* Add a new counter for retransmitted packets due to SACK.jhb2007-06-151-51/+54
| | | | | PR: bin/112881 Submitted by: Phil Rosenthal <pr isprime com>
* Fix definitions of kilobits etc.ru2007-01-181-21/+25
| | | | | | PR: bin/106116 Nudged by: Rostislav Krasny MFC after: 3 days
* Add missing things: a prototype and a const qualifier.yar2006-12-231-1/+3
| | | | Found by: WARNS=4
* Dynamically resize the Disk column. It was too narrow for modernyar2006-12-231-21/+46
| | | | | | | | | disk device names such as da0s1b. So we also get rid of the nasty constant 5 scattered over the code. Implementing this change is a good chance to improve other bits around it: init saved lengths early, always check return value from kvm_getswapinfo().
* Clear to EOL after the end of meter so that its reading can decrease.yar2006-12-231-0/+1
|
* Make it possible for meter to reach 100% mark when swap is totally full.yar2006-12-231-1/+1
|
* Improve style:yar2006-12-231-20/+6
| | | | | | | - Don't define vars inside loops. - Avoid useless casts. - Use C idioms. - Do alike things in a consistent way.
* Reposition the "(swap not configured)" sign WRT the new layout.yar2006-12-231-1/+1
|
* Eliminate a couple of screen coordinate variablesyar2006-12-231-14/+8
| | | | that were useless and just obfuscated the code.
* Add some vertical whitespace for easier reading.yar2006-12-231-1/+4
|
* Fix the swap display further:yar2006-12-231-8/+24
| | | | | | | | 1) Resize the Used column to avoid screen overflow if BLOCKSIZE is long. 2) Track the current swap configuration so that its changes don't break the display. Suggested by: bde (1)
* Fix the Total line shown if there are >1 swap devices.yar2006-12-231-11/+9
|
* Start fixing the "swap" display by saving one horizontal position.yar2006-12-231-2/+2
| | | | | Now the display won't overflow the 80-char row if BLOCKSIZE=1024. The new spacing is also consistent with the "pigs" display.
* - Revert signedness type changes to "struct vmtotal"; by makingru2006-11-281-86/+19
| | | | | | | | | | | | | | them unsigned I made the possible overflows hard to detect, and it only saved 1 bit which isn't principal, even less now that the underlying issue with the total of virtual memory has been fixed. (For the record, it will overflow with >=2T of VM total, with 32-bit ints used to keep counters in pages.) - While here, fix printing of other "struct vmtotal" members such as t_rq, t_dw, t_pw, and t_sw as they are also signed. Reviewed by: bde MFC after: 3 days
* Back out rev. 1.17: arch-dependent WARNS level.yar2006-11-271-4/+0
| | | | | | | | The policy is that the WARNS level should characterize the quality of a piece of code irrespective of any conditions. Otherwise the code doesn't deserve the WARNS level assigned. Requested by: ru
* Consistently mark percentage scales as such.yar2006-11-273-4/+4
| | | | | PR: bin/101975 MFC after: 3 days
* systat(1) reaches WARNS=6 on i386 and amd64. This is goodyar2006-11-271-0/+4
| | | | | | for catching general regressions in future. Unfortunately, it still displays some problems at WARNS=6 on architectures with stricter alignment requirements, e.g., ia64.
* The logic of fetchnetstat_sysctl() isn't too complex: if idx is 0,yar2006-11-271-2/+2
| | | | | | | | we set and use xtp; if idx is 1, we set and use xip; the other cases are impossible. However, GCC cannot see that xip and xtp are always initialized before use because they are initialized and used in different if/else blocks. So setting them to NULL at the very beginning won't hurt.
* + WARNS=4 reminds that nlist.n_name isn't const.yar2006-11-271-3/+5
| | | | | | + Use C99 initializers to be WARNS-clean. + The last element in a namelist should have its n_name set to NULL, not to an empty string.
* Don't discard a const qualifier from constant strings.yar2006-11-271-1/+2
|
* Remove a wrong "const" qualifier.yar2006-11-271-3/+3
| | | | Spotted by: WARNS=6
* Add the Tera scale factor, which is an easy job now.yar2006-11-272-1/+9
| | | | | More scale factors would overflow the command line where the help for "scale" were shown.
* Stop exposing things that can be private to convtbl.c.yar2006-11-272-19/+17
|
* Keep all convtbl-related constants and strings in convtbl.[ch].yar2006-11-273-50/+59
|
* Allow for large scale factors. C99 warrants thatyar2006-11-272-10/+11
| | | | | | | | | ULLONG_MAX is not less than 2^64-1; and uintmax_t cannot be more narrow than unsigned long long. This allows for scale factors up to Exa inclusively. Use plain int for the scale index to be consistent with ifcmds.c and enum.
* Return back one initializer, it is needed.yar2006-11-271-1/+1
|
* + Drop useless initializers.yar2006-11-272-17/+13
| | | | + style(9).
* Drop useless #includes.yar2006-11-272-22/+0
|
* Use C99 initializers so that we don't really have to worryyar2006-11-271-10/+9
| | | | about the order of related things at several places.
* C can enumerate things for us.yar2006-11-271-9/+11
|
* There is no reason to use __inline here because we are rather faryar2006-11-261-1/+1
| | | | from a path critical to performance.
OpenPOWER on IntegriCloud