Tuesday·30·August·2011
Useful but Unknown Unix Tools: Kill all processes of a user //at 22:15 //by abe
I already got mails like “What a pity that your nice blog posting series ended”. No, it didn’t end. As announced, I knew that I won’t be able to keep up a daily schedule. It worked as long as I had already written the postings in advanced. But in the end the last postings were already written just in time and then I ran out of leisure and muse for a time. But as I said: It didn’t end, it will be continued. And this is the next such posting.
Oh, and for those who tell me further tools, I should blog about: I appreciate that, especially because that way I also hear about tools I didn’t know about. But why just telling me and not blogging yourself about it? :-) At least those whose blog is part of Planet Debian or Planet Symlink anyway really should do this themselves. I’d really like to see also others writing about cool tools. I neither have a right on the idea nor on the name of this series (call it meme if you want :-), so please go on and publish your favourite tools in a blog posting, too. :-)
And for all those who want to join me and Myon blogging about cool Unix tools, independent if listed on Planet Debian or Planet Symlink, I encourage you to offer a separate feed for this kind of postings and join us on Planet Commandline.
Anyway, here’s the next such posting:
As system administrator you often have the case that you have to kill all processes of one user, e.g. if a daemon didn’t properly shut down itself or amok running leftovers of a GUI session.
Many use pkill -SIGNAL -u user
from the
procps package or killall -SIGNAL -u user
from the psmisc package for it. But that’s a) quite
cumbersome to type and b) is there a chance to forget about the -u and
then bad things may happen, especially with pkill’s default substring
match, so I prefer another tool with a more explicit name:
slay
slay has an easy to remember name (at least for BOFHs ;-)
which is even quicker to type (alternating one character with the left
and the right hand, at least on US layout keyboards) than “pkill” (all
characters to type with the right hand), and has the same easy to
remember commandline syntax like kill
itself:
slay -SIGNAL user [user …]
But beware, slay is…
… not only for BOFHs, but also from a BOFH
It has a “mean mode” which is activated by default. With mean mode on, it won’t kill the given user but the user who called the program if it is invoked as an ordinary user without root rights. *g*
Interestingly I never ran into this issue despite I use this program often and for many years now.
But some Ubuntu users did, probably because adding a
sudo
in front of some command is easier to forget than
doing an ssh root@localhost
or su -
beforehand. They even seem to be so desperate about it that they forwarded the issue
from Launchpad to the Debian Bug Tracking System. ;-)
But to be honest — even if I was very amused about those bug reports — isn’t this issue “grave”, as it causes very likely (unexpected) data loss?
Now playing: Monzy
— kill dash nine (… and your process is mine
;-)
Tagged as: blog, BOFH, BTS, kill, kill dash nine, killall, Launchpad, Lyrics, Now Playing, nuggets, Other Blogs, pkill, Planet Commandline, Planet Debian, Planet Symlink, procps, psmisc, slay, sysadmin, Ubuntu, UUUT
// show without comments // write a comment
Related stories
Wednesday·24·November·2010
Group packages by origin in aptitude //at 00:06 //by abe
I always wondered how others recognise non-Debian packages in the aptitude package tree. I also missed the additional priority level in the hierachy well-known from good old dselect.
For the last one, I quickly found out that you can set the priority as
subsection — it’s straight forward after you’ve read the
documentation: Just add ,priority
at the end of the
default grouping method for package views under “Options → UI
Options” in the aptitude menu.
Getting the origin as given in the Release file of the repository a
package originates from is a little bit more difficult. You need to
use the pattern()
group function with the appropriate
search pattern: pattern(~O)
Since already the default default grouping method for package views
doesn’t fit into the dialog, I nowadays just edit /etc/apt/apt.conf
directly for changes on
aptitude’s default grouping method for package views. It now looks
like this on several of my machines:
Aptitude::UI { Default-Grouping "filter(missing),status,section(subdir,passthrough),pattern(~O),section(topdir),priority"; };
In aptitude this looks like this:
[...] --- text - Text processing utilities --\ utils - Various system utilities --- Debian --- Mowgli --- volatile.debian.org --\ web - Web browsers, servers, proxies, and other tools --- Debian --- Opera Software ASA --\ x11 - The X window system and related software --\ Debian --- contrib - Programs which depend on software not in Debian --\ main - The main Debian archive --- Priority optional --- Priority extra --- non-free - Programs which are not free software --- Mowgli [...]
Unfortunately this doesn’t work with all non-Debian repositories since a few repository maintainer, e.g. those from Emdebian, arrogate to just keep “Debian” as their packages’ origin. This could be solved, if there’s a possibility to group by e.g. repository URL (host and/or path).
Another problem I haven’t solved yet is that grouping by origin does neither work with locally created nor virtual packages nor tasks — probably since all of them lack an origin. Those branches are just empty or don’t even show up anymore with this configuration. I probably have to dig a little bit more in the aptitude documentation to resolve this.
Now playing: E-Rotic — Max don’t have sex with your ex
Tagged as: aptitude, Debian, Emdebian, Etch, Mowgli, Now Playing, nuggets, Opera, Sid, Text Mode
// show without comments // write a comment
Related stories
Wednesday·05·March·2008
Is ikiwiki a Website Meta Language killer? //at 03:03 //by abe
On this year’s Chemitzer Linux-Tage (CLT, engl. “Chemnitz Linux Days’) I attended a few talks of which especially formorer’s ikiwiki talk was very interesting.
I attended his talk since I found out that ikiwiki is command line wiki compiler in contrary to the thousands of solely web based wikis out there. As a big fan of statically generated content this idea sounded very interesting to me.
But just having a short look at ikiwiki’s web page didn’t help to get started and it seemed as if I had not the right idea of how ikiwiki works to get started. So formorer’s talk seemed to be a good possibility to get an idea of how ikiwiki works without much effort.
During the talk I noticed that ikiwiki can many things I do with the Website Meta Language (WML), but can do some more things WML can’t do out of the box:
- It’s not only a framework to generate web pages, it’s more like a content management system (CMS).
- Versioning is intergal part of ikiwiki without reinventing the wheel: It works out of the box with — beyond others — Subversion, Git and Mercurical (Hg).
And when formorer showed that even Tobi Oetiker uses ikiwiki, I noticed that ikiwiki probably could be a WML killer, since I knew Tobi as a WML fan. And ikiwiki looks very appealing for the WML fan inside me, too…
OTOH: Intergrating WML as a backend to ikiwiki could be an interesting idea, though.
Hearing what kind of input files ikiwiki can process, I also got the idea of using hnb (Hierachical Notebook) files as input for ikiwiki. hnb files are already XML and so a conversion to XHTML shouldn’t be that hard.
But when searching the web for “ikiwiki hnb” I found the blog postings of a few people switching away from hnb, e.g. to vimoutliner. Since I’m an Emacs addict and don’t like vim very much (if I use a vi, I use nvi or elvis), I searched for “emacs hnb” and indeed found someone who switched from hnb to org-mode – of which I never heard before. Unfortunately org-mode doesn’t seem to be in Debian (Update 00:23: Yeah, yeah, I now know it’s included in emacs22, but emacs22 hasn’t made it into kfreebsd-i386 yet, so I didn’t notice. See the comments. :-) but I’ll play around with it a little bit. Unfortunately a first test wasn’t that promising. But we’ll see.
Now playing: Men at Work — Down Under
Tagged as: CLT, CMS, Debian, elvis, Emacs, Events, formorer, git, Hg, hnb, Ikiwiki, Mercurial, Now Playing, nvi, org-mode, Other Blogs, Perl, Subversion, vim, Wiki, WML, XHTML, XML
// show without comments // write a comment
Related stories
Tuesday·04·March·2008
XTaran, übernehmen Sie //at 23:04 //by abe
Von Priska kam da grade ein Stöckchen geflogen und da ich grade am Mittagfuttern bin, solche Fragekataloge eh meist recht amüsant finde, kann ich da auch grade mal übernehmen. :-)
- 1. Greife das Buch, welches Dir am nächsten ist, schlage Seite 18 auf und zitiere Zeile 4:
- Hmmm, schwierig. So direkt auf dem Büro-Schreibtisch liegt kein Buch mehr. Im Schubladencontainer liegt noch ein “Anwender-Handbuch Compaq LTE 386s/20 Personal Computer” für einen entsprechenden Laptop, den mein Chef mal bei mir entsorgt hat. Dient darin momentan noch primär als Briefbeschwerer, damit die Schublade zugeht. Ein Seite “1-18” gibt es nicht, also nehmen wir “2-18”. Zeile 4 ist eine Überschrift: “Anwendungsprogramme”. Die vierte Fließtextzeile lautet: “[Ein typisches Beispiel] für diesen Programmtyp ist eine Tabellenkalkulation (englisch: Spreadsheet). Mit einer [Tabellenkalkulation können z.B. …]”.
- 2. Strecke Deinen linken Arm so weit wie möglich aus. Was findest Du?
- Meine Schreibtischlampe, das Telefon und den linken Brüllwürfel.
- 3. Was hast Du als letztes im Fernsehen gesehen?
- Bei meinen Eltern in Schwarzenberg einen Biathlon bei der Winterolympiade. Und ja, ich habe ihn live gesehen. *grins*
- 4. Mit Ausnahme des Computers, was kannst Du gerade hören?
- Meine Kollegen, wie sie grade über irgendwelche Modem-Konfigurationen diskutieren.
- 5. Wann hast Du den letzten Schritt nach draussen getan?
- Als ich vor ca. einer Stunde zum Essen holen gefahren bin.
- 6. Was hast Du gerade getan, bevor Du diesen Fragebogen begonnen hast?
- Mein Mittagessen angefangen.
- 7. Was hast Du gerade an?
- Blaue Jeans, Wanderstiefel, ein weißes Orga-T-Shirt von einem Ententreffen der Einkorn Wildenten. Das übliche halt.
- 8. Hast Du letzte Nacht geträumt?
- Nein, tief und fest geschlafen.
- 9. Wann hast Du zum letztenmal gelacht?
- Als ich heute morgen verstanden habe, daß den Tippfehler in einer Symlink-Submission zuerst mal komplett falsch interpoliert hatte.
- 10. Was befindet sich an den Wänden des Raumes, in dem Du Dich gerade befindest?
- In meinem Sichtbereich nix, weiter drüben hängt ein Conrad-Wandkalender.
- 11. Hast Du kürzlich etwas sonderbares gesehen?
- Beim Essen holen im McDoof einen Kindergeburtstag, auf dem die Hälfte der Jungs eine mit Gel erstellte, irokesenähnliche, rote Frisur hatte.
- 12. Was hälst Du von diesem Quiz?
- Hmmm, mal was anderes, da es sehr viel unvorhersehbares einfließen läßt.
- 13. Was war der letzte Film, den Du gesehen hast?
- Montag abend: “V wie Vendetta”.
- 14. Was würdest Du kaufen, wenn Du plötzlich Multimillionär wärst?
- Hmmm, schwierige Frage. Vermutlich noch ein paar alte Autos mehr und den Platz zum Abstellen derselbigen, einen Bauernhof mit großer Scheune und guter Netzanbindung zum Beispiel. ;-) Und dann wahrscheinlich noch irgendwelche politisch korrekten Sachen oder Mitgliedschaften.
- 15. Sag mir etwas über Dich, was ich noch nicht wusste.
- Ich konnte nicht umhin, irgendwann Pringles-Dosen anfangen zu sammeln.
- 16. Wenn Du eine Sache auf der Welt ändern könntest, was wäre das?
- Sämtliche Großmächte in lauter kleine, harmlose Staaten zerfallen lassen.
- 17. Tanzt Du gerne?
- Im Allgemeinen nicht.
- 18. George Bush
- Miserable Failure und Brezeln.
- 19. Stell Dir vor, Dein erstes Kind wäre ein Mädchen. Wie würdest Du es nennen?
- Wahrscheinlich irgendeinen in Norddeutschland, Skandinavien oder der Schweiz typischen Vornamen. Den Namen einer guten Bekannten finde ich recht nett: Mömke — Allerdings haben den IIRC sich die Eltern selbst ausgedacht in Anlehnung an irgendeinen nordischen Jungennamen, den ich wieder vergessen habe. Halt bloß nix typisch Deutsches oder total Exotisches. (Einer der Mechaniker in meiner Lieblingwerkstatt heißt Tai mit Vornamen. Die Mutter ist Asien-Fan. Das wäre nach meinem Geschmack wieder etwas zu exotisch.)
- 20. Und einen Jungen?
- Für den gilt das gleiche. Also keinen Jungen namens SuSI —äh— Susi.
- 21. Würdest Du es in Erwägung ziehen, auszuwandern?
- Ich bin grade dabei. Naja, falls 30km hinter die Grenze ziehen als Auswandern gilt. ;-) Aber auch sonst: Ich war mal kurz davor, nach Oslo zu ziehen. Dänemark ist auch recht nett, Neuseeland ebenfalls reizvoll. Andererseits: Irgendwo hinzuziehen, wo ich niemanden kenn, keine Freunde habe, das wäre vermutlich nicht so mein Ding. (Und ja, selbst in Oslo hatte ich damals Freunde.)
- 22. Was würdest Du Gott sagen, wenn Du das Himmelstor erreichst?
- “Oh, Dich gibt’s doch?”
- 23. Zwei Leute, die das hier auch beantworten sollen.
- Dieter Schlabonski, nachdem er ja nun auch ein Blog hat *evilgrin* und, hmmm, Eric.
Achja, ich hab diesen Blog-Eintrag in Etappen geschrieben. Also nicht über den Zusammenhang zwischen Posting-Uhrzeit und daß ich grade zu Mittag futtere wundern. ;-)
Now playing: Eläkeläiset — Humpaton joulu
Tagged as: Agnosticism, Atheism, Auswandern, Compaq, Dubya, Jeans, Kino, McDoof, Meme, Now Playing, Other Blogs, Pringles, Quiz, Schwarzenberg, Schweiz, Stöckchen, Symlink, Tanzen, TV, weißes T-Shirt, Winterolympiade
// show without comments // write a comment
Related stories
Following Bleeding Edge Software and still using Debian Stable //at 23:04 //by abe
Many Linux fans know that Debian Stable usually already lost the “b” when it’s being released. ;-) What seems not so well known (especially not by some DesktopBSD Marketing guy at last year’s LinuxDay.at :-) is that there is really a lot of people who really like this “stale” software collection — because it’s rock solid — especially compared to the ports in FreeBSD or DesktopBSD *evilgrin* which unnecessarily follow every new feature upstream introduces. This is really annoying in a server environment where you want as less changes as possible when updates are necessary due to security issues. My personal favourites here are Samba and CUPS. *grmpf*
Although I belong to those people who run Debian Stable even on brand-new hardware, I sometimes have to use the newest beta or alpha versions of some software to get it even only running. And doing so is fun but feels strange somehow, though. Currently I follow the pre-releases of three software makers quite close, due to a new laptop:
At the beginning of last semester I bought a brand-new Lenovo ThinkPad T61 (2,2 GHz Intel Core2 Duo T7500, 4 GB RAM, 160 GB HD, 1440x900 14” Widescreen) without preinstalled operating system (possible thanks to the ETHZ Neptun Project) and installed — of course — 64-bit Debian Stable on it.
While the Debian Installer from Etch worked fine even on such new hardware, not all features worked out of the box because some components were just too new.
So the first thing I did was installing 2.6.22 from Backports.org, quickly moving farther to vanilla 2.6.23. Nearly everything I needed worked except the wireless network card. It needs the iwlwifi driver which is officially in the Linux kernel starting at the upcoming 2.6.24 (said to be released during the next few days). So I run 2.6.24 pre-releases on the laptop since the first release candidate, always eagerly waiting for either the next RC or the final release. (And 2.6.24 looks impressively stable to me — even since the early release candidates. :-)
I even got the fingerprint reader working for login and sudo (but not xscreensaver) using libthinkfinger backported to Etch from Debian Experimental. I’m just not sure if this is a good idea since the back of the screen already has enough of my fingerprints on it. ;-)
The next software of which I’m currently running an alpha version is 64-bit Opera 9.50 (aka Kestrel, available at snapshot.opera.com) because no earlier Opera version is available for 64-bit Linuxes. Here I had different experiences: The builds from October and November were already quite stable, but since December it crashes usually several times a day.
At work I also run the 64-bit Opera on my workstation, but stalled updating it when I noticed that it became so unstable. So my Opera at work has currently an uptime of nearly four weeks — and would have probably more if I hadn’t rebooted my workstation in Mid-December.
Somehow this hunting for new versions and eagerly waiting for every new (pre-)release makes me really fidgety sometimes. And my understanding for people doing this for there whole userland or even operating system has grown, but I still prefer to have stale but stable software on all my productive machines, even on my laptop — just with some few and handpicked excpetions.
The third but less thrilling thing I’m following are nVidia drivers for X. Since the free nv driver of X.org doesn’t support (and not only just doesn’t know) my graphics card yet and nouveau isn’t ready yet, I run the binary only and closed source driver from nVidia, waiting for that one release which supports Xen since I really would like to run a Xen guest with Debian Unstable for testing purposes and package building on my laptop. Until then I have to content myself with the much more unwieldy QEMU respectively KVM.
Anyway, I’m very happy with the T61 and Debian Stable and can easily connive at the few not (yet) perfect issues like missing Xen support by nVidia, broken ad-hoc mode in the wireless card, no internal card-reader (as announced in the Neptun specifications) and no native serial port.
Some useful links regarding the subject of this post:
- Linux Weather Forecast
- Opera Desktop Team
- Nouveau: Open Source 3D acceleration for nVidia cards
- ThinkWiki
Now playing: Jean Michel Jarre — Rendez-vous à Paris
Tagged as: 2.6.18, 2.6.22, 2.6.23, 2.6.24, 64 bit, binary only driver, c-crosser, Core2 Duo, CUPS, Debian, DesktopBSD, Etch, ETH Zürich, Events, Experimental, FreeBSD, KVM, Linux, Linuxday.at, Neptun Projekt, Nouveau, Now Playing, nVidia, Opera, QEMU, Samba, Sid, T61, ThinkPad, Xen
// show without comments // write a comment
Related stories
Wednesday·10·October·2007
Plugins in the Blosxom Project CVS //at 00:34 //by abe
Since yesterday, my Blosxom plugins are versioned in the Blosxom Project CVS repository together with those of most other Blosxom developers.
Cause for this is, that — besides first steps towards Blosxom v4 (we better forget about v3… ;-) and intergrating existing patches (e.g. the Debian config file patch) to Blosxom v2 — the Blosxom developers want to release a Collection of common Blosxom Plugins as a Plugin distribution so that no one needs to gather the often needed plugins from various sites on the net but get them from first hand and also in some kind of a supported way. A first release candidate is on it’s way.
And for those who thought good ol’ blosxom is dead: There never was so much traffic on the blosxom developer’s list like in the past two months — over 160 mails each!
Now playing: Eiffel 65 — Blue
Tagged as: Blosxom, Blosxom Plugin, Blosxom v4, CVS, Hacks, Now Playing, Perl, SourceForge
// show without comments // write a comment
Related stories
Monday·25·September·2006
Suizid im Stadtgebiet //at 14:57 //by abe
Liebe (anderen) Velofahrer und -fahrerinnen von Zürich,
egal, wie multimobil ihr seid: Autofrei heisst weder hirn- noch beleuchtungsfrei.
Manchmal habe ich echt das Gefühl, in Zürich gibt es mehr hirnlose Velofahrer als hirnlose Autofahrer. Autofahrer ohne Licht sind dort nachts jedenfalls recht selten, aber Velofahrer ohne Licht sind nachts in Zürich eher der Normalfall. (Naja, spätestens im Triemli gibt’s dann hoffentlich einen Merkbefreiungsentzug.)
Hmm, ab wann Veltheim wohl auch Fahrsicherheitstraining für Velofahrer anbietet? Notwendig wär’s ja anscheinend.
Veltheims Palette für die motorisierten Verkehrsteilnehmer ist jedenfalls schon recht umfangreich, wie die LUGS heute mal wieder bei ihrem regelmässigen Schleuder-Event (leider diesesmal parallel zu multimobil und dem Klausenrennen) feststellen durfte.
Diesesmal war ich übrigens mit der Ente dabei, welche sich mit ihren 28 PS wider Erwarten sehr wacker geschlagen hat und durch ihre angsteinflössende Kurvenlage (Bilder und Filmli bei Priska) und entsprechenden Reifengeräuschen für die einen oder anderen beeindruckten Gesichter gesorgt hat. (Oder waren’s eher besorgte Gesichter?)
Now playing: J.B.O. — Schlumpfozid im Stadtgebiet
Tagged as: 2CV, Automobiles, AVI, Citroën, Idiot, Klausenrennen, Licht, LUGS, Merkbefreiung, multimobil, Now Playing, Other Blogs, Radfahren, Veltheim, WTF, Zürich
// show without comments // write a comment