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

Sebastian Kemper sebastian_ml at gmx.net
Mon Dec 19 14:58:26 PST 2016


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> 

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



More information about the Lede-dev mailing list