> On Jan 9, 2020, at 5:04 AM, otr...@employees.org wrote:
> 
> Hi Christian,
> 
>> It looks like the only access to stats though is from shared memory. I guess 
>> running vpp_get_stats with ssh is the way to fetch the counters in this 
>> case. It would be nice if there was an API in VPP that mimic'd the 
>> vpp_get_stats functionality though. Could even expose that to the CLI.
>> 
>> I really just want the interface and error counts for now, was a little 
>> surprised there was no API for this (since it exists in the CLI).
> 
> That is on purpose.
> The actual counters (and data structures) in VPP are exposed directly in the 
> shared memory stats segment.
> That means that regardless of how often a client polls a counter, there is 
> little to no impact on VPP.

Understood.

> An API message or CLI has some cost on the VPP side though.

Sure; however, "show interface" gives me consolidated (not-per-thread) packet 
counters for an interface. I'm going to have to either screen scrape those for 
my testing, or run vpp_get_stats over another ssh connection to collect the 
per-thread stats. I think it might be reasonable to have a VPP API that 
provided these same interface counters available in the CLI w/o having to 
invest in interfacing to another plugin/API.

> For exporting data out of the stats segment, I believe there is already quite 
> a few solutions.
> There's the (naive) prometheus example in the repo, vpp_get_stats, there is a 
> Telegraf plugin, a simple gNMI/gRPC plugin.

Right I've used vpp_get_stats and may run that with ssh and awk. I guess it 
just seems odd on first encountering this that the CLI provided the data, but 
the binary API didn't. I suppose the view is that exposing the stats segment in 
shared memory *is* the binary API. :)

Thanks,
Chris.

> 
> Best regards,
> Ole

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15106): https://lists.fd.io/g/vpp-dev/message/15106
Mute This Topic: https://lists.fd.io/mt/69538850/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-
  • ... Christian Hopps
    • ... Ole Troan
      • ... Christian Hopps
      • ... Christian Hopps
        • ... Ole Troan
          • ... Christian Hopps
            • ... Ole Troan
              • ... Christian Hopps
                • ... Vratko Polak -X (vrpolak - PANTHEON TECHNOLOGIES at Cisco) via Lists.Fd.Io
                • ... Paul Vinciguerra
                • ... Ole Troan
                • ... Paul Vinciguerra
                • ... Ole Troan
                • ... Christian Hopps
                • ... Paul Vinciguerra
                • ... Vratko Polak -X (vrpolak - PANTHEON TECHNOLOGIES at Cisco) via Lists.Fd.Io

Reply via email to