Feb 082009
 

I was reading a comment about the df command (in relation to reserved filesystem space) and realised that the clueless newbie was right; it is odd that df does not mention reserved space. Of course it would also be wrong for df to lie about the matter too. I then realised that df is long overdue for a bit of refreshing. If you look at the typical output of the df command, you will find it inconveniently cluttered :-

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/datavg-810root
                       12G  7.8G  4.3G  65% /
tmpfs                 2.0G     0  2.0G   0% /lib/init/rw
varrun                2.0G  416K  2.0G   1% /var/run
varlock               2.0G     0  2.0G   0% /var/lock
udev                  2.0G  3.1M  2.0G   1% /dev
tmpfs                 2.0G  344K  2.0G   1% /dev/shm
lrm                   2.0G  2.4M  2.0G   1% /lib/modules/2.6.27-7-generic/volatile
/dev/sdb1             130M   36M   88M  29% /boot
/dev/mapper/datavg-opt
                      2.0G  776M  1.3G  39% /opt
/dev/mapper/datavg-810var
                      5.0G  1.4G  3.7G  28% /var
/dev/mapper/datavg-home
                      256G  116G  141G  46% /home
/dev/mapper/datavg-vmachines
                       96G   62G   35G  64% /vmachines
/dev/mapper/datavg-bragspool
                      256G  6.2G  250G   3% /var/spool/brag
/dev/mapper/datavg-herpesbackup
                       16G  4.6G   12G  29% /var/herpes
/dev/sda1             463G  147G  293G  34% /mdata
/dev/scd0             2.4G  2.4G     0 100% /media/CIVCOMPLETEEU
/dev/mapper/datavg-cdimages
                       32G  1.9G   31G   6% /cdimages
/dev/mapper/datavg-ontapsim
                       16G  498M   16G   4% /sim

Part of the problem is that df does not do quite what it claims to do … to report free space on the mounted filesystems. It also gives some (a very small amount) of additional information about the relevant filesystems … particularly the device the filesystem is mounted on. This “helps” to make the output more cluttered that it needs to be. It is possible that there are those who will argue that the device is the filesystem and not where it is mounted; they are arguably right, but when you use df you are either looking at where in the Unix file hierarchy there are places that have less space than is comfortable, or for places that have enough space to put that big file you are about to download.

Next the command itself has an obscure command to make it easier to type on a slow type-writter like terminal (those who are below a certain age will not realise that we used to comminicate with Unix machines using a terminal that was more like a printer than the screens we use today). It might be better named fsspace with an alias of diskspace for those who want to concentrate on what worries them rather than on what worries the machine.

Next why not take advantage of certain features that have crept almost silently into the command line over the last few decades ? Why not adjust the output to the width of the terminal window (look for the $COLUMNS evironment variable), spacing things out or even adding more information when you have enough space?

Finally if you were to dig around the df command a little bit you will encounter something peculiar called “inodes”. Now I know what an inode is, and I dare say quite a few people reading this will know, but if you do not, knowing how many inodes there are is not very useful information. It is relatively rare (these days) for a filesystem to run out of inodes so this information has a low priority, and why not use a term more understandable than “inodes” ?

Changing a term is something to be avoided in most circumstances which is why we still have “inode” where even the originator of the term has to guess that the “i” means “index”. I would suggest that something like “fileslots”or perhaps “fslots”

We now have the basic specification of something that should look like :-

% diskspace
Filesystem                            Size  %Used %fslots  Avail
/                                      12G    70%      3%   3.6G
/lib/init/rw                          2.0G     0%      0%   2.0G
/var/run                              2.0G     0%      0%   2.0G
/var/lock                             2.0G     0%      0%   2.0G
/dev                                  2.0G     0%      1%   2.0G
/dev/shm                              2.0G     0%      0%   2.0G
/lib/modules/2.6.27-7-generic/vola+   2.0G     0%      0%   2.0G
/boot                                 130M    29%      0%    88M
/opt                                  2.0G    40%      1%   1.2G
/var                                  5.0G    18%      0%   4.1G
/home                                 256G    52%      0%   124G
/cdimages                              32G    65%      0%    12G
/mdata                                463G    36%      1%   280G

This could be improved in some ways – for instance it would be helpful to skip over certain of the filesystems that are not strictly speaking backed by disk. However it is beginning to be useful.

Or would be if the code exists. Fortunately it does.

Feb 062009
 

Firstly I should point out this has nothing to do with Carol Thatcher’s use of the term or indeed a considerably less recent incident where Naomi Campbell was supposedly called one. It just so happened that the former has triggered the memory of a ‘story’ that I wanted to write.

Secondly this is not some kind of attempt to claim those who feel that the word (and the toy) is racists are wrong. If someone feels the use is racist that is a good enough reason to get rid of gollywogs. Besides which judging from the Wikipedia article on Gollywogs, most of the gollywog toys were pretty damn scary – too scary to be given to children anyway.

Way back in the distant past I would sometimes play with a gollywog hand puppet that my grandparents had in their house. Perhaps I was dumb (I was after all less than 10 at the time) but I always thought it was some kind of cartoon character or something. I certainly did not make an association between it and any kind of human; the toy I played with was definitely not that human!

