[LEDE-DEV] procd question, something causing high cpu usage

Baptiste Jonglez baptiste at bitsofnetworks.org
Mon Jan 9 07:33:02 PST 2017


Hi Sebastian,

On Mon, Dec 19, 2016 at 11:58:26PM +0100, Sebastian Kemper wrote:
> Hi all,
> 
> I'm running LEDE git from yesterday (but also observed this on an older
> git revision from a few weeks back) on a small mips router. When I start
> freeswitch compiled without libedit via procd, CPU usage goes up to a
> 100% percent. When freeswitch is compiled with libedit on the other
> hand, everything seems fine.
> 
> Also, when I start the libedit-less freeswitch from the command
> line/shell, all is fine, too.
> 
> When I set the logging to syslog (procd_set_param stdout 1), then
> logread shows this all the time:
> 
> Mon Dec 19 23:17:12 2016 daemon.info freeswitch[3495]: freeswitch at hank2> 
> Mon Dec 19 23:17:12 2016 daemon.info freeswitch[3495]: freeswitch at hank2> 
> Mon Dec 19 23:17:12 2016 daemon.info freeswitch[3495]: freeswitch at hank2> 
> Mon Dec 19 23:17:12 2016 daemon.info freeswitch[3495]: freeswitch at hank2> 

What is the behaviour of freeswitch when you launch it directly from the
command-line?  Does it give you a prompt, or does it just run in the
foreground without printing anything?

If freeswitch expects an interactive terminal to accept user commands,
it's most likely the cause of the issue, because procd does not provide
this.  If that is the case, maybe disabling the interactive prompt in
freeswitch could help?

> These messages keep flashing by, only the time stamp is changing. After
> a while the router hangs up and reboots. So it seems that freeswitch is
> blasting its command prompt to procd all the time. top suggests the
> same:
> 
>   PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
>  3629  3628 freeswit R    23208  19%  46% freeswitch -c -cache /tmp/freeswitch/
>     1     0 root     R     1524   1%  26% /sbin/procd
>   723     1 root     S     6288   5%  26% /sbin/logd -S 64
>  1472     1 root     S     1664   1%   1% /usr/sbin/hostapd -P /var/run/wifi-ph
> 
> Has anybody an idea what could cause this? Maybe the same experience
> with another program? Any idea what I could try to get around this?
> 
> I've put the procd part of the init script below. But I think it's
> pretty standard.
> 
> Kind regards,
> Sebastian
> 
>   procd_open_instance
>   procd_set_param command freeswitch
>   procd_append_param command -c -cache "$fs_dir_cache" \
>     -conf "$fs_dir_etc" -db "$fs_dir_db" -log "$fs_dir_log" \
>     -recordings "$fs_dir_recordings" -run "$fs_dir_run" \
>     -storage "$fs_dir_storage" -temp "$fs_dir_temp" $OPTIONS
>   procd_set_param user "$fs_user"
>   # forward stdout of the command to logd
>   #procd_set_param stdout 1
>   # same for stderr
>   procd_set_param stderr 1
>   procd_close_instance
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170109/cb1fb9d4/attachment.sig>


More information about the Lede-dev mailing list