Thursday, August 31, 2006

Blogger Beta

When I logged into Blogger this morning they offered me the option of migrating to the new Blogger Beta and so I accepted. So far everything seems ok although my old template (Rounders 4) was very slighly broken (image didn't fill the header) so I have switched to a new minimalist theme. Everything else should be pretty much the same.

Tuesday, August 22, 2006

jmap and heap dumps on 1.4.2

At work we have what might be a memory leak on our production server (it is running the Sun JDK 1.4.2 Update 12 on a Linux server), now it seemed that we might be able to use jmap which has been backported to 1.4.2 to get a heap dump. When I tried this on my desktop I kept getting the error: buckett@oucs-matthewb:~ $ jmap Exception in thread "main" java.lang.NoClassDefFoundError: sun/jvm/hotspot/tools/JMap Now initially I though that I had a problem with JAVA_HOMEs and PATHs. But it turns out that Sun only backported jmap for Solaris (Windows is no luckier), but continue to ship everyone the binary just tempt them. The other option is -Xrunhprof but as we didn't start the JVM orginally with this option there doesn't seem to be a way to get a heap dump without restarting the service. gcore could give us a 1.5Gb core file for the process but there doesn't seem to be a nice way to process this under 1.4. Maybe it is time to switch to 1.5?

xserver-xorg-core upgrade broken

This morning I installed a new version of xserver-xorg-core on my Ubuntu desktop and so did my colleage Alexis, he then restarted his computer only to find that X11 (the Windowing System) would not start and was giving an error of: (EE) No devices detected. Fatal server error: no screens found There is a bug report in the Ubuntu bug database about this: The easiest way to fix this is to download the previous version of the package and install it. The packages are in and I have a tinyurl to the i386 binary, version 1.0.2-0ubuntu10.1 as 1.0.2-0ubuntu10.3 is broken. Here is how to downgrade, the stuff I type is in bold: Ubuntu 6.06.1 LTS oucs-matthewb tty1 oucs-matthewb login: buckett Password: Last login: Tue Aug 22 10:00:09 2006 on pts/0 Linux oucs-matthewb 2.6.15-26-686 #1 SMP PREEMPT Thu Aug 3 03:13:28 UTC 2006 i686 GNU/Linux The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. No mail. 1 failure since last login. Last was Tue 22 Aug 2006 10:01:12 BST on pts/0. buckett@oucs-matthewb:~ $ cd /tmp buckett@oucs-matthewb:/tmp $ wget --10:01:34-- => `hshot' Resolving, Connecting to||:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: [following] --10:01:34-- => `xserver-xorg-core_1.0.2-0ubuntu10.1_i386.deb' Resolving Connecting to||:80... connected. HTTP request sent, awaiting response... 200 OK Length: 3,529,260 (3.4M) [application/x-debian-package] 100%[====================================>] 3,529,260 9.78M/s 10:01:34 (9.78 MB/s) - `xserver-xorg-core_1.0.2-0ubuntu10.1_i386.deb' saved [3529260/3529260] buckett@oucs-matthewb:/tmp $ sudo dpkg -i xserver-xorg-core_1.0.2-0ubuntu10.1_i386.deb dpkg - warning: downgrading xserver-xorg-core from 1.0.2-0ubuntu10.3 to 1.0.2-0ubuntu10.1. (Reading database ... 107659 files and directories currently installed.) Preparing to replace xserver-xorg-core 1:1.0.2-0ubuntu10.3 (using xserver-xorg-core_1.0.2-0ubuntu10.1_i386.deb) ... Unpacking replacement xserver-xorg-core ... Setting up xserver-xorg-core (1.0.2-0ubuntu10.1) ... Maybe this might help someone, you will continue to be prompted to upgrade to the broken version but hopefuly Ubuntu will soon produce a fixed version and you should be able to skip the broken version. The way to check what version you are uprgading to is to use the Update Manager (in Administration menu).

Monday, August 07, 2006

Speedtouch and NAT Loopback

My Speedtouch 780WL has an option called NAT Loopback that allows you to access the external IP address from inside your home network. This is useful because if you run a server inside your network you can use the same IP address (and so hostname) to address the server both at home and when you are outside. To enabled NAT Loopback login to the command line (through telnet) and enter: ip config natloopback=enabled saveall Then it should all work (maybe after a reboot). The only gotcha is that it doesn't seem to loopback ICMP packets so you won't be able to ping the external IP.

Friday, August 04, 2006

Permissions in a Tree

One of our users of WebLearn here at Oxford pointed out one of the current problems we have with the permission based model Bodington uses. If for example you have a course that contains a couple of pigeon holes (drop boxes). To allow students to use the pigeon holes you need to grant them upload rights. Now rather than granting the students upload rights to each pigeon hole it would be useful if you could just grant the permission once. The obvious solution is to have the pigeon holes inherit permissions from the containing course and then grant the permissions on the course. This way you only have to manage the permissions in one place which reduces the administration and chances of mistakes being make. The problem is that upload permissions in the course allow students to upload content to the course container which you probably don't want. This is what happens when you reuse permission in different tools for slightly different things. The ways around this are either to have a special permission for pigeon hole submission which doesn't mean anything in the course container or the have the idea of roles and a student role means diffrent things in different locations. As for which solution we will move towards I'm not sure.

Tuesday, August 01, 2006

Gem of CSS

I found this little gem of a CSS definition the other day: .red{ color:red; } which just made me shudder. At least the formatting is good.

Reloading How To Re-read is a nice short post on how to re-read a log4j properties file. On our java project we were calling PropertyConfigurator.configure(filename); but never calling LogManager.resetConfiguration(); which meant if you removed a logging property from the configuration and reloaded it it carried on logging. It is a shame that the log4j APIs are so badly documented. LogManager being an example.