summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Sort the ex-extended vmstat fields into their documented order in thebde2006-04-301-38/+38
| | | | | | | | | | | | | | | | output too. Fine tune all coordinates and most field widths in the vmstat (sub)display for this and previous changes now that we have to change almost all of them just to move the ex-extended fields: - change VMSTATROW back to 7. It was 6 due to a hack in the extended vm stats changes. - reduce the maximum field width that we try for from 9 to 8. 4 or 5 is enough for most fields but we try to use the same width for all fields. 8 is enough to display everything without changing units memory sizes exceed 100GB. Fix some unrelated coordinates and field widths in comments.
* Eliminate the "extended" vm stats. Move all fields in the extendedbde2006-04-301-34/+10
| | | | | | vm stats to the normal vm stats. Sort them into the normal stats according to the man page only in the source code so that diffs are almost readable. Reduce style bugs in printing the value of %ozfod.
* Update for moving some fields to the new vnstat display.bde2006-04-301-8/+16
| | | | | | Don't say that `cache' is for the buffer cache. Describe the uselessnes of `buf'.
* Reduce the namei (sub)display by 5 columns to make enough space for abde2006-04-301-17/+19
| | | | | | | | | | | | | | new vnstat display to the right of the namei display. Move the non-vmstat fields {des,num,fre}vn from the vmstat display to a new vnstat display. Move the dtbuf field there too. The buf and dtbuf fields are non-vmstat and non-vnstat, so there is no good place to display them. I need to move at least 1 of them out of the vm stats for further cleanups of the vm stats, and there is only space for 1 of them in the vn stats. (The best place for the current buf field is actually /dev/null, since it has been completely broken for about 10 years and broken for longer. It gives an uninteresting virtual memory count where an interesting real memory count is wanted.)
* Removed the description of the nonexistent want_fd command. want_fd existedbde2006-04-301-2/+0
| | | | | for only 2 weeks in 1998-1999. It was replaced by general commands to select the set of disk drives displayed.
* Don't redraw the disk names on every update. This was apparently donebde2006-04-301-6/+0
| | | | | | | | | | | to handle changes to the set of disks selected, but it is unnecessary for that since the whole screen is redrawn when this set is changed. It was also buggy: - MAXDRIVES*6 = 42 was hard-coded as only 30 spaces in a string literal, the last 2 disk names were not cleared as intended - when the extended vmstats are active, clearing of even 30 columns overruns the ozfod value field by 3 columns. This was harmless because the field is much wider than necessary.
* Fix "slow (on-the-fly) zero fills percentage (`%slo-z')" some more. Thebde2006-04-302-4/+4
| | | | | | | | | | | | | | | | | | | value printed is actually the optimized (i.e., the non-slow, not-on-the-fly zero fills percentage) except in overflow cases. Describe it as %ozfod in the display. Move the field descriptor 1 to the left so that there is space for 5 characters after the % sign (this leaves no space between the number and the descriptor but the % character serves well as a separator). Fixed integer overflow at z.ozfod = UINT_MAX/100 in the calculation of %ozfod. This value can be reached just a few hours or minutes after booting, so %ozfod was usually garbage in boot mode. Now %ozfod is correct in boot mode for a few days or hours. Print a non-dummy %ozfod when the division for it isn't division by 0 instead of when the result will be less than 100%. A result of 100% may be correct, though a result of more than 100% indicates overflow of one or both counters.
OpenPOWER on IntegriCloud