Uptime Monitoring with Pingdom

The other day I signed up for uptime monitoring with Pingdom for my website. I decided to find out how much downtime my own site really has. The issue of down time was brought to light after some of the other websites I administrator for work having technical issues causing downtime

The things I like about Pingdon is that you can can monitor 1 site for free and they host a public report of your sites uptime. My uptime report can be found here http://status.cloudportal.org/

If you are interested in creating a stats page for your domain have a look here http://blog.pingdom.com/2011/04/01/public-status-pages-under-your-own-custom-domain/

Web Server Upgrade Time Baby!

After many years of having my website hosted on a generic home-made server I have  upgraded to a newer server.

The new server is a HP ProLiant DL360 G3 with the specs-
CPU x2: Intel Xeon 3.06GHz
RAM: 2.5Gb ECC
HDD: x2 146.6GB SCSI 10,000RPM in a RAID1

The old server was a Intel D845EWD entry-level server motherboard with the specs-
CPU: Intel Pentium 4 3.0GHz
RAM: 2Gb non ECC
HDD x2 80 IDE in a RAID 1, 3x 300Gb SATA1 in a RAID5 on a Adaptec PCI Hardware RAID controller
Case: Antec beige tower

The choice of which Linux distribution to use was a not a decision I look lightly. In the end Ubuntu 12.04 LTS won over Centos 6.2. Both operating systems offered an awesome Enterprise OS but I am familiar with Ubuntu and already use it on my desktop and other servers.

I upgraded my firewall server a few weeks ago and since then have performed some tweaks to varnish the reverse web proxy service and now my website should load quicker and almost be slashdot proof. I think only only issue now is my lack of upload bandwidth and my ADSL router is crappy.

YouTube HTML5 Vs Flash

This is the first time I’ve done and performance tests between HTML5 and Flash. Lets see how this goes.

Firstly the computer I’m running is

The web browser I’m running is Google Chrome Version 19.0.1084.46

I watched a YouTube video http://www.youtube.com/watch?NR=1&feature=endscreen&v=iMP3PsKmcyU in 720p HD full screen





I watched the video in Flash v11.2.202.235 and the system resources looks as like
 I went to the url http://www.youtube.com/html5 and enabled HTML5

Watched the same video again in HTML5 and the system resources looks as like
 I was pleased by the cpu load reduction but I was very impressed by the improved picture quality.

Adobe Flash 11.2 Background Updates from an Internal Server

One major problem with Adobe Flash Player is that the software often has vulnerability which allow code to take control of a users system. The issue is gets worse by the fact most enterprise environments wont allow their users to have Administrator user rights to reduce the amount of viruses, malware and spyware installed thus not allowing the same users to install the latest version of Adobe Flash Player and leaving them with outdated versions which are vulnerable.

After GOOGLING to try and find a workable restitution I found http://helpx.adobe.com/flash-player/kb/administration-configure-auto-update-notification.html which talked about a new option in Adobe Flash Player called SilentAutoUpdate. This new option allows System administrators to push settings to Adobe Flash Player by creating a text file called mms.cfg in the users C:\Windows\System32\Macromed\Flash for Windows 32bit or C:\Windows\SysWOW64\Macromed\Flash for Windows 64bit. I’m not going to go into to much detail but I at my work I could use Group Policy to copy this file I’ve created to all my users computer to allow SilentAutoUpdate. SilentAutoUpdate works by a task in the systems Task Scheduler being created and running once a day. This task starts a service called  AdobeFlashPlayerUpdateSvc. The service program is located in the same location as the mms.cfg file called FlashPlayerUpdateService.exe. The FlashPlayerUpdateService.exe reads the mms.cfg file. To enable the SilentAutoUpdate option to log add SilentAutoUpdateVerboseLogging=1 into the mms.cfg file.

The only issue I have with the SilentAutoUpdate option is that the software must have direct access to the internet via ports 443 and 80. In some enterprise environments such as mine must access the internet via a proxy which causes the SilentAutoUpdate to fail to update.

1 way around the SilentAutoUpdate not working via a web proxy is to create an internal mirror. This can be done by following the instructions on the http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/flashplayer/pdfs/flash_player_11_2_admin_guide.pdf pages 17-19. Once creating a local mirror you can add the option SilentAutoUpdateServerDomain=server.domain.com to your mms.cfg file which tells your FlashPlayerUpdateService access the update files via your web server rather than the internet directly.

