Email Address Password
Remember Me

Or Create a (Free) Account.
2004JanFebMarAprMayJunJul Aug Sep Oct Nov Dec
2005 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2006 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Oct Oct

No articles posted for 02/2015; five most recent entries shown.

Wed 5th Nov 2014 @ 16:54 2014: Linux Kernel Semaphores

Semaphores are a tunable in the Linux kernel, but they're a bit more awkward than some, just because it's a single tunable which contains 4 different variables, and I for one can never remember which is which.

The Red Hat 5 documentation has a great article about kernel semaphores which explains it all very clearly, including the names. I'll just add the comment about what they are all for.

$ cat /proc/sys/kernel/sem
250 32000 32 128

These are SEMMSL, SEMMNS, SEMOPM and SEMMNI respectively. As the article states, "ipcs -ls" gives you these, with a description:

# ipcs -ls
------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

Which gives us this handy table - where "Index" is the order in which they appear in the kernel.sem variable:

SEMMSL1Max Semaphores Per Array
SEMMNS2Max Semaphores System Wide
SEMOPM3Max Ops Per Semop Call
SEMMNI4Max Number of Arrays

To change any variable, you have to update all four. For example:

# sysctl -w kernel.sem="250 32000 100 128"
... or
# echo "250 32000 100 128" > /proc/sys/kernel/sem
... or
# echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
# sysctl -p

Post a Comment               

Wed 24th Jul 2013 @ 17:58 2013: HP iLO - getting full admin rights

Hewlett Packard (HP) ILOs can have multiple login IDs; yours may have some rights, but not others.
Assuming the host runs Linux, you can install the hponcfg package, which uses the BMC to talk to the ILO. Here, I've got access to an account called "stupid", which has no admin rights. I can use that (and the root access on the OS) to give myself full rights via this handy XML file:

[root@host ~]# hponcfg -f fulladmin.xml
HP Lights-Out Online Configuration utility
Version 4.1.0 Date 1/3/2013 (c) Hewlett-Packard Company, 2013
Firmware Revision = 1.13 Device type = iLO 4 Driver name = hpilo
Script succeeded
[root@host ~]#

The "stupid" user now has full rights.

Post a Comment               

Fri 29th Mar 2013 @ 21:41 2013: Shell Scripting Tutorial on Kindle

Shell Scripting TutorialNow available on Kindle

For USA, click here:
For the UK, click here:

Similarly, you can search for “B00C2EGNSA” on any Amazon site, or just go to (where “COUNTRY” is .fr, .de, etc) for your local equivalent.

Post a Comment               

Fri 18th Jan 2013 @ 16:13 2013: Pirate Cinema

I'm reading Pirate Cinema at the moment, a Cory Doctorow novel aimed at young adults, with the thinly-veiled ulterior motive of discussing concepts of piracy, copyright and intellectual property with young people.

A great couple of paragraphs on page 130. The central character, a 16 year old lad from Bradford, has had his internet cut off for downloading and remixing old movies. As a result (in the near-future world in which this is set), his sister can't study, his mother can't claim invalidity benefit, and his father can't perform his job. He is thinking about anti-piracy propaganda:

We'd just laugh at these - the ancient, exquisitely preserved rock star we saw getting out of a limo crying poverty; the workers who claimed that we were taking food out of their kids' mouths by remixing videos or sharing music, when every kid I knew spent every penny he could find on music as well as downloading more for free.

But now I tried to imagine the men who bought and sold MPs like they were pop songs, who put laws into production like they were summer blockbusters, and got to specify exactly what they'd like the statute book to say about the people they didn't like. I realized that somewhere out there, there were gleaming office towers filled with posh, well-padded execs who went around in limos and black cabs, who lived in big houses and whose kids had all the money in the world, and these men had decided to ruin my family for the sake of a few extra pennies.

I just wanted to make a note of this, it conveys the divide between the "haves" and the "have-nots" very succinctly, and how a slight improvement in the way of life of the 1% can come at a very high price for the 99%.

Post a Comment               

Thu 27th Dec 2012 @ 18:42 2012: UEFI, Windows 8 and HP Laptops

I'm not even sure who this rant is aimed at - HP seem the most likely target, possibly Microsoft for their UEFI-based "Secure Boot" policy, and finally and most likely, UEFI itself for being bloody awkward.

I suspect that HP is the real problem here, though.

I bought a laptop on the high street, preinstalled with Windows 8. The plan was to install Debian GNU/Linux alongside the original Windows 8 install, for many reasons:
- Any problems in Debian could be compared against the "kosher" Windows install on the same hardware
- This is a decent-spec PC, so any Windows-only software that required a good spec could also be run on this PC
- I have paid for this OS, so I should be able to use it
- Warranty requires *this install* of Windows (even a reinstall of Windows would not be valid, apparently)

However, I have spent two evenings trying to get this setup working properly, and have been unable to make it work satisfactorily. The only way to boot Debian seems to be to press "F9" repeatedly before the UEFI kicks in, then choose "Notebook Hard Drive" (the 3rd of 4 options, and no, it's not a notebook), and finally see the Debian GRUB menu.

I do not have the time or inclination to detail this HP laptop's BIOS settings in full, other than to say that it will apparently ignore its settings, UEFI rules over all, and the "OS Boot Manager" rules over UEFI.

I have given up, and am currently installing Debian GNU/Linux on the entire hard disk, losing Windows, losing my warranty, and losing a point of reference to compare the OS's performance.

Yes, I'm sure that a proper dual-boot setup is possible even on this hardware, but I do not have the time to work it out. This really does feel like an attack on general-purpose computing, whereby a user is able to purchase a piece of hardware and be able to control what that machine does.

Post a Comment               

Steve's urandom blog
Share on Twitter Share on Facebook Share on LinkedIn Share on Share on StumbleUpon
My Shell Scripting Book:
    Shell Scripting, Expert Recipes for Linux, Bash and more
is available online and from all good booksellers: