- Entries : Category [ digital ]
- Things having to do with digital world items go in here.
06 January 2007
Vivodi Upgraded our ADSL to 2048/256
But the line stutters...
This noon after a short line outage I logged into the router's web interface to notice that we have a faster ADSL line now. Vivodi (our ISP here) upgraded our ADSL line to 2048/256. For almost all their customers this was done automatically, I've had to order it, since I previously had the smallest package they offered, a meager 256/128 line. The higher speed is nice and welcome.
The downside are currently a lot of line drops. The line keeps up for somewhere between 4 and 30 minutes. Then it starts to loose packets and in the end it completely disconnects, the router reports "DSL connection down". Currently the "uptime" gets longer each time, so I hope it "fixes itself". If it doesn't, I'll have to call the support number, which unfortunately is the worst experience with this provider. "Please wait..." Let's wait and see if I'll have to.
09 January 2007
We're up... we're not... we're up... we're not!
After last weekends upgrade of our ADSL line to 2Mb, we had a lot of trouble. The line goes down every 10 minutes to 1 hour. SSH connections are stuck. Phone calls get either cut or disturbed - our phone runs on VoIP over the ADSL line. Apparently the VoIP box can recover some phone calls, but it's very ugly. When this happens, the router/modem's web interface informs us that "Your DSL connectioin is down" - who would have guessed? This evening I called Vivodi (our ISP).
After waiting for a long while on hold, I talked to a kid who said they'd temporarely put the line down to 1Mb, so it wouldn't disconnect, then they would go investigate and fix it. Good. So far they already lowered the line speed to 1Mb, like he said. But the drops of DSL connectivity keep on. For the moment it seems to be even worse. Will have to see if their investigation turns up something, or else I'll have to call them again. It's the first time ever that I've had trouble with our Vivodi line, so I hope it comes out fine.
15 January 2007
Date Calculations in Shell Scripts
Keeping 3 days of backups...
Let's say we are dumping a database into a file for backup purposes. We want to keep 3 days of backups around. We could of course rotate the filenames (similar to what newsyslog does: basename.gz, basename.0.gz, basename.1.gz). But we want to backup the directory to a remote host using rsync - and renaming the files would mean to transmit all files with each remote backup. A better naming scheme is to use names with dates, like basename_20070115.gz. That way names don't change and rsync doesn't retransmit yesterday's file. The problem then is that we have to delete backup files older than 3 days. We need a way to calculate dates in a shell script...
The secret sauce in the (partly pseudo) code is that we use the "unix epoch" - seconds since 1970-1-1 - for our calculations. Let's go through the code:
# today, normal date format,
# backticks to get the at the string
# same thing rolled into filename
# now delete the file from 3 days back,
# so we have always 3 days of backups
let deletedate=`date '+%s'`-259200
# todays date in seconds - 3 days in seconds
# key points are using `let' for sh calculations
# and using `date' with the %s format string
delfile=basename_`date -r $deletedate '+%Y%m%d'`.gz
dosomebackupscript -o $bufilename
# create the new file
This works by calculating the filename for the file 3 days ago, and deleting that file. After that is done, a different backup script creates the latest file with the same naming scheme. The script runs in a cron job, when it doesn't run on one day, then a stale backup copy is left over. We're not attempting to solve that here.
23 January 2007
Server will move again
We will have some scheduled downtime at betabug.ch and papakiteliatziar.gr, because I will attempt to move the server to his proper location again. The server will be shut down on Wednesday 2007-01-24 around 17:00 (GMT+2) and should arrive at his proper home and go online again on Thursday 2007-01-25 around 21:00 (GMT+2). There will be no web or mail service (or any other of the stuff the machine does) during that time. Backups are taken care of. Thank you for your patience, please knock on wood and cross your fingers.
26 January 2007
Gezügelt - here we go again
Server move worked out
Moving the server machine worked out today. I had started out Wednesday evening, went from Athens to Markopoulos, next morning to Munich, and that evening onwards to Ulm. I was still shell shocked from my last experience with the failed upgrade of the G3, but this time everything worked out nicely. DNS for betabug.ch might take a while to update everywhere, otherwise everything is working as expected.
27 January 2007
Two Days in the Cold
What happened so far
Thursday morning my friend Panos had given me a lift to the airport, where I boarded the flight to Munich. With me I carried a big cardboard box (provided by my friend Thanassis), which sheltered my "new" PowerMac G4 server on the way to his new home. I expected lots of trouble with taking this on as luggage, but neither the Airport, nor Lufthansa had any problems. In Munich we transported the box through snow and ice to Eleni's place, where I had some time to relax, before we went on the next adventure: Getting the box to Ulm, and seeing if it would start up...
As a sidenote I should mention that in Germany winter has arrived (a bit late) with snow and cold. We had to carry the box through lots of snow and half-melted snow. When we went to the central train station we noticed with an uneasy feeling that almost all the trains were delayed (up to 50 minutes), some even cancelled. Our schedule was to go to Ulm, where we would have about 2 hours to get to the location of in-ulm.de (the club who would house my machine for a small fee), install it, then get back to the train station. A 50 minute delay would have made that timeplane hard to impossilbe to keep.
In the end we were lucky that our train departed with only 5 minutes delay (and gathered a total of 15 minutes delay on the way). Took a taxi to avoid carrying the box for half an hour, and then we were at the place. The buildings entrance door was open, but then we got stuck. We couldn't find Herby, the clubs cashier who had told us he would be there. Turns out he had sent me a mail right before I left, stating that he would be rehearsing with his country band in the next room and we should bang on the window. I did not get that mail because at the time I had already packed up the server.
Right about when I was going into full panic mode, the group's practice room door opened and Herby emerged. Things started to turn around. It didn't take me long to get the machine set up and run the script that set up the network settings. In the club's social room I sat at a Linux box and did the further setup from a more comfortable position. I was feeling much more easy and we went back through the cold to return to Munich. It was about 3 in the morning when we got to sleep.
The next day (Friday) we slept late, no wonder. Somewhere about midday, I did some further setup on the server, amongst other things I reset the clock one hour back (from Athens time to Zurich time). That might have been the reason for the next adventure: We then went on for some shopping and eating out at a bavarian restaurant, and when we came back the server couldn't be reached any more. It had lost all connectivity. I checked various theories and came to the conclusion that only my machine had a problem. Lucky me Paul from in-ulm.de happened to be in the club room and he rebooted the G4 (thanks!). After last November's trouble I had a little shock from that episode. But so far it seems things have worked out.
In the evening we met some friends of Eleni at a small greek restaurant. I'm not too much after greek food in Germany (most of those places are just terrible), but it was a nice evening, because some people where playing music. With a guitar, a bouzouki, and a baglama they were playing old rembetika songs. The place was small, seating maybe 25 people with no room to spare. The atmosphere was very familiale, and I enjoyed the evening. Again we came home late and I almost froze my butt off on the way home, but the music was worth it.
01 February 2007
Messed Up my Antispam Settings
Shut out everybody - sorry for the confusion!
This afternoon I had a big run of commentspammers hammering the site like crazy. I had to stop them, so I went and blocked their user-agent string. But doing that I made a small mistake... the result was that all the world got shut out with a 403 error and a message claiming that they weren't human. I'm sorry for the confusion! The error is corrected now (you can read this), and I hope it won't happen again.
07 February 2007
Restored Pictures on Weblog
Probably *all* back now
After the breakdown of the G3 back in November there were a handful of pictures missing on this weblog. They had been "falling into the hole" between the last backup and the machine failure. Today I had the simple idea to look for them on the machines where I had done the image editing... duh. Life can be so easy when you think of it and yay! for being a packrat sometimes. Also yay! for keeping backups in the first place, they're what had saved the other 99% of my ass. The month views for October and November look so much better now. Those were some really nice pictures missing.
09 February 2007
Ouch... another Server Outage
The rough times keep coming in. This morning I wanted to check my mails and couldn't connect to betabug.ch. Looks like the machine got stuck somewhere after midnight. Lucky me, someone of the helpful people from IN-Ulm came by and rebooted the box a couple of hours later. As for the reason, there was nothing useful in the logs, it looked like the machine had just frozen up at that time. Very bad, especially as this has happened before, right after the server move. I was *very* gloomy in the morning due to this, my mood improved during the day though.
I'm now getting the system to an up-to-date OpenBSD -stable (for those who know what that means :-), maybe that helps. If not I will at least need something that lets me remote reboot the box, or look into other hardware. Besides, I should stop taking my hobby server so serious.
06 March 2007
Greece on Wireless
Come in, we're open!
Another big Yay! to my boss, I got a new MacBook . Armed with this one and its built in Airport card, I checked the wifi nets both at my old and new place... wow, has Greece changed in respect to the Internet...
3 (even 2) years ago I had hoped to come here and be able to leech a wifi connection sometimes, but there was nothing around. Now I noticed that at the new appartment I have very friendly neighbours. I haven't met them, but they offer free and open wifi to everyone. I think once we've moved in I'll introduce myself and give them a helping hand. But their network was only one amongst 3 that I noticed.
Same at the old place, only that I spotted 6 or 7 networks there. Didn't check which one's were open, but given the default router names for SSIDs I assume a lot. Even here at $WORKPLACE I can "see" wifi networks. It might be finally time to get one of those little keychain wifi detectors here. Athens has loaded up with open wireless networks, either intentionally (the proper way to get free wifi through AWMN volunteers wifi network or AthensWifi at Syntagma square) or unintentional through your unintentionally "friendly" neighbours.
1: What can I say? The MacBook roxx. It feels good to have a real portable computer again too.
09 March 2007
...or playing with new computer
I should be putting stuff into cardboard boxen, instead I'm using every opportunity to do something else. Playing around with my new computer definitely counts in that category and is way more fun than preparing for moving to the new apartment. Yesterday evening I found out that the macbook runs the Zwiki unit tests in 17-20 seconds, even on battery and in "Better Battery Life" energy saving mode. Did I mention that the battery life is fantastic, even considering that the battery is new? I haven't yet done anything with the machine that really taxed it. But the test install of Plone  is a good indicator: The machine is so fast that Plohn pages load almost at acceptable speed! Now back to stuffing things into cardboard...
1: Yes, Plone sucks and I wouldn't touch it with a stick. The reason is simply that I need this install for Zwiki debugging and testing.
15 March 2007
The Joys of Being Offline... and UTF-8 mutt
Offline except for my trusty GPRS connection of course
One of the less comfortable results of the move to the new appartment is that I currently don't have an Internet connection at home. I could force my way into one of the wifi networks around here, but I won't (and the one that has been completely open has been slightly locked down lately).
So I'm back to my trusty Bluetooth/GPRS connection, well known since my island days. It's a nice reminence for the moment. I hope Vivodi won't break their record in waiting time to get us an ADSL connection. Today I had a phone call from them, someone who worked on my application had a question. Still meditating about this being a good or bad sign.
Yesterday I had copied some Zwiki issues to my laptop, and was sitting all the evening on the new sofa, hacking and investigating along. Sadly most of the issues were just old stuff that should have been closed a long time ago, nothing for me to fix. I started with some other, bigger stuff, but sometimes it would be nice to be able to look up something on the web.
Part of my "diet Internet" setup is using mutt for mail. It's *way* more economical for bandwidth, and of course nothing beats a terminal window in userfriendliness (assuming the terminal decides you are its friend). Yesterday at work I had downloaded the tarballs for mutt and... drumroll... ncurses. Mac OS X has ncurses already. But I wanted to try build mutt with ncursesw, that is with "wide-char" support. Whenever I try to build software while offline I invariably miss a library and have to stop till I get a connection to download it another time.
This time everything worked. And it worked very well, my mutt does Greek in UTF-8 everywhere now. Displaying messages properly in the pager, subjects in the message listings... everything as it should. I'll try the same thing on OpenBSD next.
On Mac OS X (10.4) I built ncurses / ncursesw like this: ./configure --enable-widec --prefix=/usr/local and then I went on to build mutt with this incantation: ./configure --with-curses=/usr/local/include/ncursesw --enable-pop --enable-imap --with-ssl. My Terminal.app is set up for UTF-8 (as described in other posts on this filty blog, see "Best Of").
18 March 2007
Exceptions, PGP, and Athens by Night and Bike
Weekend in new appartment
Yesterday I worked some more on Zwiki, sitting on the new sofa, hacking on the new laptop. Even though I didn't get out much, I enjoyed the good weather in the new, shiny and light apartment. My main target was reducing the "blanked" except-clauses. Catching exceptions in the code is a good thing, but only if we catch the specific exceptions that reasonably might happen. Moving forward on that topic.
Also I made some progress with the PGP seminar I'm preparing for HelMUG. I had started writing up for this two months ago. Now I reread what I had said, decided it's all boring and not up to standard and started anew. I'm done with most of it now, but still have to fill in some blanks. Also need a lot of corrections in the Greek text.
After all that "work" in the evening I went out with libero (of HelMUG fame). We rode on his Vespa across town. Athens by night on a bike is always a special experience. Driving between rows of cars to be the first on the traffic light. In difference to the 1980's we're wearing helmets now. Modern times. We rode to a bar called "Pop", near Ermou / Agios Markos. There we had a drink (or three) and enjoyed the good music. Before going home we picked up a meal at a 24h restaurant near my place. Nice way to end a good day.
24 March 2007
A Story of Workarounds and Bugfixes
I like bugfixing. No idea if it's my nickname that's at fault (the
nickname was there before my appetite for bugfixing), but I also seem to
have some success with it. Sometimes it can get a nice twist. Take for
example this problem Zwiki had in rendering
footnotes in RST pages: It looked like we would need a workaround in
the code to make the problem go away, a special case with extra checks,
bells and whistles. I took the plunge into the code and started looking
for where to apply that...
(This part always reminds me of Diomedes Spinellis Book "Code
Reading".) Using "tags" in vi is the first weapon of the bug hunter,
sprinkling the code with "print" statements the second. Pretty quickly
I found the spot to apply the "special case" to be somewhere within a
function called markLinksIn. There I started to build my special case.
This function identifies wiki links inside the page text, it already has
special treatment e.g. for wiki links that are inside other links. As I
was trying to understand the logical flow of the code, I looked through
the method within_literal, which does part of those checks, something
similar to what I was building.
My "special check" was trying to detect RestructuredText footnote or
citation markup around a zwiki freeform link, for example _
would be the marker for footnote 1, while ..  would start
the actual footnote display. The general code gave me the "coordinates"
of the found link (the position of the '[' and ']' in the overall text).
I tried to "look back" and "look forward" from those positions to detect the special RST markup.
But it just didn't work, it wouldn't detect the footnote markup. "print"
to the rescue, I started to print out what I had "seen looking back" and
surprise! surprise! at this point in the code the RST footnote had
already been transformed to an html link element, so looking for ..
couldn't possibly have found anything.
Now I hope I didn't lost you till here... because if there was a link
around the wiki freeform link, then that should already have been
detected by the existing code, specifically the within_literal method.
But why wasn't it detected? Some more friendly and helpful "print"
statements later (and while chatting with Simon on #zwiki) I spotted the
problem: The find function was looking for <a href= while
RST generates tags of the form <a name="..." href="..."
(which is perfectly legal, just looks unusual). It took me a little bit more time to
actually fix the bug, but at that time the poor critter was already
Now the funny thing about this story is how everybody was shouting "we
need a special case, oh my, it will clutter up our code, but we need
it". (I'm not exempting myself from this, in fact I was halfway into
actually writing that special case code.) But in the end it was just a
small bug, stemming from the way we usually see HTML links in difference
to what HTML links really can look like.
30 March 2007
FloCafe - Starbucks 1:0
Greece wins in wifi and hospitality
Yesterdays Zope meetup showed one interesting result: The outcome of the "wifi battle" of Greece's cafeteria chain FloCafe against the imported Starbucks chain ended with an easy win for FloCafe. Starbucks has been offering wifi Internet access for a long time now, but charging 6 Euro or so per hour is no defense against plain free wifi access at the wifi newcomer FloCafe. Coupled with good old greek hospitality the result is clear...
I was pleasantly suprised overall by the FloCafe on Syggrou Avenue. It might not look special from the outside (all those "Flo's" look more or less the same), but the interior is done very pleasantly. The hospitality itself was on a high level too. We happened to have the manager (at least that was my guess) around when we arrived, so she helped to chose a place to sit, re-arranged tables, brought me another chair to put my laptop bag on. Right before she left we asked her for the wifi access. She replied with a trained "flocafe/flocafe", so the seasoned wifi wanderer knows what to do.
The line for the wifi isn't too fast, but it's fine for web browsing and ssh access. I had some connection problems inbetween. Likely that was because the airport card at one point found around 13 to 15 access points, the interferences must be a mess. Interestingly once I ran KisMac to see what's around the connection started to behave.
When we left (hours and hours later) the manager greeted us and thanked us for our visit. Actually I would have wanted to thank *her*. We had consumed for not even 20 Euros (the four of us), but had perused the location and the wifi for about 5 hours.
01 April 2007
Die Vergangenheit entgleitet uns
Wenn ich diese Tage mit München telefoniere, höre ich Geschichten von den Büchern König Ottos aus der Bayrischen Staatsbibliothek. Neunzehntes Jahrhundert, eigentlich gar nicht so lange her. Jedenfalls im Vergleich zur Antike. Die Wege der Bücher und Noten lassen sich zum Teil schon nicht mehr komplett nachverfolgen. Spannend ist das, auch im Vergleich zu heute...
Aus unserer Zeit wirds noch weniger geben. Wenn die Server der "wayback machine" abgestellt werden, die Magnetisierung von Bändern und Laufwerken abgeklungen ist (oft schon viel früher, wenn die Formate nicht mehr verstanden werden), wird die Fülle an Informationen und Meinungen aus dem Internet in sich zusammenfallen. Alles nie dagewesen oder nur noch eine vage Erinnerung. Wer weiss heute noch wie's in einem BBS oder einem MUD ist? Und wenn heute noch, wie lange noch?
Kein Grund zu jammern. Vielleicht ist es auch einfach richtig so. Darwinismus des Wissens: Erhalten blebit was gewünscht wurde. So wie die Mönche des Mittelalters abschrieben was sie für wert befanden werden die Systemadministratoren migrieren was gebraucht wird.