Search Results: "mt"

12 August 2007

Martin-Éric Racine: Telling Network Manager to prefer home AP?

I'm running Network Manager on my Ubuntu laptop. It's a really neat tool when it comes to selecting an open wireless network when traveling, but it has one major flaw: you cannot tell it to prefer some "homebase" among a swarm of available Access Points; it insists upon using the first AP it finds, regardless. Has anyone figured out a solution to this common situation? Meanwhile, the OpenVPN front-end that Network Manager offers only covers a fraction of available parameters, which means that I cannot use it to connect to my dayjob's LAN from outside the company, because the few Windows clients we have connecting to it expect a VPN to work in a specific way and cannot adapt to non-Microsoft approaches to VPN concept, which means that we Ubuntu users are the ones who have to adapt. Thus, the OpenVPN front-end would need to be able to configure MTU, MSS and other arbitrary parameters supported by OpenVPN. Looking at various BTS, I notice that I'm not the only one who needs this. Are Network Manager developers listening? :-)

Dirk Eddelbuettel: The amazing Prof. Ripley (cont'ed)

A little mini-meme got started on August 1 when Ben Bolker posted the following code to the r-devel list (and here I substituted the more standard '-' assignment operator for the less standard though-now permitted '='):
x <- readLines("http://developer.r-project.org/R.svnlog.2007")
rx <- x[grep("^r",x)]
who <- gsub(" ","",sapply(strsplit(rx,"\\ "),"[",2))
twho <- table(who)
twho["ripley"]/sum(twho)
In five lines (that could be shortened to three at the expense of some readibility), the SVN log for R is downloaded directly from the website, the revision authors are extraced and then tabulated by submitter. The relative percentage of Brian Ripley is found to be a staggering 74.8% -- or about three times as much as the other fifteen committers combined. Smokes. [ Oh, and for those who don't know him, he's also got a day job which presumably entails looking after his graduate students at Oxford. Who knows, he may even teach. Kidding aside, he's actually one of the nicest persons you'll ever meet in real life. ] Now yesterday, Simon Jackman who had at first simply repeated Ben's analysis on his own blog followed up with a nice analysis (albeit typeset in a way that rendered the code inoperational, which has now been fixes) that creates both a histogram and a dotplot of commits per hour of the day. Omitting Ben's code which Simon reuses, we have the following for histogram and dotchart:
tod <- unlist(sapply(rx,function(x)strsplit(x,split=" ")[[1]][6]))
tod <- tod[who=="ripley"]
tz <- sub(pattern=".*(-[0-9] 4 ).*",replacement="\\1",x=rx)
tz <- tz[who=="ripley"]
tz <- as.numeric(tz)/100
offset <- 3600*tz
z <- strptime(tod,format="%H:%M:%S")
hist(z,"hours",main="Ripley Commit Times in SVN TZ")
h <- z - offset
h <- format(h,format="%H")
h <- factor(as.numeric(h), levels=0:23)
dotchart(table(h), main="Ripley Commit Times, By Hour in GMT",
         labels=paste(0:23,1:24,sep=":"))
This extracts the commit times, subsets to the ones by Prof. Ripley, extracts the timezones component (as strptime seemingly doesn't do that which is a pain), extracts the tz-less time via strptime into a variable 'z' for which the histogram is drawn. He then corrects the times by the tz offset expressed in seconds, formats is as hour of the day and turns it into a 'factor' (an R data type for qualitative variables which may be ordered as is the case here) and draws a dotplot. This results in the following chart: Simon Jackman's per-hour charts of Brian Ripley's commit patterns Now, nobody has looked at the time series. So we correct this and add the following:
## rather extract both  date and time
dat <- unlist(sapply(rx, function(x)  
  txt <- strsplit(x,split=" ")[[1]]
  paste(txt[5], txt[6])
 ))
## subset on Prof Ripley
dat <- dat[who == "ripley"]
## and convert to POSIXct, correcting by tz as well
datpt <- as.POSIXct(strptime(dat,format="%Y-%m-%d %H:%M:%S")) - offset
## turn into zoo -- we use a constant series of ones as each
## committ is taken as a timestamped event
datzoo <- zoo(1, order.by=datpt)
## and use zoo to aggregate into commits per date
daily <- aggregate(datzoo, as.Date(index(datzoo)), sum)
## now plot as grey bars
plot(daily, col='darkgrey', type='h', lwd=2,
     ylab="Nb of SVN commits, three-week median",
     xlab="R release dates 2.5.0 and 2.5.1 shown in orange",
     main="The amazing Prof. Ripley")
## mark the two R releases of 2007
abline(v=c(as.Date("2007-04-24"),as.Date("2007-06-28")),col='orange',lwd=1.5)
## and do a quick centered rolling median
lines(rollmedian(daily, 21, align="center"), lwd=3)
This extracts both date and time, creates a proper R time object (a so-called POSIXct type) from it, fills a zoo ('the' magic class for time series) object with it, uses zoo to aggregate commits per day and plots those in a barchart-alike (I know, I know, ...) plot to which we add the two releases as well as a rolling and centered three-week median (as a real quick hack rather than a proper smooth). Timeseries of Brian Ripley's commit patterns This shows that Prof Ripley averaged about ten commits a day before and after the release of R 2.5.0, and that he has slowed down ever so slightly since then to end up at around a mere seven commits a day. Every day. For the seven-plus months we looked at. So, anyone for analysing his r-help posting frequencies ?

11 August 2007

Alastair McKinstry: Planet 9 from Outer Space

While investigating planet formation (to justify support complement a PhD proposal on ocean planets), I found this discussion over at physicsforums following a blog entry by Dr Steinn Sigursson. (He uses Planet X in his posts but that is too frequently linked with the dwarf planet Xena Eris, and besides, Pluto has been demoted, so its Planet 9 we're looking for :-( ). The question is, how was our solar system created ?
"Looks like the outer solar system, with late heavy bombardment, would have come together nicely if there was another Neptune out there to begin with."
Basically, it appears as though there is a planet or substellar companion star out in the Oort cloud. This is not likely to be the Nemesis object of Hut's/Muller's theory, but would have been responsible for the Kuiper belt. Most of the discussion is about brown dwarfs, but following links leads to a paper by Gomes et al., simulating the possibility of outer Neptunes or Jupiters at 4000 AU or 5000 AU. The thread is all about the dynamics of such bodies, but what would they look like? Now, Hydrogen freezes solid at 14K, Helium is liquid at 4K. So we're talking about a liquid helium ocean on top, with no atmosphere worth speaking of. But Could it sustain life? Not as impossible as it seems. Ehrenreich and Cassan point out that an Ice Giant could host a liquid layer underneath an ice shell surface, heated by radiogenic energy, that could last for billions of years before freezing. So where would it be? This is the time to submit a grant proposal for more envelopes ... Tags , , , ,

7 August 2007

Neil Williams: translation support script

Just a little script that I've found useful when working out which packages contain translations needing an update - WITHOUT regenerating the POT file unnecessarily and thereby messing up CVS/SVN/RCS status of the PO files themselves. (You still need to regenerate the POT file when the strings actually change but this script is useful when receiving updated PO files.) The script checks each PO file and omits those that are up to date.

Add your own set of working directories.


#!/usr/bin/perl -w
use strict;

print "emdebian-tools\n";
chdir "/opt/working/emdebian/svn/current/host/trunk/emdebian-tools/trunk/debian/";
&check
print "deb-gview\n";
chdir "/opt/working/deb-gview/";
&check
print "pilot-qof\n";
chdir "/opt/working/pilot-qof/";
&check

sub check

opendir (PO, "po") or die ("Cannot open po directory. $!\n");
my @files = grep(/\.po$/, readdir PO);
closedir (PO);
foreach my $po (@files)

my $msg= msgfmt -c --statistics po/$po 2>&1 grep "[fuzy]" ;
print "$po: $msg" if ($msg ne "");
undef($msg);

unlink ("messages.mo");


6 August 2007

Martin F. Krafft: Sending email via IMAP (or not?)

I am playing with the thought of using IMAP to send email from my mobile clients. The way this works is that mail is actually placed into a Maildir locally and synchronised with the IMAP server using a tool such as offlineimap. The Courier IMAP server supports such an outbox feature, for other servers you can use inotify or a cron job (I am planning to publish a writeup about my new mail setup sometime soon, so no scripts linked here yet). Anyway, it's trivial to get it working, and Dann Frazier has written it all up. The question is more whether I want to, or not. I am soliciting feedback. The advantages of using an IMAP-synchronised outbox are: Any solution with advantages comes with disadvantages, and these are: Can you think of any other advantages or disadvantages? Do you use an IMAP-synchronised outbox and would like to share your experiences with me? Or do you have yet another solution? Write to me! NP: OSI: Free

5 August 2007

Jose Carlos Garcia Sogo: Preparing trip to Sicily

I have spent almost the whole day preparing my next trip to Sicily, in the first of my two week holidays. I have installed Italy maps in my TomTom Go 510 and I have been reading about the island. I was thinking on printing all the guide I was reading, or buying a paper one, but I think that I will put all that info in a PocketPC and get it from there. It is a pity that my TomTom doesn't have a browser or PDF reader, as it could serve well as a GPS with PDA options (even bluetooth to connect to mobile phones and internet), like there are some PDAs with GPS out there.

Miriam Ruiz: Recipe: Internationalizing a C program with gettext

gettext is the GNU internationalization (i18n) library, and it is one of the most important standards in Free Software about i18n of programs. Translators are used to it, and there are really lots of useful tools to work with gettext data, so I’d recommend anyone to avoid trying to invent their own yet-another-gettext-but-not-quite-as-the-real-one. Gettext also works for Windows, so no excuse. It’s really easier than it sounds. Here goes the quite recipe: Add this to the headers of the C module in which you have your main() function:
#ifdef USE_GETTEXT
#include "libintl.h"
#include "locale.h"
#define _(String) gettext (String)
#else
#define _(String) String
#endif
And add this at the beginning of your main() function:
#ifdef USE_GETTEXT
setlocale (LC_MESSAGES, "");
setlocale (LC_CTYPE, "");
setlocale (LC_COLLATE, "");
textdomain ("my-program");
bindtextdomain ("my-program", NULL);
#endif
That’s all for the initialization of gettext, lets go now with its usage from the rest of the modules. In each of them, you’d have to add this to the headers:
#ifdef USE_GETTEXT
#include "libintl.h"
#define _(String) gettext (String)
#else
#define _(String) String
#endif
After all that stuff, you should be able to i18n for whichever texts you want, just write _(”whatever”) instead of whatever:
printf(_("whatever");
Don’t forget to compile your program with -DUSE_GETTEXT if you use the same #defines as I do, or at least to #define USE_GETTEXT somewhere. Now, lets go to the second part, generating the .pot templates, and installing the .mo translation modules in your system:
xgettext -k_ -o my-program.pot *.c *.h --from-code=iso-8859-1
If you prefer, you can create different .pot files for the different parts of your programs instead a really big one to help translators, and then joining all the .po files inside a single one before converting it to .mo with msgcat:
msgcat -o my-program.es.po my-program.part1.es.po my-program.part2.po my-program.part3.es.po
To compile the .po files into .mo, just do:
msgfmt my-program.es.po -o my-program.es.mo
Then, don’t forget to install it in the proper directory of your system:
cp my-program.es.mo /usr/share/locale/es/LC_MESSAGES/my-program.mo
Of course, you can tell your program to look for the .mo file in a different directory, even a relative one, instead. Just read the man pages, this is only a quick recipe on how to do it :) Note: Please, use #include [smaller than]whatever.h[bigger than] instead of #include “whatever.h”, as I have put in my examples. My WordPress weblog seems to be having problems with the those symbols. That’s the magic of HTML.

4 August 2007

Marc 'Zugschlus' Haber: Mobile Internet is affordable in Germany

Last thursday and friday, I spent around eleven hours in the InterCity Express (ICE) of Deutsche Bahn. I was online, using Simyo GPRS, during this entire time. Thanks to the cellular network repeaters in ICE’s coach 3 and 23, this has worked reasonably well and has cost me EUR 5,27 - in a tariff with no basic charge and no commitment. I really like that, because this usage of the mobile cellular network would have cost about fifty times more just a year ago. Thanks, Simyo, E Plus and the other E Plus resellers who have made the first step to reducing the cost of mobile Internet in Germany. A few technical notes:

Matthew Garrett

Anyway, back to pure Linux stuff. A while ago, the Ubuntu Technical Board were asked to take a look at Automatix. I've finally got around to doing so, and here are my initial conclusions. I'd appreciate any factual corrections, and note that at this point this is my individual opinion rather than any sort of official statement.

Automatix is a combination system configuration/package installation
tool, aimed at making it easy for users to install features like
graphics drivers, media codecs and software not distributed as part of
the Ubuntu distribution. It is provided as a .deb file containing a
python GUI frontend that calls out to a shell backend. The frontend
parses an XML file which contains module descriptions and function
names for installing and uninstalling modules, with these functions
being part of the shell backend. An install module will typically
check whether another package manager is running, and if not either
install a set of debs or download and manually install a
tarball. Uninstall modules generally remove the same software or clean
up the manually installed files.

The following is a list of identified issues with the current version
of Automatix - it is the result of a few hours of investigation, so
may not be complete.
Conclusion:

Automatix exists to satisfy a genuine need, and further work should be
carried out to determine whether these user requirements can be
satisfied within the distribution as a whole. However, in its current
form Automatix is actively dangerous to systems - ranging from damage
to small items of user configuration, through removing user-installed
packages without adequate prompting or warning and up to the (small
but existing) potential to leave a system in an unbootable state.

The current design of Automatix precludes any reasonable way to fix
some of these problems. It is attempting to fulfil the role of a
high-level package manager without actually handling any sort of
dependency resolution itself.

A more reasonable method of integrating Automatix's functionality into
Ubuntu would be for the Automatix team to provide deb files to act as
installers for the software currently provided. These could then be
installed through the existing package manager interfaces. This would
solve many of the above problems while still providing the same level
of functionality.

In its current form Automatix is unsupportable, and a mechanism for
flagging bugs from machines with Automatix installed may provide a
valuable aid for determining whether issues are due to supported
distribution packages or third party software installers.

3 August 2007

Eddy Petri&#537;or: more news from the nslu2 front

The main reason for the lack of activity during this week was that I had some problems with my router, a NSLU2 running the debian arm port. This was the machine I wanted the softfloat rrdtool I was talking about in these 2 posts.

It turns out that for some weird reason the USB controller of the slug resets when there is too much traffic going on. I got lots and lots of messages like:


$ grep reset -A 1 /var/log/syslog grep -E '(reset repeated)'
Aug 3 07:02:27 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
...
Aug 3 11:50:29 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 11:51:03 ritter last message repeated 4 times
Aug 3 11:53:15 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 11:53:46 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 11:55:48 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 11:56:07 ritter last message repeated 2 times
Aug 3 11:56:52 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 11:56:57 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2



That wouldn't have been a problem as long as the damn thing worked, but in some cases after the reset the root filesystem was lost and all the services running on the machine died (except the networking itself since all of that is part of the kernel and is loaded in memory).

It took me about three evenings to get to this conclusion (imagine being locked out of a machine which advertised running ssh, http, and dns services, being able to telnet and getting a respons, but the full protocol failed).

It all became more clear when, while being connected via ssh I got his result:

eddy@ritter ~ $ ls
-bash: ls: command not found

"WHAT?" was the first reaction, then I figured that life without ls is unbearable and came up with this bit:

alias ls='for I in * ; do echo $I ; done'

Quite cool to understand a little bit about the system. Still, cat was unavailable so having /proc and /sys available did not help that much. At some point I was thinking about a busybox shell, tried that, it didn't work since it wanted to remove some important bits like the initramfs tools.


I googled again and found a good starting point for a discussion of the same problem someone else was having. I ended up trying all the proposed solutions: rmmod-ing ehci-hcd, blacklisting the module, regenerating a initrd image with the blacklisted module... None of these worked (individually) and I ended up having an even more unstable system when ehci was not present (I was loosing the root FS after aprox. 1 min after logging in remotely immediately after start). Restoring the image with ehci was a pain (not to mention the time spent trying to figure a way to revert the change safely, since bricking the machine was not out of the question - imagine loosing the FS while flashing the ram drive image).

I finally managed to revert the ehci enabled image and tried the workaround proposed in this gentoo BR. I tried 128 and now I am at 64 and I am still getting those resets; Still something good came out of this, I followed Michael Prokop's Use root=UUID on NSLU2 article and I think I have now a stable root file system just thanks to him.

Now I am stuck:


grep -E '(max_sect reset)' /var/log/syslog
Aug 3 07:02:27 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 08:27:38 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 08:38:43 ritter manual message: max_sectors was set to 128
Aug 3 08:55:25 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 09:31:47 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 09:54:11 ritter set_max_sectors: max_sectors was set to 128
Aug 3 10:09:32 ritter set_max_sectors: max_sectors was set to 128
Aug 3 10:15:27 ritter set_max_sectors: sda's max_sectors was set to 128
Aug 3 10:24:24 ritter set_max_sectors: sda's max_sectors was set to 128
Aug 3 10:38:12 ritter set_max_sectors: sda's max_sectors was set to 128
Aug 3 10:47:04 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 10:48:27 ritter set_max_sectors: sda's max_sectors was set to 64
Aug 3 11:04:36 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 11:06:16 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
....
Aug 3 15:05:58 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2

Should I try setting to 32?

In case you're wondering, I am doing the setting with this script:

#!/bin/sh

MAX_SECTORS=64
DISK=$(ls -l grep 'uuid.* / ' /etc/fstab awk ' print $1; ' sed 's#.*/\(.*\)$#\1#' tr -d '[0-9]')

[ -z "$DISK" ] && logger -t 'set_max_sectors' "error: could not detect root disk" && exit

echo "$MAX_SECTORS" > /sys/block/$DISK/device/max_sectors
logger -t 'set_max_sectors' "$ DISK 's max_sectors was set to $ MAX_SECTORS "

exit 0


Dear (not at all) lazy web, what can I do to fix/workaround this issue? Any help would be gratly appreciated (personal mail or comments).

Note: I am reluctant to try the fix proposed in the last comment that claims to fix the issue since compiling an arm kernel natively is a pain and I would like to have an official kernel from Debian Etch, as I do now.

Jan Wagner: Conditional greylisting (with postfix, policyd-weight and postgrey)

In case you think that greylisting might have some disadvantages but give you also some benefits, you probably have thought about to use greylisting with some conditions. For example if you checked some parameters of the mail and you (or better your mailsystem) guess it may be spam, greylisting could be very usefull.
Until now, I was using plain policyd-weight. But mails with $REJECTLEVEL <= score <= $DEFER_LEVEL where in some conditions defered (see policyd-weight default) and if they come back with the same conditions, they will be defered twice. So it makes sence to me to greylist them and if they return within $DEFER_LEVEL, they will pass cause the greylist will allow them.
At first let’s create a restriction class which we can call from policyd-weight within main.cf of postfix:

# restriction class for use with polw (DEFER_ACTION)
smtpd_restriction_classes = greylist
greylist = check_policy_service inet:127.0.0.1:60000 To call postgrey for $REJECTLEVEL <= score <= $DEFER_LEVEL you need to make use of the restriction class “greylist” and let $DEFER_STRING match all defer strings, to get them all greylisted:

# echo “\$DEFER_STRING = ‘NOT’;” >> /etc/policyd-weight.conf
# echo “\$DEFER_ACTION = ‘rc:greylist’;” >> /etc/policyd-weight.conf
# /etc/init.d/postgrey restart Also you may have a look into The DNSBL countries.nerd.dk. This might be a way to score connections comming from well known spamming countries. But keep in mind, that there may also legitim mails comming from those! ;) , , ,

2 August 2007

Russell Coker: Xen Saves

A couple of days ago the hardware that is used to host this blog was upgraded - doubling the amount of RAM in the machine. To do this the machine was halted, memtest86+ was run to ensure that the new RAM worked correctly, and then it was booted up again. During that process my ssh session was not stopped! I merely refrained from typing anything until the upgrade was complete. This is one feature I really like about Xen. It can save the memory image of a running domain to a file and then restart it later. TCP sessions remain open if timeouts have not elapsed. The command xm save can be used to save the state to a file and the command xm restore will restore it. In Debian the location of the save files is stored in the file /etc/default/xendomains with the variable name XENDOMAINS_SAVE and defaults to /var/lib/xen/save. A quick experiment with one test domain (running Debian/unstable in 128M of RAM and had just run apt-get dist-upgrade so the memory contents would not be all zeros) showed that gzip -9 would decrease the file to 35% of it’s size at a cost of just over 1 minute of CPU time on a Pentium-M 1.7GHz. But gzip -3 compresses it to 37% and only takes 9 seconds. 9 seconds of CPU time to save 80M of disk space seems a reasonable trade-off. In my particular case it saves CPU time as the encryption I use for my root filesystem takes more CPU time than gzip -3 so compressing the data saves time. But I don’t expect my case to be common. Now when Xen is used on a more modern machine with a faster CPU gzip -3 has the potential to save time as well as disk space. A machine with a CPU that is in aggregate 10x faster than my laptop (I think that means most 64bit multi-core CPUs) running with a single S-ATA disk (that will have a sustained contiguous read speed of 80MB/s and write speed that is less) will save time when saving multiple Xen DomU’s if it runs them in parallel and compresses them. Also gzip is not the fastest compression program. There may be other options that are better suited to the needs of Xen. I have filed a Debian bug 435406 requesting that compression be supported.

27 July 2007

Michael Prokop: Use root=UUID on NSLU2

As I wrote a few monce ago I’m owner of a NSLU2 device powered by Debian. Now I had to install another device (using di-nslu2-etch-4.0r0.bin - md5: db8e8ec3571aff8fb2132479f860f16b this time) and I wanted to change the setup from using /dev/sda2 to a UUID based one - to get a stable root device. Nothing really tricky (thanks to the existing documentation) but just as a reference (for myself and other users considering the switch as well) the relevant steps… First of all identify the root-device (/dev/sda2 in my case) and get its UUID:
# /lib/udev/vol_id -u /dev/sda2
a98ebb0f-84ae-4f7a-a070-b94ecee3f94a
Make sure initramfs-tools use the given UUID as ROOT-option:
# echo "ROOT=/dev/disk/by-uuid/a98ebb0f-84ae-4f7a-a070-b94ecee3f94a" > \
/etc/initramfs-tools/conf.d/root-device-hack
# update-initramfs -k all -u
Replace the /dev/sda2 line in your /etc/fstab with:
/dev/disk/by-uuid/a98ebb0f-84ae-4f7a-a070-b94ecee3f94a /               ext3    defaults,errors=remount-ro 0       1
Make a backup of the original mtdblock2 and install the one Martin Michlmayr thankfully provides:
# cat /dev/mtdblock* > mtdblock.backup
# cat /dev/mtdblock2 > mtdblock2.original
# wget http://www.cyrius.com/debian/nslu2/files/etch-modified-mtdblock2.bin
# md5sum etch-modified-mtdblock2.bin
e5154ceed8ad7de5bca83cc98fbb4d79  etch-modified-mtdblock2.bin
# cat etch-modified-mtdblock2.bin > /dev/mtdblock2
# apex-env printenv
... compare output with http://www.nslu2-linux.org/wiki/Debian/ChangeKernelCommandLine
Finally set the new kernel commandline:
apex-env setenv cmdline 'console=ttyS0,115200 rtc-x1205.probe=0,0x6f noirqdebug rootdelay=10 root=UUID=a98ebb0f-84ae-4f7a-a070-b94ecee3f94a'
That’s it. Now after rebooting your system should use the UUID-approach instead of /dev/sd*. Check via:
# cat /proc/cmdline
console=ttyS0,115200 rtc-x1205.probe=0,0x6f noirqdebug rootdelay=10 \
root=UUID=a98ebb0f-84ae-4f7a-a070-b94ecee3f94a
Ressources:

26 July 2007

John Goerzen: OSCon and Portland Photos

I've taken my camera around OSCon and Portland a bit. Here are a few photos that I've taken so far.

At OSCon Itself

(click here to see all)

img_3165

Overflow from breakfast. Most tables had powerestrips and laptops on them.

img_3204

Debian booth at the expo hall. And the only one with beanbags. Sign reads "The developer is in."

img_3166

Filing in for the keynotes. Everyone seemed to want a seat either at the very front or very back.

img_3177

Simon Peyton-Jones explaining how locks with traditional threading can be improved upon with transactional memory.

img_3202

Run for your life! The bell will attack at any moment!

I didn't hear it ring all week.

Around Portland

(click here to see all)

img_3127

The Japanese Gardens were beautiful and tranquil. Jacob actually feel asleep while being rolled around on his stroller.

img_3145

For some reason, this one reminds me of the Jedi Academy in one of the Star Wars video games.

img_3118

One of the many bridges in Portland.

img_3164

Terah's favorite find: Sweet Masterpiece Chocolate and Coffe.

We went there after the Blossoming Lotus Cafe, which was an interesting experience but not quite as good as I had hoped.

25 July 2007

John Goerzen: OSCon

Monday was the first day of the OSCon tutorials. The first question was: how to get there? OSCon is being held in the Oregon Convention Center, about half a mile from the conference "headquarters" hotel, the Portland DoubleTree at Lloyd Center.

MAX light rail is free in this area. It's about a block to the Lloyd Center station, and a block from the Convention Center station to the Convention Center. The trains run every few minutes and are very friendly to people that aren't from Portland. On-board announcements point out bus and rail connections in advance, and each station has a system map, city map, and digital display listing the time until the next arrival. Even bus and streetcar stations have that display.

In fact, everyone here is. The personnel at the Amtrak station were great. Our cab driver from the station to the hotel told us about all the things he loves about Portland and why he'll never move anywhere else. And the DoubleTree hotel has probably the friendliest hotel staff I've ever seen, even when we reported water dripping from the ceiling in our room. The concierge desk gladly showed Terah how to get to a nearby Safeway for groceries, and explained -- correctly -- to me how to use trains and buses to get to the Japenese Gardens in Washington Park.

Anyhow, back to OSCon. The first two days are tutorials. These are extended talks. You can go to 2 per day, one in the morning and one in the afternoon. I attended Advanced Vim Scripting and Linux Performance Monitoring. Neither was quite as advanced as I'd like, but I got useful information out of them both -- especially out of Linux Performance Monitoring. I finally learned the exact difference between buffers and cache and what the IOwait state in top really means, among other things. I heard from others in IRC that Simon Peyton-Jones was a fantastic speaker and his tutorial on Haskell met rave reviews. I'm looking forward to his keynote and talk on Wednesday.

I also went to the keysigning BoF in the evening. Signed a ton of keys, and met some interesting people. I met a couple of folks from an independent telephone company in Michigan that were interested in my Asterisk experience, and spoke to an Earthlink employee from Georgia that was involved on the ISP side of things.

In all, a good first day. This is a great conference in a great city, with lots of variety in its programming and lots of opportunity to network (the old-fashioned way).

The venue is also very nice, and aside from not being right next to the venue, so it the hotel.

The day's main mystery: everybody has noticed, and nobody has figured out why, the hotel elevators all stop on the 2nd floor on the way down, even if nobody requested it.

24 July 2007

John Goerzen: Trip to Oregon

Last week, Terah, Jacob, and I boarded a train in Kansas. We were bound for Los Angeles, then would go up the coast of California, eventually winding up in Portland for OSCON.

Our first train was the Southwest Chief out to LA.

img_2926

Jacob had a great time on the train. This is a picture of Jacob and Terah in our sleeping car room. Jacob slept in his carseat at night and played with us during the day. See all recent photos of Jacob.

We had the option to get off the train for a few minutes in La Junta, CO. I took some photos trackside.

img_2962

Here's Jacob enjoying the lounge car. There were dozens of Boy Scouts on our train, heading to the Boy Scout camp near Raton, NM. Many of them hung out in the lounge car, so Jacob had plenty to watch and keep him entertained.

img_2995

The lounge car has wrap-around windows. We got an expansive view of the Rockies on the first day of our trip, and of the California desert on the second. This route really gives you a feeling of being alone sometimes. There are times where you can look out the window, and as far as you can see, there is no evidence of people or civilization.

Here's a picture out the lounge car, looking at the train as it rounded a curve.

img_2977

The lounge car was in the middle of the train, so the train really was longer than it might appear here.

We had a bit of an adventure in Lamy, NM. Apparently a terminal cancer patient was riding the train, and died in the night. We were held up for about 2 hours for authorities to arrive, perform their investigation, etc.

While we were there, passengers could get off the train and look around. I took a few photos there.

img_3000

This is a photo looking towards the front of the Chief. It uses bi-level cars, so every car has an upstairs and a downstairs.

Just outside the Lamy station is an old dining car. It is now a stationary restaurant. The restaurant had closed just before we arrived, but they let me in to take a few quick photos anyway.

img_3007

Just past Albuquerque, one of the two locomotives on our train failed. That meant that, combined with the delay at Lamy, we were more than 3 hours late into Los Angeles. That, in turn, meant that we missed our connection to the Coast Starlight. So the new plan was to take a bus to Bakersfield, then the San Joaquin train to Sacramento, where we could catch up with the Coast Starlight and get to Portland as scheduled.

img_3038

Jacob really enjoyed the Bakersfield train station. I carried him up to the stone walls, which he enjoyed exploring with his hands.

img_3034

This is the Bakersfield station. It's a nice building. But their large metal sign reads "To trains and busses." Someday I will forget about them misspelling "buses" on a large metal sign.

I've got two more pictures of Jacob at Bakersfield that you'd enjoy: one, two. He sure was a popular baby. We got countless compliments from strangers, and he got even more smiles and greetings from people. Even when he was fussy, people kept saying what a good baby he was. We were a little surprised at that. A few people even found his cry to be cute and funny!

img_3051

One of the nice side-effects of missing our connection was seeing the grand old Sacramento train station. A beautifully-decorated building. We were there until about 12:30AM because the Coast Starlight had been delayed as well.

Terah saw a sign out the door saying "Quiznos: Now Open." I figured that meant that the store was open, not that the place was open late into the night, but she wanted to check. She stepped out and then back in again. "As soon as I got out, homeless people started yelling at me! Plus the store wasn't open," she reported.

img_3070

On the Coast Starlight, we discovered the absolutely stunning Pacific Parlour Car. These cars were originally built in the 1950s for the Santa Fe railroad, and have been renovated and restored by Amtrak for service on the Coast Starlight. That's the only train where they run, and they are available only to first-class passengers.

I noticed stairs going to the lower level of the Parlour, and was curious what was down there. So I went down to check it out, and it is a small (18 seats, I think) theater!

img_3087

We sat down there for awhile and talked to some of the other people.

The view from the Coast Starlight was amazing. The trip through the mountains was particularly nice. We saw mountains from the distance, up close, and at some points could look out our window directly down into a deep valley below. There were lakes, waterfalls, and little creeks all along.

img_3095

And finally, this is the grand Portland train station. Still an active station and a sight to see, though not as nice as Kansas City's.

So that's the trip to Portland. More to come on the convention and the city itself.

22 July 2007

Wouter Verhelst: Damn spammers

Since I spent quite some time thinking about my SMTP setup earlier today, I finally took the time to hack up a little perl script to parse my mainlog, pick out the IP addresses of hosts that appear to have been spamming me, put them in a database, and modified my exim4.conf to look them up and deny them access if I want to. Those lookups are pretty easy, really. In the first section of your exim4.conf, I have this:
hide pgsql_servers = (/var/run/postgresql/.s.PGSQL.5432)/*/spam/Debian-exim/
with '*' being the password. Except that this is ident authentication, so I don't need a password, but apparently exim still expects something (if I'm not on crack). Oh well. Then, in an acl, I have this:
  deny
    message = "Your IP was used for spamming over the last few days. Please stop the spamming, wait a few days, and try again."
    log_message = "denied access for $sender_host_address: in blacklist database"
    condition = $ lookup pgsql SELECT id FROM spammer WHERE       \
       adres='$sender_host_address' AND lastseen > now() - '10 \
       days'::interval true false 
(with the backslashed lines being one line, really, but I didn't want to fuck up scrolling) You can put this in any ACL you want, really. In my case, since I'm very sure by the nature of the way I gather these IP addresses that they're spammers, it's in acl_smtp_helo. Depending on how you populate your database, you may want to put this in a different place. If you want, you can teergrube them a bit by adding delay=30s. An alternative would be to set up a DNS blacklist; but that would just take too much effort to set up properly, and I just didn't feel like it. This works.

Jose Carlos Garcia Sogo: Show them to me

Show them to me Reading Blog de Cine, I have found a link to a video showing some of the most famous top-less images in movies. While the video, called Show them to me is interesting, what gives it the point is the companion song. Enjoy!

19 July 2007

Russell Coker: Bizarre No space left on device error from Xen

What should have been a routine “remove DIMMs and run memtest until things work” procedure to solve a memory error became a lot more complex due to poor error handling in Xen. The following error occured because the tdb database /var/lib/xenstored/tdb was corrupt. To fix it you must rm the file and kill the xenstored process (which will otherwise recreate the file with the same corrupt data). It took me a few hours to work this out. # xm create -c smtp
Using config file “/etc/xen/smtp”.
Error: (28, ‘No space left on device, while writing /local/domain/0/backend/vbd/
18/768/online : 1′) Strangely the command “/etc/init.d/xend restart” does not restart xenstore or xenconsole (which is why running “/etc/init.d/xend stop” before rm’ing the file didn’t do any good). After fixing the above problem I encountered the following error condition. It seems that there is no support for restarting daemons such as xenstored. So I had to reboot the machine. After that it worked. # xm create -c smtp
Using config file “/etc/xen/smtp”.
Error: Device 0 (vif) could not be connected. Hotplug scripts not working. I’ve filed Debian bug 433780 about this.

Pierre Habouzit: jpg/gif/pdf Spam, what can you do ?

In answer to zobel's post, here is how to fight efficiently against those nasty spams. Well, there is a wonderful tool, called clamav that you know already for sure. What is less known is that there are people that have had the idea to use clamav to fight spams as well. They provide constantly renewed spam signatures that fight against the jpgs/gifs/... that are too many those days. I use this script twice a day to update my signatures, and it works well. I use this setup on a medium sized mail server with excellent results, here are the numbers for the last 30 days. The mail server had:
 2.357.038 connections attempts
 1.841.425 mails have been greylisted[1]
 ---
   510.193 mails have been rejected
   238.869 of those thanks to clamav (~50%) 
 ---
   502.580 mails have been accepted for delivery
 1.564.130 mails have been delivered to users
As you can see, on 4 mails that are considered for delivery (after the greylisting), 1 is rejected thanks to clamav. That's 25% of the incoming mails that get simply dropped, and that has almost 0 false positives[2]. Another note about greylisting: a quick reader could think that 1.8M - (2.3M - 0.5M - 0.5M) ~= 0.5M of mails are greylisted for nothing. That's not the case at all, the 2.3M are connection attempts. And we have some SMTPs that we talk to a lot (as it's the mail server of the Alumni of my school, we talk to the school MX a lot e.g.) and some of the connections carry up to dozens of mail on a regular basis. Our estimation is that in a regular day, greylisted mails that are submitted again are around the thousands, meaning some dozens of thousands a month, which is ridiculously small. And among them, sadly, most are still spams. These good ratios exists because we use conditional greylisting: we greylist IPs that look suspcicious only. But I already talked about that, and it's not really the matter of this post.
Notes [1] using conditional greylisting: only greylist mails that come from IPs that are listed on RBLs [2] some companies using gif's in their employees signatures can trigger false positives, but it's fairly uncommon

Next.

Previous.