Linux Server Update

Last weekend I decided it is time to upgrade my existing Atom server running on CentOS 5 to the most recent version. Since I am not a big fan of upgrading the system during runtime, mostly due to many custom tools and packages I installed, I decided I’d rather try a completely new installation and copy over everything else from the old system.

So how would I go ahead and do that? I had no spare disks, my external disk just died and I was unable to turn the server off for an extended period due to monitoring and shares running on it. I had to find a way to get a new system running without touching my existing server.

This is what I figured out might work:

    Install Virtualbox on my desktop
    Use CentOS 6.3 ISO to install on a USB stick
    Use USB device to boot Desktop into the new System
    Prepare the USB device to run as my new server
    Copy configurations and test them
    Attach USB stick to old server and boot into the new system

Easy enough! And it sure was easy to get that far. Linux was really easy to get running on my USB device and I had no issues to get it to boot on my old server after changing the fstab and changing the boot loader.

I would say that this is something that you can only do with smoothly with Linux.

bf3stats API Call Example

As I have seen a couple of google searches hitting my page looking for some easy bf3stats API example here some code. It is pretty much the same in my bf3stats page and it gives you an idea how easy it is to fetch the data from their API.

 $postdata['players'] = json_encode($players); // Player names in an array
 $postdata['opt'] = json_encode($options); // Various options described on the bf3stats API page

$c = curl_init('http://api.bf3stats.com/pc/playerlist/');
 curl_setopt($c, CURLOPT_HEADER, false);
 curl_setopt($c, CURLOPT_POST, true);
 curl_setopt($c, CURLOPT_USERAGENT, 'BF3StatsAPI/0.1');
 curl_setopt($c, CURLOPT_HTTPHEADER, array('Expect:'));
 curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
 curl_setopt($c, CURLOPT_POSTFIELDS, $postdata);
 $data = curl_exec($c); // Holds you result as an array
 $statuscode = curl_getinfo($c, CURLINFO_HTTP_CODE);
 $errormsg = curl_error($c);
 curl_close($c);

 

Obviously this is just the CURL call without any error handling or additional checks. But that’s all there is to grabbing player data from the API. My page then uses all that data to come up with all the statistics you can see. For details refer to the bf3stats.class.php in the bf3stats project.

bf3stats Version 0.0.8 Released

Another update to bf3stats. Please not that there were a lot of template changes in the past releases. If you are using a modified version please make sure to create a copy first before installing the updates. The configuration format has also changed a bit – make sure you mirror thoses changes into your own configuration.

Download the source on the bf3stats Page.

Version 0.0.8

  • bugfix for memcache config call during update
  • additional config variable used in update process outside cronjob
  • moved forced update to its own page
  • cronjob updated to use proper configuration variables
  • cronjob updated to store a list of already updated players in the past 60 minutes to conserve update slots
  • removed darkpro template and files to avoid confusion
  • made bf3stats the default template
  • renamed config for memcache to cache to avoid confusion

 

Battlefield 3 – Upcoming Update

We already knew for a while that DICE is working on an update for Battlefield 3. For those wondering why this is taking so long: Apparently they decided to make it a large one this time fixing a lot of issues the community has been complaining about. It seems that DICE listens to the rants. See the full list of confirmed fixes in their change log here:

Battlefield 3 Changelog

Battlefield 3 DLC in playtesting at DICE

Apparently DICE is doing some internal play testing on the upcoming (but yet unannounced) DLC for Battlefield 3:

http://t.co/SF93n1km

This is great news! Hopefully they will follow their earlier DLCs and make them worth it. I would think that play testing a DLC means a larger amount of content to be verified for release.

Defiantly looking forward to it! Thanks to BF3 Blog for the heads up.

bf3stats Version 0.0.7 Released

Hey readers,

I released a new version of bf3stats including a new popup for Accuracy and disabling memcache by default in the configuration (since it’s not often used on shared hosts).

Getting close to a final version with only a few things left to do to meet my roadmap.

Changelog

  • disable memcache by default
  • only enable smarty cache when memcache is disabled
  • disable smarty cache by default if memcache is not used
  • split up the statistics on their own templates, including them on the default template for home
  • added accuracy popup to show top 10 accuarcy for weapons
  • moved best ribbon and medal count to best ribbon name line

 

bf3stats Version 0.0.6 Released

Hey interested readers,

I just released bf3stats Version 0.0.6. It includes some updates to the updatePlayers.php cronjob and a couple of template tweaks. See changelog for details.

Changelog Version 0.0.6

  • removed debug output from updatePlayers.php cronjob
  • only update players that were not updated > 2hrs
  • moved Kits from Score to Kit popup
  • removed Main Kit name from Kit popup and only show the icon instead
  • re-aligned Kills popup
  • merged MVP tables together into one table
  • removed unique medal and ribbon counts from popup and renamed Progress to Unique Progress

bf3stats Version 0.0.5 Released

Just minutes after my 0.0.4 release I had some reports that the % of total scores for ground and air vehicles didn’t work as well as issues on the “Compare” page for players.

These issues have both been address. I am sorry for the inconvenience this double release may have caused. I will make sure to test things better in the future.

Changelog

Version 0.0.5

  • Bugfix: Wrong player list due to configuration changes on compare page
  • Bugfix: % of Total score was not displayed for ground and air vehicles

Download: http://www.grewe.ca/projects/bf3stats/