summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Don't overflow from the gigabyte scale to the bit scale if theyar2006-11-261-1/+1
| | | | | | | | number to auto-scale is >= 1024 Gb. Could be triggered on arches where ifdata counters had 64 bits. Reported by: Miroslav Slavkov on -net MFC after: 3 days
* The real contents of this file were repeated twice.yar2006-11-261-66/+0
| | | | | | | | The repetition was harmless due to a usual #ifndef _FOO_H_ wrapper. Fortunately, nobody started to hack the second copy, so just remove it from the file. MFC after: 3 days
* Fix the format specifier suitable for uintmax_t.ru2006-11-231-3/+3
|
* - Fix types of "struct vmmeter" members so they are unsigned.ru2006-11-201-19/+86
| | | | | | | - Fix overflow bugs in sysctl(8), systat(1), and vmstat(8) when printing values of "struct vmmeter" in kilobytes as they don't necessarily fit into 32 bits. (Fix sysctl(8) reporting of a total virtual memory; it's in pages too.)
* Memory utilization subscreen in "vmstat" display lists numbers in KB,ru2006-10-121-6/+6
| | | | | | | | | | not in number of pages. PR: docs/71690 Submitted by: Jan Srzednicki (A patch is only partially merged, the rest was already fixed by bde@ in rev. 1.51.)
* Obey MK_INET6_SUPPORT.yar2006-07-271-3/+10
|
* Remove MT_FTABLE printout in systat, as MT_FTABLE mbufs are no longerrwatson2006-07-241-1/+0
| | | | used in the kernel.
* s/on a crt//brd2006-05-251-2/+2
| | | | | | | systat is working great on this LCD ;) Submitted by: Ben Haga <tuximus AT absoludicrous DOT com> MFC after: 3 days
* For the vmstat sub-display:bde2006-05-012-36/+45
| | | | | | | | | | | | | | | | | | vmstat.c: Move totfr to be under daefr and prcfr since it logically belongs there. Move all the count fields (wire, act, inact, cache and free) to near the bottom of the sub-display (after all the rate fields) to reduce competition with adjoining sub-displays. systat.1: Move things as above. Attempt to improve missing and poor wording in the description of the fields. The long sentence was hard to parse and didn't say anything about the different units. Increment .Dd.
* Unbreak the support for 24-row terminals in the vmstat display. Thebde2006-05-011-2/+4
| | | | | | | | | | | | | part that handled the 17th and 18th rows of the vmstat-proper subdisplay was deleted in rev.1.10 when these rows stopped being used and was not restored when the 17th row was used again. For such terminals, we now lose the `buf' field instead of making a mess with it. Terminals with fewer than 24 rows have never been supported. The problem is not avoided by using curses since we use the last line for data entry and don't use a separate subwindow for this line. Some other things in the vmstat display could be handled better using subwindows.
OpenPOWER on IntegriCloud