Community discussions

MikroTik App
 
GeraldSB
just joined
Topic Author
Posts: 7
Joined: Fri May 09, 2014 6:32 pm

Torch sections

Thu Feb 09, 2017 8:26 am

Hello,

I'm using the API to torch a router and get some usage statistics.

It all works good but I'm trying to figure out what the ".section" attribute stands for.
It looks like each section represents a second but I would like confirmation for this.
So far I could not find a single online document mentioning those sections.

More importantly, I would like to understand if section 0 (zero) has a special meaning.
It's not always there and sometimes it's the only section.
Also it seems like the Rx/Tx (bits & packets) reported in section 0 are always 0.
So I'm not sure I should take it into account when averaging the numbers.

Thanks.
G.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Torch sections

Thu Feb 09, 2017 8:41 pm

Each distinct value of section represents a new "list" of sniffed packets gathered between the previous section and this one.

In terms of "times" between each list, that's determined by the "freeze-frame-interval" argument, though yes, I think it defaults to 1 second.

In theory, there's nothing special about section 0. In fact, if the values were to ever be exhausted, they should wrap around back to 0, and carry on. In practice, it appears that at least currently, the first thing in the loop is the return of the list, before new info is then gathered, and returned at the start of the next iteration. You could special case this, but this is not a quirk you should rely on. But then again, I think it's safe to outright discard it - the margin of error would be small either way.

Who is online

Users browsing this forum: GoogleOther [Bot] and 54 guests