My MMS.CFG file for testing looks like this but once working I would remove the VerboseLoging option to reduce the log file size. The settings below turn off gui updates and enable silent updates:


Then my other issue was how to I keep my mirror synced with Adobes so I created a Shell Script to do it for me in a daily cron job. The script creates the folder structure, uses wget to download the files and logs everything it does. Save the text below as adobe-flash-background-updates.sh and ensure the paths are correct before running. To run the script run the command sudo sh ./adobe-flash-background-updates.sh once you know to the script is working for you add it to cron.


########## INTOMATION ABOUT SCRIPT ##########

# This Script Titled adobe-flash-background-updates and was written by Tyrone Wyatt of www.cloudportal.org.
# This Script is open to use by everyone and is not under any licence.
# See flash_player_11_2_admin_guide.pdf for more infomation on how this script is required to function.

########## SCRIPT CONFIG ##########

# The TITLE option is the scripts name

# The LOG option is the log file.

# The SOURCE option is the mirror on which you would like to download the flash files from.

# The DESTINATION option is where you would like your downloaded files to go so they are accessable by your web service.

# The VERSION option is the current major version of Flash Player (for Flash Player 11.2, the major version is 11).

########## SCRIPT CORE ##########

touch $LOG

echo “Welcome to $TITLE Script!”
echo “=O====== $(date) ========” >> $LOG 2>&1

if [ -d $DESTINATION/pub/flashplayer/update/current/sau/$VERSION/xml ];
echo ‘Skipping destination folder structure creation.’
echo ‘Creating destination folder structure.’
sudo mkdir -v $DESTINATION/pub/ >> $LOG 2>&1
sudo mkdir -v $DESTINATION/pub/flashplayer/ >> $LOG 2>&1
sudo mkdir -v $DESTINATION/pub/flashplayer/update/ >> $LOG 2>&1
sudo mkdir -v $DESTINATION/pub/flashplayer/update/current/ >> $LOG 2>&1
sudo mkdir -v $DESTINATION/pub/flashplayer/update/current/sau/ >> $LOG 2>&1
sudo mkdir -v $DESTINATION/pub/flashplayer/update/current/sau/$VERSION/ >> $LOG 2>&1
sudo mkdir -v $DESTINATION/pub/flashplayer/update/current/sau/$VERSION/xml/ >> $LOG 2>&1
sudo mkdir -v $DESTINATION/pub/flashplayer/update/current/sau/$VERSION/install/ >> $LOG 2>&1

echo ‘Downloading files…’
wget -nv $SOURCE/pub/flashplayer/update/current/sau/$VERSION/xml/version.xml -O $DESTINATION/pub/flashplayer/update/current/sau/$VERSION/xml/version.xml >> $LOG 2>&1
wget -nv $SOURCE/pub/flashplayer/update/current/sau/$VERSION/install/install_all_win_ax_sgn.z -O $DESTINATION/pub/flashplayer/update/current/sau/$VERSION/install/install_all_win_ax_sgn.z >> $LOG 2>&1
wget -nv $SOURCE/pub/flashplayer/update/current/sau/$VERSION/install/install_all_win_pl_sgn.z -O $DESTINATION/pub/flashplayer/update/current/sau/$VERSION/install/install_all_win_pl_sgn.z >> $LOG 2>&1
wget -nv $SOURCE/pub/flashplayer/update/current/sau/$VERSION/install/install_all_win_64_ax_sgn.z -O $DESTINATION/pub/flashplayer/update/current/sau/$VERSION/install/install_all_win_64_ax_sgn.z >> $LOG 2>&1
wget -nv $SOURCE/pub/flashplayer/update/current/sau/$VERSION/install/install_all_win_64_pl_sgn.z -O $DESTINATION/pub/flashplayer/update/current/sau/$VERSION/install/install_all_win_64_pl_sgn.z >> $LOG 2>&1

echo “Script complete! See log file for more infomation $LOG”
echo “=X====== $(date) ========” >> $LOG 2>&1

echo ‘ ‘ >> $LOG 2>&1

########## END OF SCRIPT ##########

I have been testing the script and am pleased to see it works well. The log file that the script creates looks much like the flashinstall.log for ease of reading.

