Kodi Community Forum

Full Version: XBMC Health Check
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to check to see if XMBC is responsive from the command line?
(I'm running Ubuntu)

XBMC hangs occasionally - and I'd like to create a shell script to restart it automatically.
YES. Putty program (the network) ... or key combination: ctrl + alt + F2 Big Grin
This is the XBMC-live!
Quote:YES. Putty program (the network) ... or key combination: ctrl + alt + F2
This is the XBMC-live!
?

Quote:Is there a way to check to see if XBMC is responsive from the command line?
xbmc have a web server and a JSON server I guess you can query one of them.
vikjon0 Wrote:?
xbmc have a web server and a JSON server I guess you can query one of them.
Do you have an example of how you would do that?
Or is the JSON interface documented anywhere?
No, I never had the need. If it is not easily done in bash try pyhthon.

It may be better to map a re-start script to a remote button using irexec. Not sure how irexec works together with xbmc-live but in standard ubuntu it worked fine.
If anyone is interested - here is what I'm using:

__________________
while :
do
if ! wget -q -S --connect-timeout=3 -O /dev/null -T 3 --tries=3 "http://127.0.0.1:8080/xbmcCmds/xbmcHttp?command=GetCurrentlyPlaying()" > /dev/null
then
killall -9 xbmc xbmc.bin
fi
sleep 5
done
__________________