diff options
author | Ole Troan <ot@cisco.com> | 2022-11-28 13:13:24 +0100 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2022-11-30 11:55:44 +0000 |
commit | 5010bbd3c44d9fb061818be7a291a474608f510a (patch) | |
tree | 6740b042efc5eb08425915d9aa0e672beca412a3 /src/vlib/stats/stats.h | |
parent | e1f2058b548fe478c6dbfd450c343912cebb9740 (diff) |
stats: add boot time in stats segment
Write time into /sys/boottime on VPP start.
This allows a stateless control plane agent to validate if it's reconnecting to the same
VPP instance.
Type: improvement
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Iba7f334339c46142045e43da6efab11612e7b9c0
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vlib/stats/stats.h')
-rw-r--r-- | src/vlib/stats/stats.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vlib/stats/stats.h b/src/vlib/stats/stats.h index b07f21724a0..ab1e2828c5a 100644 --- a/src/vlib/stats/stats.h +++ b/src/vlib/stats/stats.h @@ -21,12 +21,14 @@ typedef enum { STAT_COUNTER_HEARTBEAT = 0, STAT_COUNTER_LAST_STATS_CLEAR, + STAT_COUNTER_BOOTTIME, STAT_COUNTERS } stat_segment_counter_t; #define foreach_stat_segment_counter_name \ _ (LAST_STATS_CLEAR, SCALAR_INDEX, last_stats_clear, "/sys") \ - _ (HEARTBEAT, SCALAR_INDEX, heartbeat, "/sys") + _ (HEARTBEAT, SCALAR_INDEX, heartbeat, "/sys") \ + _ (BOOTTIME, SCALAR_INDEX, boottime, "/sys") typedef struct { |