Add entities to ubus

How to add more option to ubus?

For example i want to add more info to this.

root@No-More-Lag-Router:~# ubus call system info
{
        "localtime": 1528305803,
        "uptime": 65163,
        "load": [
                1216,
                1760,
                5280
        ],
        "memory": {
                "total": 489877504,
                "free": 92680192,
                "shared": 21868544,
                "buffered": 134606848
        },
        "swap": {
                "total": 33550336,
                "free": 33550336
        }
}

This namespace and procedure is hosted by procd, so you need to extend that.

sorry but i don't understand
i need to add some entities to the memory section. I can't find who creates that table or where.

https://git.openwrt.org/?p=project/procd.git;a=blob;f=system.c;h=151f613002369de61194434c692339aae8618aa9;hb=dfb68f8556df63878add145ad9c656381bc20656#l253

1 Like