Archive

Posts Tagged ‘Xbox’

Xbox Live Status Script

December 27, 2014 Leave a comment

If you’re like me, frustrated by all the Xbox One DDOS going on over the Christmas Holidays and have a linux box lying around here is a small script to check the service status in Australia.

Just cron it and output it to a log file – after that you can do what ever you want with the output.

I hooked the output up to my Raspberry Pi and changed the color of an LED  from Red to Green based on the Xbox Live Core Services Status.

#!/bin/bash
# Author: Merric Reese
# Date: Dec 26, 2014
# Purpose: Show Xbox Live Status and report when Core Services are online
# Notes: Common sense rules apply to usage - I only run this script about every 5 minutes during a service outage 
MR_PAGE=$(curl -s http://support.xbox.com/en-AU/xbox-live-status)
MR_XBOX_CORE=$(echo "$MR_PAGE" |grep -Eo "Xbox Live Core Services.*[L|l]imited|Xbox Live Core Services.*[A|a]ctive" |grep -iEo "active|limited")
MR_XBOX_PURCHASES=$(echo "$MR_PAGE" |grep -Eo "Purchase and Content Usage.*[L|l]imited|Purchase and Content Usage.*[A|a]ctive" |grep -iEo "active|limited")
MR_XBOX_GAMING=$(echo "$MR_PAGE" |grep -Eo "Social and Gaming.*[L|l]imited|Social and Gaming.*[A|a]ctive" |grep -iEo "active|limited")
MR_XBOX_WEBSITE=$(echo "$MR_PAGE" |grep -Eo "<h3>Website.*[L|l]imited.*</h3>|<h3>Website.*[A|a]ctive.*</h3>" |grep -iEo "active|limited")
MR_XBOX_TV=$(echo "$MR_PAGE" |grep -Eo "TV, Music and Video.*[L|l]imited|TV, Music and Video.*[A|a]ctive" |grep -iEo "active|limited")
if [ "$MR_XBOX_CORE" != "Limited" ] && [ "$MR_XBOX_GAMING" != "Limited" ]; then
# echo "#"
echo "### FIXED ### " $(date) "Xbox Live Core Services: $MR_XBOX_CORE | Social and Gaming: $MR_XBOX_GAMING | Purchases and Content: $MR_XBOX_PURCHASES | Website: $MR_XBOX_WEBSITE | TV, Music and Video: $MR_XBOX_WEBSITE"
# echo "#"
else
echo "waiting... " $(date) "Xbox Live Core Services: $MR_XBOX_CORE | Social and Gaming: $MR_XBOX_GAMING | Purchases and Content: $MR_XBOX_PURCHASES | Website: $MR_XBOX_WEBSITE | TV, Music and Video: $MR_XBOX_WEBSITE"
fi

BTW: I haven’t spent the whole time coding or waiting for Xbox Live to come back online.  I’d just like to able to download the free games when the service is available and this was an easier way to check the service status.

If you found this useful then please leave a comment.

Have a very Merry Christmas and a Happy New Year.

Advertisements
Categories: Technology Tags: , , ,