The backup of my Soekris 4801
I've read an article about Unix system administration recently. One of
the golden rules, if I remember correctly it was the first one, is
backup your systems regulary. Backup - stop reading this article, think
of a backup. Well, I read the article till the end and looked at my
laptop - no backup. I looked at my Soekris - no backup, I looked at my
NetBSD toaster - no backup. Huh, time to do something like a backup. I
decided to look at all the fancy tools for this task like: bacula,
arkaya and several others. A posting from Mathias Scheler on -current
users brought the idea: why not use dump(8) for this purpose?
#!/bin/ksh # # Full Dump of Soekris TIMESTAMP=$(date "+%Y.%m.%d-%H%M") DMPFILE=/server/$TIMESTAMP-Soekris_Dump.dmp dump -0uan -f - / | ssh rhaen@wiesel "dd of=$DMPFILE"Voila - a level 0 dump using ssh to a different server. A restore test showed that this concept is working well. I'll setup a cron for this and dump on an external USB device. Did I mention I love the Soekris USB port of the 4801?
References:
manlinker - another small Blosxom plugin
I am a lazy programmer, I am an admin and I don't like to type things
more than once if I can avoid it. hubertf has a world-class blog and he
carefully links all references to manpages like etcupdate(8) or rcorder(8)
and several others. I don't want to write the a href links all the time
so I wrote a small blosxom plugin for it. This plugin parses the article
for patterns like manpage(mansection) and converts it to a
HTML link to the NetBSD online manpages. Right now I don't have any fine
tuning possibilities inside the script, I just wanted something for
NetBSD. If someone sends me some feedback about it, I'll include other
manpage cgi script locations as well. FreeBSD has a very nice interface
to the manpages, including the NetBSD manpages. However, they don't have
NetBSD -current, so I am using the original NetBSD manpage script.
This plugin has no installation dependencies or other things to deal
with, just download it, drop it inside your blosxom plugins directory
and you are ready to go.
Download the plugin here
I'm updating to -current
Well, I am not a thrillseeker, I am not an adventurer, I am not a wizard
and I am not a code hacker, I am a plain user who uses NetBSD for his
own work, his own ideas, usually for Perl hacking and sometimes for
small parts of C code. So I am a whimp.
However, I like NetBSD and the development hardcode team and I decided
to gave the new 4.99.72 a shot and installed it on an USB stick. My IBM
Thinkpad X40 can boot from an USB stick and I looked into the new
version, checked out the new logging features of the filesystem and the
great acpi abilitities. The update went fine, only a some work after
etcupdate(8) has to be done.
I complained about non working ath(4) support on the current-users
mailing list of NetBSD.org and it seemed to be fixed by someone in the
meanwhile. ACPI support however failed badly and my Thinkpad won't be
able to suspend to RAM. This is not a big issue as it didn't work for me
in NetBSD-4.0 either, however that should be improved before 5.0 will
see the light. I replied to my mail on current-users about ath0. Right
now I see some messages like:
Aug 25 09:13:37 /netbsd: ath0: device timeout (txq 1, txintrperiod 5) Aug 25 09:13:43 /netbsd: ath0: device timeout (txq 1, txintrperiod 4) Aug 25 09:14:03 /netbsd: ath0: device timeout (txq 1, txintrperiod 3)Any ideas? The recompiling of all the pkgsrc things is just running. All things will be recompiled - see my post before :)
References
- rhaen_at_NetBSD.org: ath0 not working after updating to 4.99.72
- rhaen_at_NetBSD.org: Re: ath0 not working after updating to 4.99.72
I'll compile the world
After a short holiday (I am sure everyone noticed :) ) I decided to
compile a few things from pkgsrc for easier life. I don't like
thunderbird as it is a real heavy weight for my small X40, however you
can read mails with it. It compiled for several hours - oh, no, I can't
make a use of the precompiled binaries on ftp.netbsd.org as I use
modular-xorg.
Please notice - annoyed for the first time
After a quick look on the finished binaries, a quick run I trashed the
whole package without looking back. It's just annoying how bad it
performs on my X40. The linux bin package is alot faster than the NetBSD
build - how's that? Why am I the only person on earth who notice
this?
Please notice - annoyed for the second time
Well, after that experience I decided to look into python support for
gedit. editors/gedit is a nice small editor with plugin architecture,
alot of python plugins for it are downloadable. A class browser, wheew,
that's something for me! After about 1 hour of playing around I gave up.
I failed to get it work.
Please notice - annoyed for the third time
Bah! I decided to look even more into the details - I never mucked
around with python - but I was just upset. Why do pkgsrc needs 5 version
of python inside the repository? Is this the same with all the Tcl/Tk
stuff between version 4 and version 8?
Please notice - annoyed for the fourth time
Ok, back to something useful. My CPAN - pkgsrc p5-module comparison
thingy is getting back on the road. That's fine, holidays are over!
Oh, btw - we need more maintainers - maybe for python?
What happened to fink?
I got some feedback about my fink blaming inside the blastwave article.
Fink is a software project on Sourceforge (Link) which ported the debian apt
mechanism to MacOS X in order to provide an easy way to install
packages. Christoph Pfisterer was the main maintainer in 2001 who did
alot of the porting work and who maintained alot of packages. When he
stepped down many of the Fink packages became unmaintained for a certain
period.
I just wanted to point out that pkgsrc is a well maintained framework
by many users over 10 years now. If you need software for your computer,
just give us a try. Hej, we even provide a security framework, proccess,
etc. For all of you who wanted to look at the news that time:
Fink Maintainer Steps Down Due To GPL Infringment
Source for the accumulator script
Some of you already asked for it, get the sources for the accu data
collecting script here on this page. If you are just want to use it or
if you would like to have a short look into the sourcecode, feel free to
download it here.
Download
accu-statistics
It only requires the installation of the rrdtool which is located at
databases/rrdtool inside pkgsrc. The script has a damon mode, which is
handy for once starting, never care about. You can use it in your
crontab, too. Just make sure to run perldoc accu once you
unpackaged the sources. The png image is just a sample image of a
graph. Enjoy it!
Blastwave woes
Blastwave is a project which builds Solaris comaptible pkgs out of GNU
software for Solaris 8 - 11. I wasn't that sure about project
structures, security and so on when I installed their packages. I looked
for a better project and found NetBSD pkgsrc that time. We run NetBSD
pkgsrc on Solaris 8/Solaris 9 and Linux at my company and we are quite
happy with it - there is no need for such projects as blastwave. Hoever,
there is something interesting - when a single person has founded a
project and is in power of everything, this project is likely about to
explode one day. Do you remember fink? The package manager for MacOS X?
For every of my readers, I suggest to switch to NetBSD pkgsrc, for your
freedom and your security and software needs. Maybe I should set up a
small article how to get started on Solaris.
Links about the blastwave troubles
Power for my laptop
I own a small IBM Thinkpad X40 and I am quite happy with it, it's close
to 4 yrs old now and the stamina of the accumulator failed over the time
down to about 2.5 hours (from about 5-6 hours). This is still a fair
time for mobile usage, however I decided to buy a new accu these days.
It's about 179 Euro which is quite expensive.
This brought me in contact with charging times, mobile usage, design
caps, etc and I wrote a small perl script which gathers some statistics
and stores them inside a rrd database. On the graph below you can find a
typical example of a charge proccess. Let me explain the graph a little
bit. The script gets its data from the command envstat -r
every five minutes. The data is stored in a rrd database. The design cap
of the accu (blue area) shows what the total amount of power was when
the accu was new. The green line shows the last full charge. This is the
value for the last full charge when the accu showed 100% charge. So as
you can see by this graph, this accu has lost almost about 50% of his
capacity.
The red line shows the current charge, right now the charge proccess is still running, please note how long it takes for a full charge and how slow the proccess is when it climbs up to 100%.
Right now I won't post the script here, there is some cleanup work to be done, however I think I might finish it by tomorrow and I will post it here. There is still some documentation missing.
The script is monitoring my laptop for the next 3 years, I wonder what the new accu will look alike - what about the curves, etc.
What happens if you run Perl on a Soekris box?
Well, just to give you some numbers and a quick idea how it will look
like:
rhaen@arkanum.pkgbox.org:Soekris $ time -p perl -MDBI -e 'print "$DBI::VERSION\n"' 1.601 real 1.56 user 1.38 sys 0.19That's just 1.5 seconds for loading a Perl module to detect it's version. I thought the Soekris 4801 might be able to run a small blog with MovableType - but without a chance. It's perfect to run a small webserver which only serves static html pages but it's horrible slow if you decide to run dynamic cgis. However I haven't tested it with PHP but the results might be similar. In the next days I will work on a small workshop how to setup a blog on a Soekris running blogtools and such. Stay tuned :)
Oh, and all you need is NetBSD, that's nice, eh?
A blosxom plugin for gnats
During my work for pkgsrc I started to write articles for my blog and I
referred to several PRs from the NetBSD gnats system. However I just
wanted to type the PR in the form of e.g. NetBSD PR pkg/39230 and would
like to have my blog software to link to the webpage automatically. I
decided to write a small blosxom login for it and here it is.
gnats - blosxom plugin
A small plugin where you just type the PR number and blosxom will link against it. Guess what - all the three BSD project like FreeBSD, NetBSD and OpenBSD are supported right of the box. Ah, the default is NetBSD, of course.
Here is the current version of the plugin: download.
Please have a look at the perldoc configuration, too. Usually just drop the plugin into your plugins folder and it works right of the box.
NAME
gnats Plugin: gnats
SYNOPSIS
This plugin acts like a filter for your blosxom weblog. It replaces all occurrences of PR alike terms with the URL to the gnats system of the project. You don't have to care about writing in a special style, just write the text with the PR and it gets replaced. This includes the following forms:
NetBSD PR pkg/1337 NetBSD PR 1337 PR 1337
This will be translated to the corresponding URL to the gnats system of the project.
CONFIGURATION
The %gnats_system variable can be configured with the gnats system you would like to be parsed by this filter. The different BSD projects are using gnats, they have been already preconfigured. Note the form of the entries which is:
my %gnats_system = (
Project => '<url to gnats report view>,
);
The variable $default_gnats is used to determine the default project if the short form like 'PR 1232' is used. The value for this variable must match one of the Project values inside the %gnats_system.
my $default_gnats = 'NetBSD';
VERSION
0.1
AUTHOR
Ulrich Habel <rhaen@NetBSD.org>, see http://www.pkgbox.org/Plugins for new versions of this plugin.
LICENSE
This plugin is licensed under the terms of the revised BSD license.
