@mwittig Don’t know how t check this. In pimatic log I see the execution of the rule. Nothing else. I try to restart pimatic by execute command with a button device again and again and wait some seconds in between, but nothing happens. Then I test other commands like the woli speak from a unix shell, which works well. Then I restart pimatic via shell and after this everything works well again for some time.
-
shell execute not working after a while
-
with the
ps -aux
command you can see on the console which tasks are actually running. if the tasks are piling up as marcus mentioned, you will see them here.pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
I am not a unix expert. ps -aux show me a process list but what should I do with it?
-
@heizelmann like mentioned earlier, this is usualy caused by scripts that are pilling up.
Lets say i have a script that checks my wifi every 10 seconds, but the script does not end itself properly, i woulf see allot of entry’s of my script in ps aux
-
What I see with the ps -aux is that sometimes the nc command hangs.When I kill this process the problem is gone for a while.
execute “echo -n wolido:speak:hello | nc -4u -w1 <myip> <myport>”
Now the question is how to avoid the hanging? I am not a Unix expert but looked a bit around
and found socat as an alternative to nc. Meanwhile I will try thisexecute “echo -n wolido:speak:hello | socat -t1 - UDP:<myip>:<myport>”
May be someone else have another idea.
-
@heizelmann try:
execute “echo -n wolido:speak:hello | nc -4u -w0 -c <myip> <myport>”
-
Using
-w 0
might do the trick. Another thing to try is-q 0
.See also: https://serverfault.com/questions/498880/nc-netcat-hangs-waiting-for-more-data-in-udp-mode
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
‘socat -t0’ doesn’t work. I need to enter at least 1 second. Right now, socat seems promising. It feels to me it’s faster, too.
The nc -w0 -q 0 option I will try next. Needs some days for longterm result.Thanks for help!
-
@heizelmann again, try -c. So you actually -close the script…
-
@gleno0h -c is not a valid option of nc.
-
@heizelmann said in shell execute not working after a while:
-c is not a valid option of nc.
I also stumbled on this. The last post of the thread on Serverfault is not applicable. May be at has been substituted by
-q 0
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law