If you require more infomation as I sometimes cut corners on documenting then you should read these other usful pages

Configuring Linux Ubuntu 10.04 LTS for APC UPS Network Shutdown

First I tried installing APC PowerChute 3.0.0 by doing the following

  1. Download Linux installer from http://www.apc.com/products/resource/include/techspec_index.cfm?base_sku=SFPCNS300&tab=software
  2. Copy pcns300Linux.tar.gz to /home/<username>. I used WinSCP.
  3. #sudo apt-get install openjdk-6-jre-headless
  4. #cd ~/
  5. #sudo tar -xvf pcns300Linux.tar.gz
  6. #cd Linux
  7. #vim install.sh
  8. search for $LINUX) and Change the next line down from /etc/SuSe-release to /etc/issue
  9. Safe file and exit vim
  10. #sudo sh ./install.sh
  11. Agree to licence agreement
  12. Leave installation path the default
  13. Enter Java path of /usr
  14. Bowser to https://<hostname>:6547/cfgwizard in your web browser and configure to your APC UPS.

But it didnt work very well at all. I had issues on my firewall server because APC PowerChute 3.0.0 uses a custom apache that runs on custom ports but on restart binded to port 80 where varnish is ment to be running! So it caused the public website to go down. I rememebered that I used to use apcupsd along time ago and gave that ago. It turns out it works!!!!

  1. #sudo apt-get install apcupsd
  2. #sudo vim /etc/apcupsd/apcupsd.conf
  3. Add these lines:
    UPSCABLE ether
    UPSTYPE pcnet
    DEVICE ipaddr:username:passphrase
  4. #sudo service apcupsd start
  5. #sudo service apcupsd status

After running the last command you should get some info from your UPS.

tyrone@corfw01:~$ sudo service apcupsd status
APC : 001,050,1266
DATE : Thu Mar 08 18:54:00 EST 2012
HOSTNAME : corfw01
VERSION : 3.14.6 (16 May 2009) debian
UPSNAME : corpus01
CABLE : Ethernet Link
UPSMODE : Stand Alone
STARTTIME: Thu Mar 08 18:53:29 EST 2012
LINEV : 241.9 Volts
LOADPCT : 31.0 Percent Load Capacity
BCHARGE : 100.0 Percent
TIMELEFT : 23.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
MAXLINEV : 241.9 Volts
MINLINEV : 233.2 Volts
OUTPUTV : 242.1 Volts
DWAKE : 000 Seconds
DSHUTD : 020 Seconds
DLOWBATT : 02 Minutes
LOTRANS : 168.0 Volts
HITRANS : 264.0 Volts
RETPCT : 000.0 Percent
ITEMP : 28.0 C Internal
ALARMDEL : 5 seconds
BATTV : 217.0 Volts
LINEFREQ : 50.0 Hz
LASTXFER : Unacceptable line voltage changes
XONBATT : Sat Mar 10 08:12:26 EST 2012
TONBATT : 0 seconds
CUMONBATT: 20 seconds
XOFFBATT : Sat Mar 10 08:12:27 EST 2012
STESTI : 336
STATFLAG : 0x07000008 Status Flag
REG1 : 0x00 Register 1
REG2 : 0x00 Register 2
REG3 : 0x00 Register 3
MANDATE : 12/14/10
SERIALNO : IS123456789
BATTDATE : 12/14/10
NOMOUTV : 240 Volts
NOMBATTV : 192.0 Volts
FIRMWARE : 452.18.W
APCMODEL : Smart-UPS RT 6000 RM-1
END APC : Sun Mar 11 01:28:26 EST 2012

Note that I had to change the APC network mangament 2 card’s passprase because the default passprase contains spaces.

Adobe Announces Plans To Abandon Flash On Linux

This announcement has come as a bit of a shock to me. Adobe only recently released their first stable Linux 64bit flash plugin months ago and now this announcement that the plugin is going to be discontinued. While I am pleased that Adobes partnership with Google has meant that a 64bit flash plugin will exist on Linux for Google Chrome users such as myself. This is news is very bad for the Firefox users and Linux Distributions like Ubuntu.

I hope that Adobe wakes and a smells the roses. The Flash plugin is a thing of the past with HTML5 video and JavaScript  its replacement. Pulling stunts like this gives web designers even less reasons to use flash content.