Home > Technology > Xbox Live Status Script

Xbox Live Status Script

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: , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: