[PATCH v2 1/1] ltq-vdsl-app: add line_state number and power_state number

Florian Eckert fe at dev.tdt.de
Thu Mar 11 09:16:18 GMT 2021


Hello Andre

> We already talked about it, but once again for the list:

Here are my thoughts on why I would like to have this for the 
mailinglist.

> I skipped both of these numeric state values when porting this to
> ubus/C, because those are internal and lantiq implementation specific.
> I'd like to avoid exposing those if possible.

So far we only have the lantiq DSL implementation.
The only thing I can think of is that Broadcom also has DSL.
But they have a strange licensing policy and are therefore negligible.
I have also not yet seen a target that has this DSL frontend from 
broadcom.

With the old implementation, we also exported the numbers via the UBUS.
I already used this data for the collectd to also record the line_state 
and the power_state over time.
There is already a pullrequest pending to integrate this into collectd 
[0] with some other datas

> I've only seen very few of all of those actually happening.

That's right, I've only seen a handful so far too
But I can't tell which ones are important or negligible.

> Can we not expose new metrics instead of these internal numbers?

We can do that.
The only question is which data we want to export.
I definitely can not save strings in an RRD database.

> Like there's already "up":
> m_bool("up", out.data.nLineState == DSL_LINESTATE_SHOWTIME_TC_SYNC);
> 
> If you care e.g. about showtime you could just add:
> m_bool("showtime", out.data.nLineState ==
> DSL_LINESTATE_SHOWTIME_NO_SYNC || out.data.nLineState ==
> DSL_LINESTATE_SHOWTIME_TC_SYNC);

That would be a possibility.
The collectd db type would be a bool.
 From my point of view, the following values would be important.
I am currently evaluating this.
All other values are saved as unknown and so -1 in ma rrd database


0 -> Not initialized
1 -> Exception
256 -> Idle
512 -> Silent
768 -> Handshake
896 -> Full init
1280 -> Training
2048 -> Showtime without TC-Layer sync
2049 -> Showtime without TC-Layer sync
3328 -> Resync

What is also added is the power_state. However, these are not many 
values.


Kind regards

Florian

[0] https://github.com/openwrt/packages/pull/12175



More information about the openwrt-devel mailing list