Computing 2013

No network on resume in OpenSuse

I noticed that my network connection was not active after a resume from sleep mode in OpenSuse 12.2

The symptom was that when I resumed, the network connection would not be active and ifconfig showed only the lo connection, not eth0. I could manually solve this each time by running the following commands but this was a pain and hardly a seamless user experience.

$ sudo dhclient eth0
$ sudo mount -all

Read more...First published on 21st August 2013 and last modified on 27th December 2013.


Changing Munin default graph colours

Munin is a computer monitoring tool which provides useful tracking facilities to monitor hardware and software over time. I've found it very useful but one of my main gripes has been poor colour choice for lines on graphs. By default, for many plugins Munin chooses a colour from an internal palette for each line on a graph. This seems fine but in practice, some colours are very poor contrast against a white background e.g. lime green:

Munin colours before

The lime green line in the middle is the one I'm really interested in being able to see at a glance. I tried googling for all manner of things regarding changing default colours but had no luck. Everything was very unhelpful or only useful if you were writing your own plugin. I've never found the Munin documentation particularly accessible either which didn't help.

In the end, I managed to solve my problem by assuming that the default colours must be stored in plain text somewhere on the filesystem so I ran a search to find the relevant colour's hexadecimal code: #ccff00 i.e. Lime green. The following line returns a list of all files on the filesystem (without leaving it for other mounted filesystems, as specified by the -xdev option) and then searches for "ccff00" in each, returning any matches with a file name:

$ sudo find / -xdev -type f -print0 |xargs -0 grep -H "CCFF00"
/usr/share/perl5/Munin/Master/GraphOld.pm:        qw(#00CC00 #0066B3 #FF8000 ↵
#FFCC00 #330099 #990099 #CCFF00 #FF0000 #808080

Read more...Published on 28th April 2013.


Spinning down hard drives in Linux

I have a system with an SSD containing my OS (OpenSUSE) and a lot of my data as well as a traditional spinning hard drive with extra data. I don't often access the data on the spinning hard drive so would like to be able to spin it down to both make it quieter and use less energy. This turned out to be harder than originally envisaged. The ultimate solution is below but here's a little background to start.

hdparm and initial troubles

There's a linux utility called hdparm which is designed to get or set parameters on SATA or IDE hard drives. This is what everyone recommends using to set your idle timeout on the drive. The parameter you want to set for spin-down timing is '-S' which is a value from 1 to 255. The values between 1 and 240 represent an idle timeout of value x 5 seconds, e.g. a value of 1 is a timeout of 5 seconds and a value of 120 is a timeout of 10 minutes:

Read more...First published on 23rd March 2013 and last modified on 27th March 2013.


Accurate ISO files from CDs

It's quite common to want to make a mountable ISO file from a CD so that you don't have to deal with the hassle of the physical disks. I do this a lot for CDs that come with hardware (e.g. motherboard driver CDs). It's certainly more convenient than having to locate that elusive disk when you're struggling with an old motherboard or sound card.

There is a lot of information given in the references below about the choices behind the best technique. Here, I summarise the a reliable technique for producing verifiable copies.

Read more...First published on 27th January 2013 and last modified on 30th January 2013.


Cisco VPN AnyConnect Secure Gateway Error

I use the Linux Cisco AnyConnect VPN client to connect to a VPN server at the University of Oxford but recently began receiving this error:

AnyConnect cannot confirm it is connected to your secure gateway. The local network may not be trustworthy. Please try another network.

I tried all the usual troubleshooting steps including re-installing, upgrading version and trying the client in a clean install of the OS in a virtual machine. None worked.

After googling, the error cause appeared to be the same as that detailed on this site about certificate errors. In particular, one of the comments by Nathan on 27th April 2012.

In brief it occurs because the Cisco client can't identify the Certifying Authority (CA) for the VPN server.

Read more...First published on 15th January 2013 and last modified on 30th January 2013.


< Newer articles | Older articles >