OpenBSD CVS

CVS log for src/sys/sys/kstat.h


[BACK] Up to [local] / src / sys / sys

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.5 / (download) - annotate - [select for diffs], Tue Mar 26 00:53:51 2024 UTC (2 months, 2 weeks ago) by dlg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +5 -1 lines
Diff to previous 1.4 (colored)

amps and watts types

volts felt lonely

Revision 1.4 / (download) - annotate - [select for diffs], Thu Nov 16 02:45:20 2023 UTC (6 months, 3 weeks ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.3: +6 -1 lines
Diff to previous 1.3 (colored)

cpu frequency and volt types for kstat_kvs

Revision 1.3 / (download) - annotate - [select for diffs], Fri Apr 22 00:27:55 2022 UTC (2 years, 1 month ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.2: +8 -1 lines
Diff to previous 1.2 (colored)

add 16 bit types to kstat_kv structs.

of course it is a realtek card that needs this because they provide
some 16 bit counters.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Jan 31 05:09:17 2022 UTC (2 years, 4 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

add kstat_remove so you can tear the struct apart before kstat_destroy

Revision 1.1 / (download) - annotate - [select for diffs], Mon Jul 6 03:56:51 2020 UTC (3 years, 11 months ago) by dlg
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8

add kstat(4), a subsystem to let the kernel expose statistics to userland.

a kstat is an arbitrary chunk of data that a part of the kernel
wants to expose to userland. data could mean just a chunk of raw
bytes, but generally a kernel subsystem will provide a series of
kstat key/value chunks.

this code is loosely modelled on kstat in solaris, but with a bunch
of simplifications (we don't want to provide write support for
example). the named or key/value structure is significantly richer
in this version too. eg, ssolaris kstat named data supports integer
types, but this version offers differentiation between counters
(like the number of packets transmitted on an interface) and gauges
(like how long the transmit queue is) and lets kernel providers say
what the units are (eg, packets vs bytes vs cycles).

the main motivation for this is to improve the visibility of what
the kernel is doing while it's running. i wrote this as part of the
recent work we've been doing on multiqueue and rss/toeplitz so i
could verify that network load is actually spread across multiple
rings on a single nic. without this we would be wasting memory and
interrupt vectors on multiple rings and still just using the 1st
one, and noone would know cos there's no way to see what rings are
being used.

another thing that can become visible is the different counters
that various network cards provide. i'm particularly interested in
seeing if packets get dropped because the rings aren't filled fully,
which is an effect we've never really observed directly.

a small part of wanting this is cos i spend an annoying amount of
time instrumenting the kernel when hacking code in it. if most of
the scaffolding for the instrumentation is already there, i can
avoid repeatedly writing that code and save time.

iterated a few times with claudio@ and deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.