> On Jan 5, 2020, at 1:43 PM, otr...@employees.org wrote: > > Hi Christian, > >> There are some error counters that aren't errors, then there are statistic >> counters. >> >> I'm curious did one come before the other? I ask b/c some nodes count >> non-error statistics using errors (e.g., arp, ipsec, ...) and I'm wondering >> why. > > The node errors as implemented in src/vlib/error.[ch] came first. > The stats segment is just a representation of these per-node counters. The > stats segment is essentially a KV store, > where the node counters are given a key as > "/err/<node-name>/<error-counter-name> > > You are absoultely right that some nodes do use this counter infrastructure > for non-error situations. > e.g. we have "no error", "encapsulated", "decapsulated" by some nodes and so > on. > I at some point was thinking of placing these under a different path. Then I > distracted myself by thinking of how all the counters could be represented in > a data model instead (specifically a YANG tree).
Yeah, I noticed they all get collected under /err. In any case before I noticed that, I had started using them (errors) for a bunch of stats I needed to collect, and then realized this was probably not the right way to do this (I started in the ipsec code which is where I got the idea :). They are a convenient way to do this, which maybe is why they are being used that way in some places. I wonder if this could be cleaned up so that "show error" really only shows errors (and is empty if there are no errors). Maybe there could be a simple way to setup positive counters like there is for errors (i.e., the error array in the node registration structure, and counters in the node). Thanks, Chris. > > Cheers, > Ole
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15052): https://lists.fd.io/g/vpp-dev/message/15052 Mute This Topic: https://lists.fd.io/mt/69440602/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-