Later at school when racist words crept in (at the some time I started getting called “four-eyes” and “lanky”), I do not recall the word “gollywog” being used to refer to anyone.

So back when I first heard about gollywogs being banned for being rascist (probably something to do with a certain jam), I practically fell off my chair in surprise. Did anyone seriously believe that there was any similarity between gollywogs and black people ?

I can distantly remember the “Golly” logo being used on certain jars of jam (“jelly” to any Americans tuning in), but again it never seemed to me to be anything other than some sort of cartoon character from the distant past. It also did not seem to bring to mind black people in any form.

Perhaps this was a case of people reading about the history of the word, and jumping to conclusions of how and why it was being used ? Taking offense at something that was not at the time intended to be used as a racist term ?

It would also explain why gollywog has apparently now become a term used by racists. I remain to be convinced that it was so used in the past … I do not remember it being used, and there are far more hateful words that were thrown around back then.

Of course having read up on it a little bit I now know that the origins were racist, but a word and an image that has originally racist origins can end up being used innocently. For example “Welsh” used to mean “foreigner” thus “Wales” meant “the land of the foreigner”, complete with a racist undercurrent. Now “Wales” is merely the name of a country we should really be calling “Cymru” (even if I’m not sure how to pronounce it).

On a side note, why do we have to use “black people” to use to refer to people whose African ancestors were rather more recent than others ? It seems rather insulting (to either “white” or “black”) to categorise any person by the colour of the dead stuff that keeps the squishy bits in. And it is not even particularly accurate. “Chocolate” would work so much better and be more inclusive – my skin is white chocolate, hers is milk chocolate, and his is dark chocolate.

Feb 022009
 

Today (and probably tomorrow) the South of England has been subjected to the heaviest snow-fall for 18 years or so.  As can be expected for such an unusual weather event (the Met office dragged out it’s rarely used “extreme” warning), anyone travelling this morning found things more than a little tricky.

As usual the whingers are also out in force claiming that we should have prepared better and comparing us to countries that are more used to extreme weather. They have a point: if we were to spend huge amounts of money to prepare for events that happen once every 20 years we could cope better.

And some of the whingers need to take note that some of the preparations need to be made by them; motorists in countries with more extreme weather make some of the preparations themselves. So many of the whingers share in responsibility for the lack of preparation.

But does it really matter that much ?

Oh businesses will complain, but what does it really harm the world if we take a day off ? At least those who live any distance from work. In many cases people can work from home which reduces the risk for those who really have to get in (and not just because their medieval bosses do not trust them to get something done).

The real answer is to lighten up and enjoy the different weather – it may be cold, but at least it is bright too!

Jan 292009
 

When the economy is well, we constantly hear from businesses about how government should not interfere with business; that anything the private sector does is sacred, and the public sector is at best pathetic. They complain the most about regulation but government support for problematic businesses frequently comes up to. And of course whinge constantly about taxation on business.

Of course any business that needs support from the government to survive is pathetic and probably should fail.

But wait! Come this recession, we are seeing speaking heads from businesses in droves demanding that the government bail their business out. Somehow because there is a recession on, all the traditional rules can be ignored and businesses need support from government.

Sure perhaps we do need to use public money to help out businesses that would otherwise fail. After all reverting to 19th century economics like the Conservatives seems to have done is likely to be far worse. But that does not mean they should get a free ride – we should remind them that businesses usually ask to be left alone, and that goes two ways.

And of course put up taxes on businesses a tad, to pay back the money over the long term. And every time a business complains about high taxes, remind them of these times when government was spending money to help businesses out.

Jan 282009
 

Today the conflict in Northern Ireland has appeared in the news again. Fortunately this time the conflict was no more than angry words, but it shows that the “troubles” are not quite over yet. The news that sparked this conflict? The announcement that all the families who lost a member during the troubles would receive £12,000 as some sort of gesture (they avoid the word “compensation”).

The problem with this is that this package includes those families who lost a member who was a terrorist “killed in action” as it were – for example the family of an IRA bomber killed by his own bomb would receive this gesture. It is hardly surprising that this is somewhat less than those who feel they are genuine victims of terrorism.

Those who came up with this idea need to have their heads examined. Perhaps their hearts were in the right place, but they should have known that this proposal would never have been popular. The family of that IRA bomber mentioned earlier (and the equivalent families of Unionist terrorists) are victims of terrorism as much as the other families, although I very much doubt I would get much agreement from the other families.

Why?

First of all the family of a terrorist is not responsible for the actions of the terrorist, and they will suffer the normal effects of grief when that terrorist is killed. In a society where that terrorist did not feel the need to go out and murder people to make a point, the family would still have that member of their family.

Does it sound like I am blaming society for turning ordinary angry young men (and women) into terrorists ? Yes to an extent.

A normal healthy society does not turn a significant number of angry young men into terrorists. They may well go on protests, throw bricks through windows, and generally make a nuisance of themselves. They will not go out and plant bombs, and shoot people.

Any society that does turn a significant number of angry young men into terrorists is sick in some way.

That does not mean that the terrorist is innocent of the crimes they commit – anyone who bombs, or shoots in an attempt to achieve a political end is in the wrong.

But any society that is sick needs a tonic.