[PATCH procd] ubus: add state measurement
Christian Marangi
ansuelsmth at gmail.com
Tue Mar 21 10:54:53 PDT 2023
On Wed, Oct 26, 2022 at 03:18:51PM +0200, Florian Eckert wrote:
> Procd has different states during booting. When the system is
> booted, it is in the 'running' state. This state is only exited when the
> system is shut down cleanly. This state is called 'shutdown'. To find out
> what state the system is in and how long it will take to complete this,
> the commit adds a new section 'state' to the ubus call system info. There
> you can read which state the procd is in and how long it has been in
> this state or how long it has been running in the state.
>
> command:
> ubus call system info
>
> output:
> {
> "localtime": 1666795909,
> "state": {
> "load": {
> "active": false,
> "duration": 42.667914
> },
> "early": {
> "active": false,
> "duration": 1.107519
> },
> "ubus": {
> "active": false,
> "duration": 0.536634
> },
> "init": {
> "active": false,
> "duration": 123.176279
> },
> "running": {
> "active": true,
> "duration": 226.491805
> },
> "shutdown": {
> "active": false,
> "duration": 0.000000
> }
> },
>
> Signed-off-by: Florian Eckert <fe at dev.tdt.de>
Hi, was checking this patch and I'm generally OK for this, just some
question before merging.
I wonder if this kind of thing should be under a config flag?
Like I feel these kind of stats may be needed only for debug purpose?
These are just ideas, if your idea is to use these data for other
purpose than checking process boot time and investigate some regression
then it's totally fine to have this present by default.
Just asking that.
--
Ansuel
More information about the openwrt-devel
mailing list