Jan 17
Free Software I've had a Logitech QuickCam Pro 9000 for some time now, and it works well, but I did have one bizarre problem with it when I used it with my main desktop machine (running Debian (Sid)). Namely, that if I had the camera plugged in (usb) at boot time the sound on the computer did not work, if you plugged it in after boot, everything was fine.

This was pretty irritating because if I forgot I would often have dozens of windows open and ready for work before I realised.

Normally this happens because the cards are loaded in the wrong sequence by udev. But, if you listed the sound cards with

cat /proc/asound/cards
 
the main card wasn't just in the wrong order, it simply wasn't there. I tried comparing modules loaded with and without the camera (at boot) and manually loading the differences, but this did not help. I tried forcing the index to be zero on the correct card, but this also did not help.

In the end, I made the following edit to /etc/modprobe.d/alsa-base.conf

# Keep USB (webcam from being loaded as first card)
options snd_usb_audio index=-2
 
and this did the trick. So if like me you were searching for the answer to this, I hope it helps.

Posted by Colin Turner

Defined tags for this entry: ,
Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at del.icio.us Digg Boot time sound problems with QuickCam Pro 9000 webcam Mixx Boot time sound problems with QuickCam Pro 9000 webcam Bloglines Boot time sound problems with QuickCam Pro 9000 webcam Technorati Boot time sound problems with QuickCam Pro 9000 webcam Fark this: Boot time sound problems with QuickCam Pro 9000 webcam Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at YahooMyWeb Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at Furl.net Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at reddit.com Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at blinklist.com Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at Spurl.net Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at NewsVine Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at Simpy.com Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at blogmarks Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  with wists Bookmark Boot time sound problems with QuickCam Pro 9000 webcam  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Dec 31
Free Software I use client side virtual folders a bit for my mail. Specifically, I tag messages with IMAP flags like todo and important, and then in Icedove / Thunderbird, I set up a special folder as a saved search which shows message that are either unseen, or marked todo in my inbox. It works rather well, and I use the same set-up on my laptop, and work and home desktop machines.

But it's not very useful on my phone, which doesn't allow such sophisticated client side behaviour. My phone mail applications shows the most recent 25 messages in a folder, but there are times when it would be really useful to look up messages that are labeled as important but rather old. It would be time consuming to look through the older messages, and difficult to find the one I want anyway.

As a result, I've been looking at the possibility of using virtual server side folders using dovecot on my Debian mail server. I was put off by the documentation which left a lot of questions unanswered.

Here's how I did it on Debian. First of all edit the config file /etc/dovecot/dovecot.conf, back up this file first, so you can restore working behaviour if something goes wrong.

#
# You have to add the default namespace
# which is normally NOT added explicitly before
#
namespace private {
  prefix =
  separator = /
  # the next line is very specific to where you keep your mail
  location = mbox:~/Mail/:INBOX=/var/mail/%u
  list = yes
  inbox = yes
  subscriptions = yes
  hidden = no
}

#
# Then add the virtual namespace
#
namespace private {
    prefix = virtual/
    separator = /
    # pick where the virtual folders will be
    location = virtual:~/Mail/virtual
    list = yes
    inbox = no
    subscriptions = yes
    hidden = no
}
 


You must also add the virtual folder plugin.

##
## IMAP specific settings
##

protocol imap {

