History log of /openbsd-src/usr.bin/kstat/kstat.c (Results 1 – 14 of 14)
Revision Date Author Comments
# 7b6132c8 26-Mar-2024 dlg <dlg@openbsd.org>

print amps and watts


# 18bc31b7 16-Nov-2023 dlg <dlg@openbsd.org>

avoid reading data when enumerating kstats.

this means we can reliably read the provider/instance/name/unit
tuple, which should avoid "duplicate kstat entry" when multiple
kstat read handlers have i

avoid reading data when enumerating kstats.

this means we can reliably read the provider/instance/name/unit
tuple, which should avoid "duplicate kstat entry" when multiple
kstat read handlers have issues.

found on a box with multiple rge interfaces, which have hardware
backed kstats that can only be read when the interface is up.

show more ...


# 53ff30dd 16-Nov-2023 dlg <dlg@openbsd.org>

handle printing cpu freq and volt kstat_kv types


# 8b182afb 10-Jul-2022 kn <kn@openbsd.org>

s/0/instance/ in usage to match manual synopsis

OK jmc


# 6f9574e0 05-May-2022 cheloha <cheloha@openbsd.org>

kstat(1): implement wait with setitimer(2) instead of nanosleep(2)

kstat(1)'s wait period drifts because nanosleep(2) uses a relative
timeout. If we use setitimer(2)/sigsuspend(2) the period does n

kstat(1): implement wait with setitimer(2) instead of nanosleep(2)

kstat(1)'s wait period drifts because nanosleep(2) uses a relative
timeout. If we use setitimer(2)/sigsuspend(2) the period does not
drift.

While here, bump the upper bound for wait up to UINT_MAX and switch to
the normal strtonum(3) error message format.

With input from kn@.

Tweaked by bluhm@ to block SIGALRM with sigprocmask(2) while we're
outside of sigsuspend(2).

Thread: https://marc.info/?l=openbsd-tech&m=160038548111187&w=2

Earlier version ok millert@.

ok bluhm@

show more ...


# 3564cc7f 22-Apr-2022 dlg <dlg@openbsd.org>

handle 16 bit kstat_kv types


# d572c2d2 25-Jan-2021 dlg <dlg@openbsd.org>

fix filtering on kstat unit numbers


# 64ba8693 29-Dec-2020 dlg <dlg@openbsd.org>

fflush after outputting a set of stats.

this helps when you're trying to pipe stuff into other programs
(like awk and ttyplot).


# a09091e5 13-Aug-2020 schwarze <schwarze@openbsd.org>

new kstat(1) manual page, using info from dlg@, from his commit messages,
and from partial code inspection;
OK dlg@


# 6b04bb45 11-Aug-2020 dlg <dlg@openbsd.org>

add -w so kstat can update and print stats at a specified wait interval.


# 81e355e4 10-Aug-2020 dlg <dlg@openbsd.org>

sigh, i made the previous diff to small.

main needs to understand the kstat_tree type now, so move the
declaration up.


# 62fc0d78 10-Aug-2020 dlg <dlg@openbsd.org>

factor out the printing of kstats. no functional change otherwise.


# 59ead937 10-Aug-2020 dlg <dlg@openbsd.org>

add the ability to filter which kstats are displayed.

kstats are identified by a "provider:instance:name:unit" tuple,
where provider and name are strings, and instance and unit are
integers. you can

add the ability to filter which kstats are displayed.

kstats are identified by a "provider:instance:name:unit" tuple,
where provider and name are strings, and instance and unit are
integers. you can pass tuples as arguments to kstat to select them
for display, eg, to see the rxq and txq stats for the first rings
on an em0 interface, you can run `kstat em0:0:rxq:0 em0:0:txq:0`.

this can be pretty tedious if you want to select a group of stats
quickly though, so there's some wildcard and pattern matching support.

firstly, empty fields in the tuple are wildcarded, eg, if you want
to see all the stats that an mcx0 interface provides then run
`kstat mcx0:::`.

secondly, strings in a tuple (ie, the provider and name fields) are
compared using fnmatch(3) so you can use shell like patterns to
match fields. to expand the last example to all mcx interfaces, you
can run `kstat mcx*:::`.

lastly, you can pass a bare name to match on all kstats with that
name. eg, to see the txq stats for all interfaces, just run
`kstat txq`.

show more ...


# ab45bcde 06-Jul-2020 dlg <dlg@openbsd.org>

add kstat(8), the userland side of kstat(4).

this currently just dumps all the kstats it can find and prints out
their current values. in the future i want to be able to pass what
kstats im interste

add kstat(8), the userland side of kstat(4).

this currently just dumps all the kstats it can find and prints out
their current values. in the future i want to be able to pass what
kstats im intersted in as arguments, and tell it to poll stats and
show rates instead of current values when appropriate.

show more ...