Monthly Archives: October 2009
Monitoring disk activity using block_dump
| 29-Oct-2009 | Posted by Sonia Hamilton under Monitoring |
A couple of good links [1][2] came up on the Axxs collective email list about monitoring disk activity under Linux using block_dump.
In a nutshell:
kern.debug setup in syslog.conf (it often is; if sync is used disk activity will obviously be greater) echo 1 >/proc/sys/vm/block_dump wait n seconds echo 0 >/proc/sys/vm/block_dump Do various grep'ing on /var/log/debug for READ, WRITE, inode, block, etc
Thanks to Andrew Mc & Torrance.
Script to correct first day of week in en_AU locale
| 26-Oct-2009 | Posted by Sonia Hamilton under Ubuntu |
I blogged previously about how the Australian locale in Ubuntu incorrectly uses Sunday rather than Monday as the first day of the week, and how to manually fix it. Unfortunately, whenever the locale gets updated (eg via one of Ubuntu’s regular package updates), the locale reverts and you have to manually fix it again.
So I’ve written a script that fixes the locale, and also hooked it into dpkg:
% cat fix_locale.sh #!/bin/bash LOCALE_FILE='/usr/share/i18n/locales/en_AU' if [ -f $LOCALE_FILE ] ; then sudo sed -i 's/^first_weekday.*/first_weekday 2/' $LOCALE_FILE sudo locale-gen killall gnome-panel fi
To run this automatically, add a stanza like this to /etc/apt/apt.conf:
APT {
Update {
Post-Invoke {"/home/sonia/bin/fix_locale.sh"; };
};
};
The script could be smarter ie check the existing value of first_weekday and only change it if it’s different, but I’ll fix that when I’ve got more time.
Why “require ‘rubygems’” Is Wrong
| 23-Oct-2009 | Posted by Sonia Hamilton under Ruby |
A link off the RORO list about Why “require ‘rubygems’” Is Wrong.
In a nutshell, the environment variable RUBYOPT should include rubygems eg
export RUBYOPT="rubygems"
Howto install Virtualbox on Ubuntu Jaunty
| 23-Oct-2009 | Posted by Sonia Hamilton under Ubuntu |
Here’s how to install Virtualbox 2.1.4 on Ubuntu Jaunty (people are saying 2.2.0 is buggy). And now that Oracle owns Sun, Virtualbox may go the way of the dodo…
No rocket science here – just saving myself time in future.
sudo aptitude install virtualbox-ose virtualbox-ose-qt virtualbox-ose-source dkms virtualbox-guest-additions
Applications -> Accessories -> VirtualBox OSE
Ruby 1.9 shell aliases
| 19-Oct-2009 | Posted by Sonia Hamilton under Ruby |
I’ve started playing with Ruby 1.9 – the latest and greatest version of Ruby. On Ubuntu Jaunty, 1.8 is considered mainline and 1.9 experimental – here are the shell aliases if using 1.9:
alias ri='/usr/bin/ri1.9' alias irb='/usr/bin/irb1.9' alias rdoc='/usr/bin/rdoc1.9' alias ruby='/usr/bin/ruby1.9' alias gem='/usr/bin/gem1.9' # belts-and-braces - gem 1.8 & 1.9 are the same version - 1.3.1
Recent Comments