can-utils icon indicating copy to clipboard operation
can-utils copied to clipboard

Circular buffer candump feature request

Open memetb opened this issue 4 years ago • 0 comments

Hello,

it would be useful in a project I'm working on to have the candump utility output to a circular buffer.

This feature would be implemented as follows:

  • only available in conjunction with -l option (file output) OR a dedicated option which semantically forces file output
  • circular buffer would not pre-allocate buffer, however, once max sample count reached, would seek to the top of the file and continue outputting
  • to make things work, output will have to be of 25-wide fixed length whitespace right-padding (c.f. below)
  • maybe add options for sync
(1619926775.202098) can1 1EFFBFDF#0200200300000000
(1619926775.202336) can1 0AB#928E
                         ^         25 wide       ^

In my project, this feature is useful for crash-dumping complex systems where there might be multiple vendor products interacting with each other that otherwise can't be captured using traditional logging - the main impediment being the sheer volume of traffic in transit.

I am already implementing the feature in a fork of the project, but wondering if there is interest in this feature from the maintainers of linux-can, and whether there are architectural decisions which you would like to be in charge of.

Thank you for your time.

memetb avatar May 02 '21 05:05 memetb