Killall missing?

OSMC 2015.09-2

I’m running a custom script that uses rtmpdump to capture a stream, and dumps it to a mp4 file. While the script is running this is what ps w shows:

root@osmc:/# ps w
717 pts/0 Ss 0:00 -bash
843 pts/1 Ss 0:00 -bash
1242 pts/0 S+ 0:00 /bin/sh /usr/bin/thaitv3
1244 pts/0 S+ 0:00 rtmpdump -r rtmp:// -a live -W -p http:/
1246 pts/1 R+ 0:00 ps w

When I run:

killall -9 /usr/bin/thaitv3

It says command not found. That’s a standard linux command. Why is killall missing?

My goal is to kill rtmpdump and thaitv3 script with a cronjob.

It’s not.

sudo apt-get update && sudo apt-get install psmisc

will get you it though

killall depends on procfs. It’s not considered part of the LSB. Both processes you have shown only have a single PID and so could easily be killed with

kill $(pidof rtmpdump); kill $(pidof thaitv3)


kill $(pidof processname)

will actually work even if there are multiple processes with the same name - pidof will return all matching pids and kill will accept multiple pids to kill… :smile:

u could use pkill its available and working good AND u can kill a process by it’s name