summaryrefslogtreecommitdiff
path: root/usr.bin/systat
AgeCommit message (Collapse)Author
2017-06-01Return time_uptime as value for when pf was enabled instead ofPatrick Wildt
time_second. Since time_second changes depending on the wall- clock time, time_second is not a reliable source for the status. We can even end up with a negative time delta. Thus, use the monotonically growing time_uptime and export it to userland. ok bluhm@ mikeb@
2017-05-22Support for displaying flow queues alongside H-FSCMike Belopuhov
This (ab)uses the fact that node->qstats.data.period field in hfsc_class_stats structure is at the same offset as the 'flows' field in fqcodel_stats. While here make use of a presently empty field "SCH" to display the queue management policy (flow or fifo) which is not strictly a scheduler, but it will hopefully become descriptive and useful later. This distinguishes flow queues from the regular HFSC ones. OK sthen, visa
2017-05-16Improve the precision of displayed bandwidth valuesMike Belopuhov
Carl Mascott has reported the issue and helped with the fix. OK tb
2017-05-03Remove unused PRIO column from the queueing display; ok sthen@Mike Belopuhov
2017-04-26Perform H-FSC root queue allocation in the kernelMike Belopuhov
Since only leaf queues can have packets assigned to them, H-FSC requires the user specified root queue to have a parent. To simplify userland tools and the configuration interface, the kernel can be leveraged to set it up. ok henning
2017-04-16Statistics for high memory flips in the buffer cacheBob Beck
nits from deraadt@ ok krw@ guenther@ kettenis@
2017-04-05Clamp size to length if snprintf ever indicates overflowTheo de Raadt
w/ millert
2017-04-05an annoying whitespace glitchTheo de Raadt
2017-04-02Make dma range buffer cache pages visible in systat ioBob Beck
ok deraadt@
2017-01-21The POSIX APIs that that sockaddrs all ignore the s*_len field in thePhilip Guenther
incoming socket, so userspace doesn't need to set it unless it has its own reasons for tracking the size along with the sockaddr. ok phessler@ deraadt@ florian@
2016-12-18Remove statements that have no effect from X(), Y() and Z() #define's.Kenneth R Westerback
Leftovers from the re-engining of systat eight years ago. Makes gcc quieter. ok otto@ deraadt@
2016-12-18increase width of interface column in the pf rules view by 2 chars, so that ↵Jasper Lievisse Adriaanse
'vetherXY' fits ok deraadt@ mpi@
2016-10-13tweak previous; hostname is alredy available plus some better formattingOtto Moerbeek
in case line numbers and/or PAUSED is shown; ok tedu@
2016-10-13add the hostname to the display. started by otto, then deraadt. ok deraadtTed Unangst
2016-08-26Pull in <time.h> for time()Philip Guenther
ok deraadt@
2016-08-24Convert quad_t to int64_t and %q to %llPhilip Guenther
Convert bzero() to memset() and bcopy() to memcpy() ok natano@ millert@
2016-04-13remove dumpfilter related code; it's a leftover from pftop-proper and not usedJasper Lievisse Adriaanse
in systat ok canacar@
2016-04-04Add sys/queue.h where it's needed. Unbreak userland following recentStuart Henderson
removal from mbuf.h. ok mpi@
2016-03-12Use 12 chars for pool name in "systat pool" to match vmstat -m. ok stefan@Stuart Henderson
2016-01-16fix a number of minor issues in the state view:Can Erkin Acar
1. peak and rate computations were using uint32 size which caused the fields from working for states that transferred more than 4GB also fix an unnecessary cast to double found while looking for the bug. 2. When creating new cache entries for existing states, start time from 0 rather than the current time to prevent a "spike" in rate and peak.
2016-01-02make sure debug will be initialized, choose "unknown" (because pfctlSebastian Benoit
loglevel_to_string() uses "unknown" as well) ok kettenis@ florian@
2016-01-02garbage collect unused variable tmSebastian Benoit
ok kettenis@ florian@
2016-01-02remove unused variable cur. code probably c&p from print_bar_title().Sebastian Benoit
remove useless decleration of variable change. ok kettenis@ florian@
2016-01-02garbage collect unsused variableSebastian Benoit
found by evh -AT- riseup -DOT- net, ok florian@
2015-09-12use sysctl() to get FSCALE value; ok guentherTheo de Raadt
2015-08-20Do not cast result of malloc/calloc/realloc* if stdlib.h is in scopeTheo de Raadt
ok krw millert
2015-04-18Convert many atoi() calls to strtonum(), adding range checks and failureTheo de Raadt
handling along the way. Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
2015-04-18Avoid calling freeifaddrs() with an uninitialised pointer in anJonathan Gray
error path.
2015-03-12Switch the netstat view of systat to use the same kvm_getfiles()Claudio Jeker
function similar to netstat(1). The output still shows the same info but may be a bit differently sorted. Also it will now show connections that are not UDP or TCP. This was the last bit of systat that needed kvm access and so now systat no longer needs to be setgid kmem. With this commit OpenBSD is officially setgid kmem free and an almost 10 year journey finally comes to an end. OK deraadt@
2015-02-28Reduce usage of predefined strings in manpages.Anthony J. Bentley
Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@
2015-02-09Correct a test so synproxy states will display as "Syn" instead ofJonathan Gray
modulate states displaying as "Syn". ok henning@
2015-01-20Adjust <sys/param.h> comments regarding use of use of MSIZE, orTheo de Raadt
delete <sys/param.h> if now possible ok guenther
2015-01-19replace local MIN() with MINIMUM()Theo de Raadt
2015-01-16first batch of programs adapting to the namespace cleanupTheo de Raadt
(pfvar.h nameser.h proc.h ucred.h) ok guenther millert, and some review from doug as well.
2014-11-23<sys/buf.h> isn't actually needed herePhilip Guenther
ok tedu@
2014-11-06i renamed the mbuf pool.David Gwynne
2014-10-24This tool doesn't actually support networks(5).Ingo Schwarze
So remove the call to setnetent(3) which is a no-op here (except for consuming a file descriptor) and the call sethostent(3) which is a no-op in general. Also remove the misleading reference to networks(5) from the manual. OK okan@ henning@
2014-10-20fix if (statement);Jonathan Gray
ok dlg@
2014-10-11Userland reallocarray() audit.Doug Hogan
Avoid potential integer overflow in the size argument of malloc() and realloc() by using reallocarray() to avoid unchecked multiplication. ok deraadt@
2014-10-08userland reallocarray audit.Doug Hogan
Replace malloc() and realloc() calls that may have integer overflow in the multiplication of the size argument with reallocarray(). ok deraadt@
2014-09-15Remove non-standard <sys/dkstat.h> header. It has not contained anythingMiod Vallat
related to disk stastics for almost 17 years, and the remaining userland-visible defines duplicate those found in <sys/sched.h>. Move the remaining _KERNEL defines to <sys/tty.h> where they belong, and update all users to cope with this. ok kettenis@
2014-08-14No need for <netinet/in_systm.h> nor <netinet/tcpip.h>.Martin Pieuchot
2014-08-14Show only active pools by default, pressing 'A' shows all of them.Martin Pieuchot
ok deraadt@
2014-07-16zap trailing newlines; "go for it" deraadtOkan Demirmen
2014-07-10repair prototypesTheo de Raadt
2014-07-09instead of printf() use tbprintf() like elsewhere in systat.Jasper Lievisse Adriaanse
ok deraadt@ mpi@
2014-07-08cut things that relied on mclgeti for rx ring accounting/restriction overDavid Gwynne
to using if_rxr. cut the reporting systat did over to the rxr ioctl. tested as much as i can on alpha, amd64, and sparc64. mpi@ has run it on macppc. ok mpi@
2014-07-02info about pools is currently given to userland by copying eachDavid Gwynne
pools struct out. however, struct pool in the kernel contains lots of things that userland probably isnt interested in, like actual mutexes, and probably shouldnt get easy access to, like pointers to kernel memory via all the lists/trees. this implements a kinfo_pool structure that has only the data that userland needs to know about. it cuts the sysctl code over to building it from struct pool as required and copying that out instead, and cuts userland over to only handling kinfo_pool. the only problem with this is vmstat, which can read kernel images via kvm, which needs some understanding of struct pool. to cope, the struct pool definition is guarded by if defined(_KERNEL) || defined(_LIBKVM) as inspired by sysctl which needs to do the same thing sometimes. struct pool itself is generally not visible to userland though, which is good. matthew@ suggested struct kinfo_pool instead of struct pool_info. the kinfo prefix has precedent. lots of people liked this.
2014-06-23The second level of the CTL_NET sysctl is a PF_*, not an AF_*Philip Guenther
inconsistent usage in route(8) noted by Gregor Best (gbe (at) ring0.de)
2014-06-13Now that the water marks are updated on a per-pool basis indicate inMartin Pieuchot
the LIVELOCKS column if there is a pending (deferred) update. ok claudio@