iotop – simple top-like I/O monitor for Linux
May 4th, 2008Linux has always been able to show how much I/O was going on
(the bi and bo columns of the vmstat 1 command).iotop is a Python program with a top like UI used to show of behalf
of which process is the I/O going on. It requires Python ≥ 2.5 and
a Linux kernel >= 2.6.20.
gitosis – git repository hosting application
May 3rd, 2008Quoting the package description of Debian’s gitosis:
gitosis aims to make hosting git repos easier and safer.
It manages multiple repositories under one user account,
using SSH keys to identify users. End users do not need
shell accounts on the server, they will talk to one shared
account that will not let them run arbitrary commands.
I’m pretty happy with mercurial at grml (see our instructions if you are interested in our setup details) because we follow a linear development model (and I try to keep it that way regarding the workflow). Though I was thinking about forking an existing project for grml without losing the possibility to sync with original upstream. The project in question uses git and as I really love the way branching works in git I wanted to give it a try using my own infrastructure. An easy way of doing so is using gitosis. Gebi already blogged about that but I wrote down the setup instructions if you want to use it on Debian/etch:
First of all make sure to have a recent git-core package from backports.org:
# cat /etc/apt/sources.list [...] deb http://www.backports.org/debian etch-backports main contrib non-free # cat /etc/apt/preferences [...] Package: git-core Pin: release a=etch-backports Pin-Priority: 999 # apt-get update; apt-get install git-core
Install my Debian package of gitosis being based on Debian unstable’s version 0.2+20080319-3 and adjusted for use on Debian/etch (or build your own package using python2.4 in debian/rules and adjusting build-dependency for python-setuptools or install from source):
# wget http://grml.org/git/gitosis_0.2+20080319-3_all.deb # dpkg -i gitosis_0.2+20080319-3_all.deb
Initialise setup with your own ssh key:
# sudo -H -u gitosis gitosis-init < /path/to/your/sshkey/id_rsa.pub
And finally clone the gitosis-admin repository for administration (see resources at the end of this article for further information):
% git clone gitosis@${SERVER}:gitosis-admin.git
Now adding new repositories is as easy as putting something like the following snippet to gitosis.conf of the gitosis-admin repository (don’t forget ‘git commit -a ; git push’ :-)):
[group demo] members = mika@foo writable = demo
mkdir demo ; cd demo git init $DO_SOME_STUFF git add . git remote add origin gitosis@$SERVER:demo git push --all
That’s it!
I’m not yet sure what might be the best way to provide git as an official service for grml. This needs further investigation… (gitweb stuff, permission handling, integration with mercurial,…), though gitosis seems to be a nice start.
Useful resources:
- git repository of gitosis
- /usr/share/doc/gitosis/README.rst.gz
- Hosting Git repositories, The Easy (and Secure) Way
- From subversion to git (part3 – gitosis)
GLT08: Sysadmin Talk
May 2nd, 2008At linuxdays Graz I held my talk about "Systemadministration++". I was telling my audience mainly stuff I collected for adminzen.org. It was the first time I could use the lessig method for presentation. First time, and could? Yes, because when using the lessig method to be able to use a presenter screen a dual head setup is recommended. As so many people asked me about the presentation software and the setup I used I’ll keep my promise and write some sentences about that…..
As you might know from my previous blog entry about OpenOffice’s Impress using a presenter screen on Linux isn’t that easy. Cool, we have something to make the next year the one of “Linux on the desktop” once again, right?
Alright. OO isn’t yet ready for what I need. KOffice? Doesn’t even have an idea of what dual head might be. Failed. Currently pdf-latex is my favourite way of writing slides – being able to write my slides remotely, put plain text files under version control, all the stuff you know… So I thought about a way to use my cute RandR setup where I’ve to do nothing more than execute just two commands to get the dualhead stuff on-the-fly:
% xrandr --output VGA --mode 1024x768 % xrandr --output VGA --left-of LVDS
Dual head running, what I’d need is either a PDF file splitted into two halfs and being used over both screens or two PDFs getting synchronised in two different PDF viewer instances. The first option isn’t possible due to several reasons [snip rant on pdf viewers]. But xpdf provides a -remote option, being exactly what I need. Instead of using two separate xpdf instances I can use keyjnote with the following infoscript (thanks Martin Fiedler) for the main presentation on the external screen (visible for my audience):
% cat serveradministration.pdf.info [...] import os def page_enter(): os.spawnvp(os.P_NOWAIT, "xpdf", \ ["xpdf", "-remote", "notes", "-exec", "gotoPage(%d)" % Pcurrent]) for page in xrange(1, PageCount+1): SetPageProp(page, 'OnEnter', page_enter)
On the internal screen I see my notes.pdf which is being synchronised with the external screen thanks to xpdf and keyjnote scripting automatically. A simple Python-Cairo script does the job for displaying the local time on the internal screen. That’s what it looks like (older screenshot with blabla notes, but you should get the idea) – on the left side the external screen and on the right side (only the bottom of it is getting used and visible) is my laptop’s screen:
The lessig-style and automatic generation of the according slides.pdf and notes.pdf are handled through a simple and stupid framework I wrote for myself. I’m planning to improve that framework together with my colleagues from LaTeX@TUG and provide it to the public. Dig through the Keytex-page in the grml-wiki to get a first idea what I’m talking about.
The slides of my sysadmin talk (PDF, 7MB) are available now. Disclaimer: without attending to my talk the slides won’t be that useful.
Linux kernel driver <-> device mapping (Update)
May 2nd, 2008Update: thanks for mentioning ethtool, Robert Fischer
A common sysadmin task is to locate a specific device and identify which driver is responsible for it. Usage examples to identify a WLAN device on Linux:
Not so well known yet – pciutils >=2.2.9. provides switch ‘-k’ for lspci:
% lspci -k [...] 03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02) Kernel driver in use: ipw3945 Kernel modules: ipw3945 [...]
Using hwinfo:
% hwinfo --netcard Model: "Intel PRO/Wireless 3945ABG Network Connection" [...] Driver: "ipw3945" Driver Modules: "ipw3945" Device File: ipw Features: WLAN
Via ethtool:
% ethtool -i ipw driver: ipw3945 version: 1.2.1dmpr firmware-version: 14.2 1:0 () bus-info: 0000:03:00.0
Or using the manual approach via sysfs (being /sys/class/net/$DEVICE_NAME/device/driver/module) – recommended for scripting:
% basename $(readlink /sys/class/net/ipw/device/driver) ipw3945
“Slow DOWN, please!!!”
May 1st, 2008Wer die LKML nicht mitliest, aber am Workflow von Open-Source-Entwicklung interessiert ist, sollte unbedingt in den Thread "Slow DOWN, please!!!" hineinlesen. Ausgelöst von David ‘Mr. SPARC and Network’ S. Miller, geht es um die Frage, wie man die enorm vielen Patches und damit einhergehende Bugs/Regressionen im Merge-Window besser in den Begriff bekommen könnte.
Natürlich ist das teilweise sehr spezifisch für das Entwicklungsmodell “wohlwollender Diktator” (engl: benevolent dictator) beim Linux-Kernel, aber gerade wenn man den Kontext zur Entwicklung rund um OpenSolaris herstellen kann, verstecken sich einige sehr interessante Aussagen in der Diskussion.
Als Anregung ein kleines Best-Of:
I don’t think quality and speed of development are related. In fact,
I think quality and speed often go hand-in-hand: the same way
some of the best programmers are also the most productive,
I think some of the most productive flows are likely to generate
the best code!
On Wed, Apr 30, 2008 at 06:40:39PM -0700, Linus Torvalds wrote:
> Now, we do know that open-source code tends to be higher
> quality (along a number of metrics) than closed source code,
> and my argument is that it’s not because of bike-shedding
> (aka code review), but simply because the code is out there
> and available and visible.Really? And how, pray tell, being out there will magically improve the
code? “With enough eyes all bugs are shallow” stuff out of ESR’s arse?
On Wed, 30 Apr 2008 15:31:22 -0700 (PDT) Linus Torvalds wrote:
> Any suggestions on how to convince people that their code
> is not worth merging?Raise the quality. Then the volume will automatically decrease.
Ich bin ja gespannt, ob und wie es das Thema bis in die Mainstream-IT-Medien (heise & CO) schafft…
Extended Vim
April 22nd, 2008know-how != know-how
April 21st, 2008So nahe und doch so fern…
April 18th, 2008Today in IRC (#grml)
April 17th, 200821:59 < formorer> mika: pong :)
22:01 < mika> formorer: ping
22:02 < ft> ricmp? :)
Wishlist for the successor of Lenovo’s X300
April 17th, 2008My personal wishlist for the successor of Lenovo’s X300 ThinkPad:
- less noisy fan / better fan regulation
- docking station support
- stronger CPU
- firewire connector
- SD card reader
- ExpressCard/PC card slot
What I really like at the current X300:
- the overall size
- the 13.3-inch display running at 1440×900
- the builtin SSD (from Samsung)
- the keyboard (just rocking)
- the integrated camera
- the surface (yeah, it’s really awesome)
- sound quality of external boxes (being much better than on the Thinkpad X61)
Want to see the X300 in action? Visit the grml booth at Grazer Linuxdays on 19th of april 2008.
The Admin Zen
April 14th, 2008Abbruch… Aufbruch… 2008
April 14th, 2008Ein bisschen etwas in eigener Sache, was schon länger in den Drafts liegt: Nach über 5 Jahren als Sysadmin am Institut für Unternehmungsführung und -organisation an der TU Graz ist es Zeit für einen Tapetenwechsel. Am 14. Jänner habe ich meinem Chef meine Entscheidung mitgeteilt und mit Ende Juni 2008 läuft mein aktueller Arbeitsvertrag aus.
Ich bleibe noch mindestens ein Jahr in Graz. Im Sommer geht es – gemeinsam mit meiner Freundin – auf Wohnungssuche. Wer da was Nettes in Graz kennt: bitte melden!
Jobmäßig möchte ich weiterhin im Bereich Systemadministration und -integration tätig bleiben. Selbstständig? Angestellt? Das weiss ich noch gar nicht so recht. Wer glaubt, etwas passendes für mich zu kennen/haben: meine Mailbox steht offen.
In den nächsten Tagen und Wochen bin ich noch an “Release! Was Open-Source-Projekte erfolgreich macht” (ISBN:978-3937514604) dran und auf dem Weg zum offiziellen Debian-Developer. Am 19. April gehen wie schon erwähnt die Grazer LinuxTage (bei denen ich wie immer im Organisationsteam tätig bin) über die Bühne und am 30. Mai bin ich noch beim Linuxtag in Klagenfurt mit 2 Vorträgen anzutreffen.
Grazer LinuxTag 2008 – 19. April
April 13th, 2008Kleiner Reminder:
Am Samstag, dem 19. April findet der Grazer LinuxTag 2008 an der FH Joanneum statt!
Vortragende aus dem In- und Ausland werden in einem breit gefächertem Programm in insgesamt 28 Vorträgen versuchen, die Neugierde und den Wissensdurst der Besucher zu befriedigen.
Es besteht die Möglichkeit zur Absolvierung von LPI-Prüfungen zu besonders günstigen Konditionen. Ein Buchstand sowie 14 Infostände zu diversen Projekten (u.a. Debian, Funkfeuer Graz, Gentoo, Kubuntu, OpenOffice) sind vor Ort vertreten.
Dank der großzügigen Unterstützung der Sponsoren ist auch dieses Jahr die Teilnahme kostenlos!
Weitere Details unter linuxtage.at
Failed
April 8th, 2008Nice failure of a presentation setup (name of manufacturer blackend):
Another nice fsckup – seen at the webcam setup of an assembly line:
Three more nice failures at the same locations – though I can’t provide any pictures (first one containing too much sensible data, second one very bad picture quality and no picture captured at the third location), sorry. ;-)
Re: I am only mad on IRC
April 8th, 2008Martin, sorry for calling you Madduck on the debian.ch-mailinglist. Luckily I didn’t use that name during our meeting in Zurich last week. *pfuh* ;)
To take part in the pdo-game with my own name (being Michael Prokop ;-)): as many of you might know I’m known as Mika in the community. The name was invented for me around 1999 (IIRC) by a greek flat collegue who liked to call me “Mika” – refering to Mika Häkkinen (for whatever reason). From that on several people started to call me that way. I’m signing mails “to the community” with that nick since many years as well as using it in usenet and on freenode (IRC); on OFTC (another IRC network) I’ve to use mikap instead because mika was registered by another user already. Outside “the community” I’m usually known as Michael, good friends also use Michi and the family of my girlfriend uses Michl when the sister of my girlfriend (named Michaela and known as Michi as well) is present. Oh, and during grammar school I was AKA Proke.</secret> 8-)
So calling me Mika is perfectly fine because it’s a kind of uniqueness for me. There might be just too many Michaels around and at least in Austria my nickname is everything but common. Quoting the marketing department: Great trademark! ;) Oh and my speech parser knows to handle Michael, Michi and Michl as well – though it strongly depends on the situation, place, environment,…. Oh but using Proke is like talking to /dev/null – you’ve never heard of that name, ok?
Einladung zur Anytun release // party im Realraum
March 12th, 2008Via Otti:
Einladung zur Anytun release // party im Realraum
Freitag, 14.03.2008
Beginn: 19:30 Uhr
Ort: Realraum Graz
Vorstellung von Anytun um 20 Uhr
Anschließend PartyAnytun ist die Implementierung des Secure Anycast Tunneling Protokolls. Es bietet ein OpenVPN ähnliches Interface und erlaubt den Betrieb von redundanten VPN Clustern mit Load-Balancing. Das Hinzufügen und Entfernen von Servern wird über das Routing realisiert, daher sind keine Änderungen an den Clients nötig. Mit Hilfe von BGP kann dabei im Internet geografisches Load-Balancing auf Basis der kürzesten BGP Route realisiert werden.
Anytun ist Teil des Projekts Anycast VOIP Proxy, das von der IPA / netidee.at gefördert wurde.
google hack for your desktop: keyword correct
March 9th, 2008Do you know the situation where you just aren’t sure whether you are spelling a word the right way? If you know how to type the word pretty well, then a dictionary might work just fine. If you aren’t sure at all you might consider using Google’s ‘Did you mean’-feature. Check out a simple demonstration for the word Wondows, which could mean ‘Windows’. ;-) If you happen to use that google-feature just too many times you might be interested in my small hack:
wget -O google_correct.py http://grml.org/scripts/google_correct.txt
chmod +x google_correct.py
This small python script uses xsel (so it currently works only on systems providing xsel ;-)) to retrieve the currently selected word from your X selection, executes a google search and parses the output for the keyword inside the ‘Did you mean’ section. Finally it sets the corrected keyword as your current X selection. If you provide the keyword directly as an option, then the script just outputs the corrected keyword without touching your X selection so you can integrate it directly inside your $EDITOR as well as an option. This gives you the flexibility to use this feature globally(!) inside your preferred window manager. Select a word, press the keybinding for executing google_correct.py and now you’ve the corrected word available for further actions…
Finally don’t forget to put the affected word (after double-checking it using a real dictionary of course) into your $EDITOR’s dictionary to keep such “help m0m, I can’t sp3ll w0rds anymore” situations at a minimum. I’m using a personal dictionary file and ‘iab wondows windows’ inside Vim to fix spelling errors for words I’m unsure how to spell or which I always get worng.
A whishlist of further ideas/features for the script can be found in the header of the script itself. Further input welcome.
Wie man jemandem im Internet schaden kann…
March 9th, 2008Aufklärung startet im Kleinen, im Bekannten- und Verwandtenkreis. In einer Diskussion rund um die Vorratsdatenspeicherung und die immer verstärkter aufkommende Videoüberwachung habe ich verschiedene Szenarien aufgezeigt. Ein Szenario davon war, dass man durch Data-Mining und diverse Web 2.0-Dienste immer gläserner wird.
Und zwar muss man dafür gar nicht erst seine eigene Homepage ins Web stellen. Viele Leute wissen nämlich leider gar nicht, was man alles mit den passenden Suchmethoden über sie herausfinden kann. Einer meiner Brüder war der Meinung, dass es zu ihm nichts kompromitierendes im Internet gibt. Das stimmt soweit sogar auch. Seiner Meinung nach gibt er nur bekannt, was er auch bekannt geben will, denn er sei sich der Risiken des Data-Mining durchaus bewusst. Aber wer garantiert ihm, dass nicht doch etwas ungewolltes zu seiner Person vorhanden ist? Nicht öffentlich zugängliche Datenquellen einmal beiseite gelassen; aber kann jemand gezielt seine Person angreifen? Mehrere Personen in der Diskussionsrunde waren der Meinung, dass so etwas nicht so einfach geht. Ich wollte den Gegenbeweis antreten. Und zwar ohne Hijacking irgendwelcher (Web-)Accounts, sondern mit möglichst wenig Aufwand.
Ich habe daher vorgeschlagen, dass ich einfach einen simulierten Angriff auf seine Person im Web durchführe: eine Google-Suche zu seinem Namen ergibt zum Startzeitpunkt als 1. Resultat seine Photosammlung bei Flickr:
Soweit so gut und im Sinne von meinem Bruder. Aber gelingt es mir, innerhalb von einem Monat (so die vereinbarte Deadline, da alles darüber hinaus zu lange für einen realistischen Angriff wäre) bei der Suche nach seinem Namen eine potentiell kompromittierende Webseite unter die Top10 der Suchergebnisse bei Google (alles hinter der 10 ist grundsätzlich ja mal uninteressant) zu schummeln?
Am 4. Februar 2008 habe ich ca. 15 Minuten Zeit investiert: christoph.michael-prokop.at im DNS eingetragen, eine minimalistische Webseite unter Beachtung der einfachsten SEO-Tricks angelegt und dann um 01:45 Uhr an Google-AddURL gefüttert.
5 Tage später (9. Februar) dann ein Zwischenstand:
Und das war auch schon mein gewolltes Ziel: Es hat keine 5 Tage gedauert, um an Platz 7 der Suchergebnisse nach meinem Bruder eine quasi X-beliebige Webseite zu platzieren.
Die Auswertung der Logfiles ergibt, dass es nur sehr kurz gedauert hat, bis der Google-Bot das erste Mal vorbei geschaut hat: 04/Feb/2008:04:48:28 +0100
Dem aufmerksamen Leser wird auffallen, dass ich zwar christoph.michael-prokop.at angelegt habe, dass aber devnull.michael-prokop.at im Suchergebnis auftaucht. devnull.michael-prokop.at war der Default-Eintrag für die IP-Adresse meines Webservers (‘echo “GET /” | nc $IP 80’). Google hat darauf angeschlagen – testweise hab ich devnull.michael-prokop.at dann direkt auf christoph.michael-prokop.at umgebogen. Und wie erwartet hat Google das wiederum bestraft, wie eine aktuelle Suche nach meinem Bruder zeigt.
Selbstverständlich ist der Aufwand, um einen gezielten Angriff gegen eine Person mit einem sehr hohen Pagerank zu fahren höher. Es ist aber durchaus realistisch und machbar. Man erinnere sich nur an die “miserable failure” und “Inkompetenz” Google-Bomben. Die Ziele von so einem konkreten Angriff sind wohl seltener Prominente mit einem hohen Pagerank als die einfachen Leute: der laute Nachbar, die Konkurrenz bei der Jobsuche oder der Lehrer der ja ach so gemein benotet.
Fazit: Wette gewonnen. Mehrere Leute von den Risiken der Vorratsdatenspeicherung und der Videoüberwachung überzeugt. Und was soll ich über dich herausfinden, was du noch nicht weisst?
Linux Live-CD grml 1.1 – Codename Skunk
February 26th, 2008It’s done, we have new releases of grml, the Debian-based Linux Live-CD for sysadmins and texttool users:
It’s the first stable release being based on our new build-framework grml-live which itself is based on FAI (Fully Automatic Installation). Thanks to grml-live we can provide you a new grml flavour grml-medium which tries to close the gap between grml-small and grml.
As usual you’ll get software and kernel updates, many new packages and features plus additional hardware support. We are using LZMA compression for squashfs and provide several additional kernel modules like atl2, iscsitarget, madwifi and (for the first time) loop-aes. Oh and the grml release is known to work fine on the Asus Eee PC – LAN, WLAN and webcam working out-of-the-box! Find all the glory details about the new releases in above mentioned release notes or just visit grml.org.
For german readers there’s an article about the new release at pro-linux.de.
BTW: On the next weekend (1st and 2nd of march) we – the grml team) – will present the new release on Chemnitzer Linuxdays at the grml booth. grml-CDs, grml-shirts und (new!) “ready to go grml-usb-pens” will be available as well as the chance to talk to us in reallife. 8-)
So, we wish you a fast download and hope you enjoy the new release! :-)