[LEDE-DEV] Observing procd progress

Petr Štetiar ynezz at true.cz
Tue Feb 14 01:45:55 PST 2017


Philip Prindeville <philipp_subx at redfish-solutions.com> [2017-02-12 12:57:19]:

Hi,

> One thing I was wondering about was, on a headless system, but that does
> have an LCD display, is maybe capturing the progress of procd as it runs and
> displaying it on that LCD.

BTW, what kind of platform and LCD is that?

I would probably get the total number of scripts planned to be run, the total
count, 100% on progress bar from glob() as it's used in rcS.c/_rc(). Then I
would probably update the position of the progress bar, the current % position
in q_initd_complete() callback.

> Maybe in q_initd_run() where the DEBUG(2, “start %s %s \n”…) happens, and in

Look at libubox/runqueue.c, search for '->run(' callback.

> q_initd_complete() where the DEBUG(2, “stop %s %s \n”, …) happens?

Look at libubox/runqueue.c, search for '->complete(' callback.

> Hmm… for that matter, I also don’t know where procd does a wait() or wait3()
> or waitpid() on the rc.d/ scripts...

procd is using runqueue task helper, which in turn uses uloop_process_*
functions, so look at libubox at runqueue.c and uloop.c for details.

-- ynezz



More information about the Lede-dev mailing list