Strommessung: Analogen Zähler aufzeichnen und auswerten

Sven Bachmann
Messwerte erfassen, speichern und auswerten - in der Industrie gang und gäbe, im Privathaushalt eher kaum zu finden. Da es doch für manche interessant ist zum Beispiel den Stromverbrauch täglich zu sehen und eventuell große Verbraucher ausfindig zu machen wäre es nun auch schön, einen handelsüblichen Zähler zu digitalisieren. Die Stromwerke machen es einem dabei jedoch meist nicht einfach. Im Normalfall gilt es, dass man vor jeglicher Auswertung erst einmal den kleinen roten Punkt auf einer sich rotierenden Scheibe erkennen muss.

btrfs: Zeitgemäße Backups unter Linux.

Sven Bachmann
Die Entwicklung des Butter-Dateisystems btrfs schreitet zügig voran und vielleicht können wir schon bald auf ein zeitgemäßes Dateisystem zurückgreifen mit welchem inkrementelle Snapshot-Backups Realität werden. Das gibt es schon? .notice{padding:18px;line-height:24px;margin-bottom:24px;border-radius:4px;color:#444;background:#e7f2fa}.notice p:last-child{margin-bottom:0}.notice-title{margin:-18px -18px 12px;padding:4px 18px;border-radius:4px 4px 0 0;font-weight:700;color:#fff;background:#6ab0de}.notice.warning .notice-title{background:rgba(217,83,79,.9)}.notice.warning{background:#fae2e2}.notice.info .notice-title{background:#f0b37e}.notice.info{background:#fff2db}.notice.note .notice-title{background:#6ab0de}.notice.note{background:#e7f2fA}.notice.tip .notice-title{background:rgba(92,184,92,.8)}.notice.tip{background:#e6f9e6}.icon-notice{display:inline-flex;align-self:center;margin-right:8px}.icon-notice img,.icon-notice svg{height:1em;width:1em;fill:currentColor}.icon-notice img,.icon-notice.baseline svg{top:0.125em;position:relative} Anmerkung Hinweis zu btrfs: Das Dateisystem btrfs gilt zum jetzigen Zeitpunkt (6. Oktober 2009) als experimentell und ist nicht für den produktiven Einsatz bestimmt. Stimmt.

Ubuntu 9.10: Featuring the S.M.A.R.T. Notifier

Sven Bachmann
A new base feature from Ubuntu 9.10 is the S.M.A.R.T. notifier which informs you whenever your harddrive reports an error. Before Karmic Koala you had to install smart-notifier which does the same job but was not in the base distro. Screenshot after the break…So here it goes: This is a killer feature I think (like another feature called “backup” which has not made it yet into the base distro) and it will safe a lot of people their data.

arm: remove thumb instruction "bx lr" from EABI binary

Sven Bachmann
Today I had a strange error using the GCC version 4.4.1 with EABI support on a non thumb-ARMv4. Everytime I compiled something, with and w/o the -mno-thumb-interwork parameter it also contained the bx lr instruction which is only for later ARM processors with thumb support.The only solution seemed to be to patch the GCC. Urgs… not really a nice solution, because recompiling GCC takes 3 stages and much time. After lots of googling I finally found the solution in the Debian Wiki.

mailman: Reinject all pending mails from command line.

Sven Bachmann
Mailman doesn’t have a command to re-inject all pending mails for the command line. Because in Debian Lenny the web-part is broken (wants to be recompiled because of wrong Apache group) I needed to re-inject a lot of mails which were pending. .notice{padding:18px;line-height:24px;margin-bottom:24px;border-radius:4px;color:#444;background:#e7f2fa}.notice p:last-child{margin-bottom:0}.notice-title{margin:-18px -18px 12px;padding:4px 18px;border-radius:4px 4px 0 0;font-weight:700;color:#fff;background:#6ab0de}.notice.warning .notice-title{background:rgba(217,83,79,.9)}.notice.warning{background:#fae2e2}.notice.info .notice-title{background:#f0b37e}.notice.info{background:#fff2db}.notice.note .notice-title{background:#6ab0de}.notice.note{background:#e7f2fA}.notice.tip .notice-title{background:rgba(92,184,92,.8)}.notice.tip{background:#e6f9e6}.icon-notice{display:inline-flex;align-self:center;margin-right:8px}.icon-notice img,.icon-notice svg{height:1em;width:1em;fill:currentColor}.icon-notice img,.icon-notice.baseline svg{top:0.125em;position:relative} Warnung Use this only if you have a backup. This script is new and not tested on a wide basis.

bash: Redirect output to virtual file

Sven Bachmann
Bash has a cool feature, it allows you to redirect the output of an application to a virtual file. With this its for example possible to fast-diff two directories. The old way would look like this: ls dir1/ > directory_1.txt ls dir2/ > directory_2.txt diff directory_1.txt directory_2.txt But with bash (and maybe some other shells) you can do the following: diff <(ls dir1/) <(ls dir2/)

uClibc: "bx r6" compile error on ARM

Sven Bachmann
While compiling OpenWrt for an ARM compatible processor I got the following error: {standard input}: Assembler messages: {standard input}:39: Error: selected processor does not support `bx r6' I found the solution in the The definitive guide to GCC book from William Von Hagen (I don’t own it, I found it via Google Books). You have to disable the the USE_BX flag in the uClibc config file and everything will be fine.

file-management: fdupes with hardlinks

Sven Bachmann
Fdupes is a very useful tool - it searches your harddisk for duplicated files and helps you to keep it structured. Currently, it only supports deleting duplicated files, which is not suitable for my music collection, because I want to store the same music in different places (eg. to make a collection for different reasons like music for a wedding and so on). One possibility would be to add tags to the music.

Printing: Linux Brother Printer and the DIN A4 Problem

Sven Bachmann
Most of you know it already… if you set your (Brother) printer under CUPS to DIN A4 it will only print with the Letter-margins. But now there is a solution available. Thanks to the German Ubuntu-Wiki. .notice{padding:18px;line-height:24px;margin-bottom:24px;border-radius:4px;color:#444;background:#e7f2fa}.notice p:last-child{margin-bottom:0}.notice-title{margin:-18px -18px 12px;padding:4px 18px;border-radius:4px 4px 0 0;font-weight:700;color:#fff;background:#6ab0de}.notice.warning .notice-title{background:rgba(217,83,79,.9)}.notice.warning{background:#fae2e2}.notice.info .notice-title{background:#f0b37e}.notice.info{background:#fff2db}.notice.note .notice-title{background:#6ab0de}.notice.note{background:#e7f2fA}.notice.tip .notice-title{background:rgba(92,184,92,.8)}.notice.tip{background:#e6f9e6}.icon-notice{display:inline-flex;align-self:center;margin-right:8px}.icon-notice img,.icon-notice svg{height:1em;width:1em;fill:currentColor}.icon-notice img,.icon-notice.baseline svg{top:0.125em;position:relative} Anmerkung Update: The DCP-135c doesn’t do borderless very well, so just use “DIN A4”. Update 2: Fixed typo in sed-command: PaperType was replaced with PageType.

GTK: Trayicon with effective 2 lines of C-Code

Sven Bachmann
Because I always wanted to learn some GTK, I decided to try it first with a trayicon. And wow, it was that easy - ok, the functional factor is zero, but you’ll have a trayicon with a tooltip. And if you want more you can read the GTK documentation and extend it to the max.So here it is: trayicon.c #include <gtk/gtk.h> int main(int argc, char *argv[]) { gtk_init (&argc;, &argv;); GtkStatusIcon *status = gtk_status_icon_new_from_stock(GTK_STOCK_NO); gtk_status_icon_set_tooltip(status, "Nice Tooltip"); gtk_main(); return 0; } As you can see, beside the C-Standard header and footer, and also the GTK header and footer, we have only two lines of code.