  # ... you need to enable the plugin
  mail_plugins = virtual
 


Now restart dovecot and check your normal folders are working.

/etc/init.d/dovecot restart
 
Note that I found dovecot will generally not serve physical folders correctly if the virtual mail folder (even if empty) does not exist. I consider this a bug, but one that needs to be worked around, at least for me.

If that's all done and working you can begin to create virtual folders. I created two directories within my ~/Mail/virtual folders; which were inbox-todo and inbox-important respectively. Inside each I put the following files.


# ~/Mail/virtual/inbox-todo/dovecot-virtual
INBOX
  OR (OR (OR KEYWORD $TODO KEYWORD todo) KEYWORD $label4) unseen
 
which shows all unseen and mail labelled todo in my inbox and

# ~/Mail/virtual/inbox-important/dovecot-virtual
INBOX
  OR (OR KEYWORD $IMPORTANT KEYWORD important) KEYWORD $label1
 
which shows only important mail in my inbox.

It seems to be working, my normal folders appear to be working perfectly correctly (but I'll know better in a couple more hours/days); my phone has successfully subscribed to the two virtual folders, though the folder list shows a number of files which I'm certain it should not, again, this looks like a dovecot bug to be honest.

Posted by Colin Turner

Defined tags for this entry: , , ,
Bookmark Virtual folders with Dovecot and Debian  at del.icio.us Digg Virtual folders with Dovecot and Debian Mixx Virtual folders with Dovecot and Debian Bloglines Virtual folders with Dovecot and Debian Technorati Virtual folders with Dovecot and Debian Fark this: Virtual folders with Dovecot and Debian Bookmark Virtual folders with Dovecot and Debian  at YahooMyWeb Bookmark Virtual folders with Dovecot and Debian  at Furl.net Bookmark Virtual folders with Dovecot and Debian  at reddit.com Bookmark Virtual folders with Dovecot and Debian  at blinklist.com Bookmark Virtual folders with Dovecot and Debian  at Spurl.net Bookmark Virtual folders with Dovecot and Debian  at NewsVine Bookmark Virtual folders with Dovecot and Debian  at Simpy.com Bookmark Virtual folders with Dovecot and Debian  at blogmarks Bookmark Virtual folders with Dovecot and Debian  with wists Bookmark Virtual folders with Dovecot and Debian  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Dec 15
Free Software hardware I've had my Google development phone, the g1, for some time now. I haven't had the luxury of time to write anything for it, but I mainly wanted it to try out Android anyway. I've reviewed the phone before, and again after some canonical firmware upgrades.

I use the truly excellent K9 application for mail, it has good support for self signed certificates, now has IMAP push support and is generally excellent. However, it stores all the mail on the shockingly limited internal memory on the device. That, and upgrades to things like Google Maps, adding truly excellent new functionality, left me constantly looking for applications to remove.

This is why in the end I decided to try Cyanogen's ROMs. Since I have a development phone, I didn't need to root it, and just followed the relevant instructions (in truth, I couldn't be bothered to downgrade the OS to root it first).

Here are some observations about the new ROM:

  • Apps2sd is amazing.
    I have the whole pleasure of trying different apps all over again, without sweating about every byte. I don't have to worry about how much data is in my contacts (whether I assign them icons), my emails, and so on. I have plenty of room. I was delighted to be able to install DocumentsToGo. Which makes the phone much more useful for work emails. Loads of great apps I had to remove have been reinstated, and I can play with others, like the awesome Google Googles.
  • Extra workspaces
    There are five workspaces, making for more widget playroom. I now have a calendar app taking up a whole workspace with the events to come. Excellent.
  • It fixes several problems I had with MMS functionality.
    • It fakes a variety of user agents, meaning that a test video message I sent myself on o2 finally worked, for the first time ever.
    • The stock ROM allows you to prevent data access when roaming, which is good. But it also doesn't fetch MMS when roaming, which is (for me) a nuisance, and these are usually on a different tariff system. So when you receive an MMS on roaming, you end up enabling all data access to quickly receive the MMS, and then turn it off again. The Cyanogen ROM has an option to retrieve MMS on roaming.
  • UI feels snappier
  • USB tethering
    can be enabled, which JustWorks (TM) with Debian. Excellent.
On the downside, I have had some reset problems, but admittedly I have sometimes been pushing the phone very hard indeed to test it. And the battery life on the g1 is still awful. I know Noodles has solved the problem by not actually using his phone :-), but I want to use mine.

Another minor problem I encountered some weeks ago was the accelerometer suddenly starting serious misreporting on one axis. This problem seems to be becoming less severe, but even reinstalling the stock and then cyanogen ROM did not fix it. However, note I did not wipe the user data.

Cyanogen has made my phone fun to have again. And I will still replace it when a new Android handset comes out that I really like, but a lot of the urgency has gone. I'll certainly buy him a beer for Christmas.

Posted by Colin Turner

Defined tags for this entry: , , , , , ,
Bookmark Cyanogen Android ROM on the g1  at del.icio.us Digg Cyanogen Android ROM on the g1 Mixx Cyanogen Android ROM on the g1 Bloglines Cyanogen Android ROM on the g1 Technorati Cyanogen Android ROM on the g1 Fark this: Cyanogen Android ROM on the g1 Bookmark Cyanogen Android ROM on the g1  at YahooMyWeb Bookmark Cyanogen Android ROM on the g1  at Furl.net Bookmark Cyanogen Android ROM on the g1  at reddit.com Bookmark Cyanogen Android ROM on the g1  at blinklist.com Bookmark Cyanogen Android ROM on the g1  at Spurl.net Bookmark Cyanogen Android ROM on the g1  at NewsVine Bookmark Cyanogen Android ROM on the g1  at Simpy.com Bookmark Cyanogen Android ROM on the g1  at blogmarks Bookmark Cyanogen Android ROM on the g1  with wists Bookmark Cyanogen Android ROM on the g1  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Aug 10
Free Software programming I'm considering changing the development environment we use to host our projects in work and I'm not alone. The reason why will become more clear further down. To be honest this article is partly to help me work out what my priorities for this are, and to appeal to the lazy web for any other suggestions.

So first of all, here are the things I'm looking for in this project.

These are essential:
  1. must be free software;
  2. must have flexible issue tracking with user defined fields;
  3. must be able to handle multiple projects;
  4. must be extremely transparent to non developer users;
  5. must support svn and git and graphical front ends to them;
  6. must support some kind of announcement system.
These are desireable:
  1. should integrate in some way to mailing lists;
  2. should support ad hoc tar bar downloads from scm;
  3. should be easy to search issues;
  4. should graphically depict progress on releases;
  5. should have documentation (wiki like) integration;
  6. should handles news and download areas;
  7. should be able to exchange data (like issues) on projects;
  8. should actively maintained;
  9. should automate most sysadmin activity, account creation etc.;
  10. should be packaged for Debian ideally.
The contenders thus far are:
  • Savane, which we are currently using;
  • Fusion Forge;
  • Redmine;
  • Trac.
Let's take these one at a time.

Savane

Savane currently supports all the essential features, with the exception of git support. Being a fork from the original SourceForge software it works in a similar way. A web front end (in PHP), with back end functionality (in Perl) that creates shell users and groups, interfaces with mailman and so on.

But there are some problems. First of all the official project seems to have ground to a complete halt. Fixes that were submitted by users are not applied, there seems to be no forward momentum whatsoever. This is a problem, the offical version needs patched (modestly) to run on PHP 5, and the code base is a mess, with a few pages still requiring register_globals to be on. Bad.

However, another fork was taken some time ago which addresses all these problems including git support, well actually, the code base is still probably in need or work, but most apps of a certain age have this problem. What I'd like to see in Savane is better graphical tools to monitor project progress, better documentation features and incidentally better Debian packaging, but I've signed up to the fork to work on the latter on the first instance (this looks like it will be quite a bit of work, it's non Debian policy compliant in many ways right now). The new fork is going to be forked again by the way, into a Python version. Could be interesting.

Fusion Forge

Previously known, or descended from GForge, Fusion Forge is another fork of the original SourceForge source code. It is well packaged for Debian (naturally, it runs Debian's own code hosting environment, Alioth) and well maintained. It has many of the features of Savane, which probably makes it puzzling why I didn't choose it in the first place. Well, there's one reason why, in my opinion the front pages of FusionForge are rather un-user friendly, I mean what the heck is "Code Snippets" doing there? They feel very aimed at developers, which is great... but I need a nice straightforward interface for less savvy users. Looking today, the navigation still feels it's just too developer centric, but as these sites double as developer sites and user sites (to acquire the software, report bugs and so on), that's not great. I really don't know yet whether Fusion Forge has better graphical tools than Savane.

In a conversation about this last week, Noodles suggested I should look at the ease with which the interface could be changed. A sensible suggestion I shall follow up.

Redmine

Written in Ruby on Rails and advocated by my work colleage Paul Vitty, Redmine is clean and elegant looking. It shows all the signs of benefiting from being a later generation project and has a plugin architecture that seems excellent too. It has easy clean wiki integration, graphical road maps and Gannt charts; and these things make a difference. I don't think it's as remotely scalable as the design of the first two systems, which isn't a huge problem for me, but I mention it in passing.

On the other hand, it seems to have little or no automated integration into the backend, user and group creation, mailing lists and so on. on the other hand it has a very rich set of plug ins, so it may already have such support or it may be possible to implement it.

Trac

Written in Python, Trac feels like Redmine lite, and that's in the wrong direction for me. It explicitly does not have multiple project support and that's a deal breaker for me.

I haven't come to a strong conclusion about this so far. I note John (whom I linked above) notes that Redmine is difficult to install and upgrade because of Ruby, this is a hassle I just don't need, but he also thinks it may be the best of the field. For me, it is probably more trouble free to migrate to the fork of Savane or to FusionForge. More thought needed, and your thoughts are most welcome!

Posted by Colin Turner

Defined tags for this entry: ,
Bookmark Choosing a development hosting solution  at del.icio.us Digg Choosing a development hosting solution Mixx Choosing a development hosting solution Bloglines Choosing a development hosting solution Technorati Choosing a development hosting solution Fark this: Choosing a development hosting solution Bookmark Choosing a development hosting solution  at YahooMyWeb Bookmark Choosing a development hosting solution  at Furl.net Bookmark Choosing a development hosting solution  at reddit.com Bookmark Choosing a development hosting solution  at blinklist.com Bookmark Choosing a development hosting solution  at Spurl.net Bookmark Choosing a development hosting solution  at NewsVine Bookmark Choosing a development hosting solution  at Simpy.com Bookmark Choosing a development hosting solution  at blogmarks Bookmark Choosing a development hosting solution  with wists Bookmark Choosing a development hosting solution  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Jul 25
Free Software STEM I hold Richard Feynman in huge regard. He was a fascinating human being, a Nobel laureate physicist, his research in physics was second to none. But he was also a legendary lecturer, in both the fields of physics, and perhaps surprisingly computer science. And even more, he was an exceptionally well rounded person, a gifted artist, an amateur safe cracker and more besides. I own a copy of his lectures on Physics, bought for me by my Mum who felt (probably correctly) that no-one else would buy an item that sounded so boring, though it was on my Amazon wish list. (Incidentally, I think some pages touch on issues like the paradox I presented on crashing cars, I haven't had the leisure to study this more closely).

Recently it was announced (and one of my students kindly wrote to tell me) that Bill Gates had bought up the rights to his lecturers and was making them available. I do praise Bill Gates for his philanthropy, and would have praised him for this, but regrettably, the lectures are only available with Silverlight, and so it's another of a long line of Trojan horses to ensure we buy into a new proprietary standard from Microsoft. A huge shame.

In my last, marathon article, I talked a little about models of reality. A point I didn't make is that we have trouble accepting that; no matter how much we dislike aspects of reality, they remain the same despite that. Feynman encapsulated this beautifully in this YouTube snippet of his QED lectures (which I had showed to my final year students). I have attempted a limited transcript below, but you should hear it in Feynman's excellent good humoured Brooklyn accent for full effect.
And then there's the ... kind of thing which you don't understand. Meaning "I don't believe it, it's crazy, it's the kind of thing I won't accept."

Eh. The other part well... this kind, I hope you'll come along with me and you'll have to accept it because it's the way nature works. If you want to know the way nature works, we looked at it, carefully, [...unsure of this bit...] that's the way it works.

You don't like it..., go somewhere else!

To another universe! Where the rules are simpler, philosophically more pleasing, more psychologically easy. I can't help it! OK! If I'm going to tell you honestly what the world looks like to the... human beings who have struggled as hard as they can to understand it, I can only tell you what it looks like.

And I cannot make it any simpler, I'm not going to do this, I'm not going to simplify it, and I'm not going to fake it. I'm not going to tell you it's something like a ball bearing inside a spring, it isn't.

So I'm going to tell you what it really is like, and if you don't like it, that's too bad.
If you'd like to hear more from this fascinating man, can I suggest more YouTube videos showing an old BBC interview with him:
  1. Part One
  2. Part Two
  3. Part Three
  4. Part Four
  5. Part Five
  6. Part Six

Posted by Colin Turner

Defined tags for this entry: , , , ,
Bookmark Richard Feynman Lectures  at del.icio.us Digg Richard Feynman Lectures Mixx Richard Feynman Lectures Bloglines Richard Feynman Lectures Technorati Richard Feynman Lectures Fark this: Richard Feynman Lectures Bookmark Richard Feynman Lectures  at YahooMyWeb Bookmark Richard Feynman Lectures  at Furl.net Bookmark Richard Feynman Lectures  at reddit.com Bookmark Richard Feynman Lectures  at blinklist.com Bookmark Richard Feynman Lectures  at Spurl.net Bookmark Richard Feynman Lectures  at NewsVine Bookmark Richard Feynman Lectures  at Simpy.com Bookmark Richard Feynman Lectures  at blogmarks Bookmark Richard Feynman Lectures  with wists Bookmark Richard Feynman Lectures  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Jun 29
Free Software I note that the controversy of Mono in Debian which reached fever pitch with the inclusion of Tomboy as part of the default Gnome applications rages on, and now RMS has entered the fray.

I respect Stallman a lot. I'm a fellow of FSFE. His positions are usually well thought and argued, though I can't say I agree with him on all of them, and I don't agree with this one.

On the issue of the plain usefulness of Mono apps; well some of them are just excellent. I use f-spot for managing my photo collection and have to say no other application I've used comes close. Tomboy is itself a considerable improvement on the almost useless sticky notes applet that's been in Gnome for some time; though I've yet to work out what minimum I need for ssh synchronization (to be fair, I've hardly tried).

And I should declare an interest. I thought Gnome-Do was absolutely excellent when I stumbled upon it, and I helped in a modest way to initially package it for Debian (specifically I updated the Ubuntu stuff for the plugins package and prepared that for its initial import to the archive), albeit I haven't worked on it since. It's fairly clear to me that implementing this in, for example, C++ looks like it could be a lot more work. I can't say I've studied it in total depth, but that was my feeling when working with the code.

Anyway, never mind all the issues of sheer practicality; Jo Shields of the Debian Mono team, wrote an excellent rebuttal to some of the nonsense that was posted about Mono. It makes excellent reading. It is calmly delivered (with an undertone of quite justified and controlled anger), carefully argued and a cautionary tale about some of the nonsense we in the Free Software community can get wrapped up in, it's value extends well beyond the current debacle.

Posted by Colin Turner

Defined tags for this entry: , ,
Bookmark Mono in Debian  at del.icio.us Digg Mono in Debian Mixx Mono in Debian Bloglines Mono in Debian Technorati Mono in Debian Fark this: Mono in Debian Bookmark Mono in Debian  at YahooMyWeb Bookmark Mono in Debian  at Furl.net Bookmark Mono in Debian  at reddit.com Bookmark Mono in Debian  at blinklist.com Bookmark Mono in Debian  at Spurl.net Bookmark Mono in Debian  at NewsVine Bookmark Mono in Debian  at Simpy.com Bookmark Mono in Debian  at blogmarks Bookmark Mono in Debian  with wists Bookmark Mono in Debian  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Apr 22
Free Software I am not a fan of Microsoft Windows, most people who know me appreciate this to be a slight understatement. But I've used Microsoft's products. Like many people I've often had no choice. I actually use Microsoft trackballs. It's quite an irony that the best thing I can say about the world's largest software company that some of their hardware is good.

There's a tendency for people to believe I have no basis for this dislike, or that it is just kind of fashionable. But actually, I've used lots of operating systems over my time, and I've got good, solid reasons to dislike it. Here are just two.

  1. Their software is ... crap;
  2. Their conduct in the market place is just disgraceful.
So let's explore these a little more. The week before last, I was forced to use Windows (I know). So often, when one buys a consumer device (in this case a satnav system), it is will nigh impossible to update or maintain it without it. I had a huge download and install to do, and left it running overnight, safe in the knowledge that in the morning it would all be over and I could revert to Debian, my current OS of choice.

Of course not, I woke up in the middle of the night to find the box (laptop, I mean Vista came installed with no other choice, you don't think I wanted it did you?) had shut itself down due to inactivity, even when it was plainly on mains, and busy. Wearily I started it all over again, the download manager failed to resume and started from scratch. In the morning I found the laptop at a Debian prompt. Nice, but unexpected. Yes, Windows had helpfully, and without my consent restarted itself half way through the download to install updates. I note people wrestling with these stupid prompts doing presentations all the time. So more hours later I finally download the software, installing it is, quite simple, a nightmare. The task manager shows the box is waiting for consent, but there is no visible window. I have to wrestle with the whole thing for some hours. In a way, it's a good thing. It reminds me that I actually find this OS not just unethical, but just plain brain dead and ineffective.

But on the topic of ethics, I frequently lecture on these issues and list some of Microsoft's past misdemeanors. It often comes as a surprise to my students that these are often proven court findings, not just vague soapbox opinions. So for that reason, this report from ECIS, the European Committee for Interoperable Systems, is an excellent document. Well researched and referenced, it makes the long and consistent pattern of disgraceful behaviour in the market place very clear. It's a very readable report, but for the impatient, this Groklaw summary is very helpful.

On the one hand, these two reasons look very distinct, but on the other, they are actually inextricably linked. Microsoft's monopoly position, gained through some skill, and much luck, and bolstered by their persistent behaviour issues, is exactly why their products are so crap. Put simply, Microsoft is lazy; it is only in the presence of strong competition that they raise their game. Just look at the changes in Internet Explorer since Mozilla Firefox entered on the scene.

Yeah, for many of you, none of this is any surprise, but sometimes it's useful to remind myself, and everyone else, that the position I have on Microsoft is based on experience and fact.

Posted by Colin Turner

Defined tags for this entry:
Bookmark Note to self: Why I dislike Windows  at del.icio.us Digg Note to self: Why I dislike Windows Mixx Note to self: Why I dislike Windows Bloglines Note to self: Why I dislike Windows Technorati Note to self: Why I dislike Windows Fark this: Note to self: Why I dislike Windows Bookmark Note to self: Why I dislike Windows  at YahooMyWeb Bookmark Note to self: Why I dislike Windows  at Furl.net Bookmark Note to self: Why I dislike Windows  at reddit.com Bookmark Note to self: Why I dislike Windows  at blinklist.com Bookmark Note to self: Why I dislike Windows  at Spurl.net Bookmark Note to self: Why I dislike Windows  at NewsVine Bookmark Note to self: Why I dislike Windows  at Simpy.com Bookmark Note to self: Why I dislike Windows  at blogmarks Bookmark Note to self: Why I dislike Windows  with wists Bookmark Note to self: Why I dislike Windows  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!
Mar 12
Free Software Munin is a great, really useful project for monitoring all sorts of things on servers over short and long term periods, and can help identify and even warn of undue server loads. It is also appropriately and poetically named for one of Odinn's crows (so I suppose I should have written this on a Wednesday).

We've been running Munin on one of our production servers at work for quite some time, and it gives us a lot of confidence that, to say the least, the server is running in its comfort zone around the clock. Among other bits and pieces, we run OPUS and the PDSystem on this box, two of our home grown projects that are available to the students. For some time now I've considered writing a plugin for OPUS to show logged in users, and I finally did this, albeit the counts are not nearly so reliable as I'd like for two reasons, but I'll probably discuss that in another post. Anyway, I arranged for OPUS to drop a simple text file which simply contains counts of online users with the syntax

student: 10
admin: 2
 
and so on, for each of the categories of users. Then I needed a plugin to deal with this. I decided to write it simple shell script, since its portable and I'm not much of a perl fan.

#!/bin/sh

#
# Munin plugin for OPUS showing online users
# Copyright Colin Turner
# GPL V2+
#

# Munin plugins, at their simplest, are run either with "config" or
# no parameters (I plan to add auto configuration later).
case $1 in
  config)
  # In config mode, we spout out details of the graphs we will have
  # I want one graph, with lots of stacked values. The first one is
  # an AREA, and the others are stacked above them. I also (-l 0)
  # make sure the graph shows everything down to zero.
        cat <<'EOM'
graph_title OPUS online users
graph_args -l 0
graph_vlabel online users
graph_info The number of online users on OPUS is shown.
student.label student
student.min 0
student.draw AREA
staff.label academic
staff.min 0
staff.draw STACK
company.label hr staff
company.min 0
company.draw STACK
supervisor.label supervisor
supervisor.min 0
supervisor.draw STACK
admin.label admin
admin.min 0
admin.draw STACK
root.label root
root.min 0
root.draw STACK
application.label application
application.min 0
application.draw STACK
EOM
        exit 0;;
esac

# Now the plugin is being run for data. Bail if the file is unavailable
if [ ! -r /var/lib/opus/online_users ] ; then
     echo Cannot read /var/lib/opus/online_users >&2
     exit -1
fi

# Otherwise, a quick sed converts the default format to what Munin needs
cat /var/lib/opus/online_users | sed -e "s/:/.value/"
 
The plugin has now been running for several days, and you can see its output here. There are problems with it, but that's more to do with PHP, Debian and user choice, and I'll comment on that another time. However, already it gives me a useful feel for a lot of user behaviour.

Writing Munin plugins is easy, and Munin does so much of the hard work of turning your creation into something useful.

Posted by Colin Turner

Defined tags for this entry: , , ,
Bookmark My first Munin plugin  at del.icio.us Digg My first Munin plugin Mixx My first Munin plugin Bloglines My first Munin plugin Technorati My first Munin plugin Fark this: My first Munin plugin Bookmark My first Munin plugin  at YahooMyWeb Bookmark My first Munin plugin  at Furl.net Bookmark My first Munin plugin  at reddit.com Bookmark My first Munin plugin  at blinklist.com Bookmark My first Munin plugin  at Spurl.net Bookmark My first Munin plugin  at NewsVine Bookmark My first Munin plugin  at Simpy.com Bookmark My first Munin plugin  at blogmarks Bookmark My first Munin plugin  with wists Bookmark My first Munin plugin  at Ma.gnolia.com wong it! Bookmark using any bookmark manager! Stumble It!

(Page 1 of 3, totaling 18 entries)