Archive for the ‘Linux’ Category

A while back I wrote an awk script to process a custom log file to work out how an application was performing over a period of time. The following script takes a timestamp in field one $1 and also an arbitrary field $10 in this case. For every 100 lines of the log file processed […]

Share

Whilst recently looking into usage of SSL, I needed to analyse some logs from apache to determine requests per second. Initially I wrote a quick bash script to do this, however figured it would be handy to elaborate on this, as a result I have posted a perl script on github at apache-log-stats total_requests=$(zcat b2f01_ApacheAccess.2011-12-05.gz […]

Share

At Everlution we did a hack day to help motivate developers and to get the team working together. We started at 8.30am and finished at 5pm. It was pretty impressive what all the teams managed to achieve, with four teams of two developers and a designer. It was set out in a competition style event […]

Share

I previously wrote about “Installing Java & MySQL – unattended/non-interactive installation”. Whilst using slack, I have been running apt-get during postinstall rather than preinstall. Files are transferred from slack after preinstall as such transferring any files that conflict with the packages configuration files, apt-get will prompt regardless of DEBIAN_FRONTEND=noninteractive. Not ideal if your trying to […]

Share

A nice tip for logging data against apache logs within requests. Apache_note is a wrapper for Apache’s table_get and table_set. It edits the table of notes that exists during a request. The table’s purpose is to allow Apache modules to communicate. if (function_exists(‘apache_note’)) { if (isset($_SESSION) && !empty($_SESSION)) { apache_note(‘session_id’, session_id()); apache_note(‘users_id’, isset($_SESSION['users_id'])? $_SESSION['users_id'] : […]

Share

Vagrant is simply a wrapper around Virtualbox headless that allows for provisioning virtual machines with support for puppet, chef-solo, chef, and bash. This allows you to automate the deployment and sandboxing of development sites. Additional base box images can be found at vagrantbox.es. Installing Vagrant apt-get install -y ruby1.9.1 ruby1.9.1-dev ln -svf /usr/bin/ruby1.9.1 /etc/alternatives/ruby gem […]

Share

This is something I commonly have to run and always seem to forget. In order to run unattended. Java 6 installation on Ubuntu add-apt-repository “deb http://archive.canonical.com/ $(lsb_release -s -c) partner” apt-get update echo “sun-java6-jdk shared/accepted-sun-dlj-v1-1 select true” | debconf-set-selections echo “sun-java6-jre shared/accepted-sun-dlj-v1-1 select true” | debconf-set-selections DEBIAN_FRONTEND=noninteractive aptitude install -y -f sun-java6-jre sun-java6-bin sun-java6-jdk Java […]

Share

I Spent a little while yesterday investigating why memcached causes problems with multigets returning results and ended up comparing debian vs ubuntu. I tested from virtual machines and physical hardware of relative specs. I have also tried a combination of libmemcached libraries and tuned the tcp stack, however here are some of the results from […]

Share

Currently I have been trying to migrate a 4 node production MySQL database to a blade G5/G7 with vmware ubuntu instances on top of netapp. Typically I would not use a virtual machine nor try to run MySQL on top of NFS, however this needs to fit within the clients infrastructure. Baseline Base line performance […]

Share

One of our clients Gorkana was bought by Durrants. As such I have been working on integrating and merging data. As a result I wrote a script to synchronize data between MySQL and Oracle, which is presently a one way synchronization. The implementation The script(s) to synchronize data was broken into a few scripts. Automatically […]

Share

About this blog

Andrew Johnstone is a software engineer / lead developer working at Everlution Software.

Photostream

  • Multiple Ucarp on the same host | PaoloBertasi: […] http://ajohnstone.com/achives/running-several-vips-on-the-same-interface-with-ucarp-and-ha [...]
  • mohit: I am working the same on windows server 2008 and mysql version 5.1.39 ,but it is not working and i a [...]
  • Steve: Hi there... sorry that this is old, but I'm trying to use your script to check for my usage per seco [...]
  • vinodh: great. thanks . My boss wanted me to configure multiple mysql instances on same physical machine . i [...]
  • andrew.johnstone: In the example above this was in fact using spl_autoload_register. I've never debugged this properly [...]

GitHub

GitHub Octocat

ajohnstone @ GitHub

  • Status updating...