OpenBSD CVS

CVS log for src/usr.sbin/bgpctl/output_ometric.c


[BACK] Up to [local] / src / usr.sbin / bgpctl

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.13 / (download) - annotate - [select for diffs], Tue Jan 23 15:55:20 2024 UTC (4 months, 2 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Spaces

Revision 1.12 / (download) - annotate - [select for diffs], Mon Nov 20 14:18:21 2023 UTC (6 months, 2 weeks ago) by claudio
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

KNF

Revision 1.11 / (download) - annotate - [select for diffs], Tue Mar 28 12:07:09 2023 UTC (14 months, 2 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

Use pt_size from struct rde_memstats instead of computing it by hand.
OK tb@

Revision 1.10 / (download) - annotate - [select for diffs], Mon Dec 12 09:51:04 2022 UTC (17 months, 4 weeks ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.9: +2 -4 lines
Diff to previous 1.9 (colored)

Since bgpctl uses clock_gettime() and struct timespec switch ometric code
over to handle struct timespec instead of struct timeval. This way no
extra conversion is needed.
OK tb@

Revision 1.9 / (download) - annotate - [select for diffs], Thu Dec 8 17:24:39 2022 UTC (18 months ago) by cheloha
Branch: MAIN
Changes since 1.8: +13 -8 lines
Diff to previous 1.8 (colored)

bgpctl(8): ometric: measure elapsed time with monotonic clock

Prefer CLOCK_MONOTONIC to gettimeofday(2) when measuring elapsed time,
as the UTC clock can jump around.

ok claudio@

Revision 1.8 / (download) - annotate - [select for diffs], Tue Dec 6 17:38:41 2022 UTC (18 months ago) by claudio
Branch: MAIN
Changes since 1.7: +21 -21 lines
Diff to previous 1.7 (colored)

OpenMetrics is rather strict about naming metricsets.
Add a function that a) verifies that none of the special suffixes is used
and b) that the name itself is not yet used already.
Also when printing a counter _total has to be added to the metric name and
for info metrics _info is added.
With and OK tb@

Revision 1.7 / (download) - annotate - [select for diffs], Tue Dec 6 11:27:58 2022 UTC (18 months ago) by claudio
Branch: MAIN
Changes since 1.6: +2 -6 lines
Diff to previous 1.6 (colored)

Implement ometric_set_timeval() and ometric_set_timeval_with_labels()

Timestamps are special since they can require more significant bits
than a double provides. Instead print them as pseudo float as suggested
by the OpenMetrics draft.
OK cheloha@

Revision 1.6 / (download) - annotate - [select for diffs], Thu Dec 1 09:16:43 2022 UTC (18 months, 1 week ago) by claudio
Branch: MAIN
Changes since 1.5: +8 -8 lines
Diff to previous 1.5 (colored)

Fix typo in variable peer_message_receive
Noticed by tb@

Revision 1.5 / (download) - annotate - [select for diffs], Thu Dec 1 09:14:40 2022 UTC (18 months, 1 week ago) by claudio
Branch: MAIN
Changes since 1.4: +41 -35 lines
Diff to previous 1.4 (colored)

Extend and rename ometric_set_int_with_label to ometric_set_int_with_labels

Instead of passing a single key value pair allow for multiple keys and values.
This is needed for rpki-client where 2 extra key value pairs are needed for
some values. To simplify passing simple values introduce a OKV() macro
which creates a compound literal array with the NULL terminal.
OK tb@

Revision 1.4 / (download) - annotate - [select for diffs], Wed Nov 30 10:15:01 2022 UTC (18 months, 1 week ago) by claudio
Branch: MAIN
Changes since 1.3: +2 -4 lines
Diff to previous 1.3 (colored)

Pass a FILE pointer to ometric_output_all() and use fprintf() instead of
printing to stdout by default. Additionally check if fprintf() fails and
return -1 in that case. With this ometric code can be used in rpki-client.
OK tb@

Revision 1.3 / (download) - annotate - [select for diffs], Mon Nov 7 11:33:24 2022 UTC (19 months ago) by mbuhl
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

Fix some spelling errors.
OK claudio@

Revision 1.2 / (download) - annotate - [select for diffs], Tue Oct 18 12:28:36 2022 UTC (19 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.1: +10 -12 lines
Diff to previous 1.1 (colored)

Switch from up/down time to time of last change.

Having metrics depend on session state makes reporting more complex.
This now reports the number of seconds a session was up or down.
OK tb@

Revision 1.1 / (download) - annotate - [select for diffs], Mon Oct 17 12:01:19 2022 UTC (19 months, 3 weeks ago) by claudio
Branch: MAIN

Implement openmetric output via bgpctl show metric command

This adds most of the generic code to output the metrics with labels
and implements some basic metrics. The code works but metrics may still
change.

OK tb@

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.