(as)  [sysadmin] [blog]

 

SysAdmin'ish Blog

Äpfel und Birnen

Ein User kommt zum Sysadmin und fragt nach Obst.
Der Sysadmin sagt, wir haben Äpfel und Birnen,
alles andere seien Granaten.
Der User antwortet, sie wolle Granatäpfel.

So weit so gut, jeder Sysadmin kennt das zur Genüge.

Nach einem weiteren erfolglosen Erklärungsversuch
nimmt der Sysadmin einen roten Apfel,
spickt ihn mit Rosinen und nennt ihn Granatapfel.
Der User ist vorerst zufrieden.

Das eigentliche Problem aber ist,
dass sie möglicherweise mit dem Granatapfel
Gewisses im Schilde führt.

Und dann könnte sich der Rosinenapfel
schnell zu einem bitteren Bratapfel entwickeln
(um nicht zu sagen Rohrkrepierer).

Ich mag Granatäpfel nicht; einfach weil sie mir nicht schmecken. Aber dass ich sie eines Tages als Sinnbild für verlorenes Vertrauen verwende, überrascht mich doch.

Entry first published 2011-11-22.

#!/bin/sed arguments

Using more than 1 argument (i.e. anything besides -f) in self-contained shebang style sed scripts might not work. The solution is to combine the arguments like in

#!/bin/sed -nuf
/Hello world/p

>/dev/null, but do it fast

If a script or program produces lots of output, generally, a reduction of the amount of output will make things run faster. The most radical reduction often seen at the command line is a redirection to /dev/null. However, this can be done in various ways with rather varying results.

Bash shell startup files in Debian Squeeze

Whenever I need to research which files are actually read or executed to set up the Bash environment at startup my brain refuses to cooperate. So, I ran my own tests on a fresh new installation of Debian Squeeze.

Overview table

Shell type /etc/profile /etc/bash.bashrc ~/.profile ~/.bashrc
Login shells X X X X
Interactive non-login X X
Non-interactive
/bin/bash --posix
/bin/sh --login X X X X
/bin/sh

Non-interactive shells either source $BASH_ENV, or in POSIX mode $ENV.

Vertical, sliding panel with auto-hide v2

Soon after I wrote about Vertical, sliding panel with auto-hide I had the idea for a more robust version. So, for the fun of trying to figure out how it might work, here is a vertical panel, automatically sliding out of the right side, and disappearing upon a click or after the mouse pointer leaves the panel.

A jumpy road with load

On June 4, I upgraded Debian on one of my servers from "Lenny" to "Squeeze". Before the upgrade, system load of this server was generally low, mostly below 0.1. Once Debian Squeeze was running I quickly observed that the server load was significantly higher. During the following 7 days I reconfigured the server back down to the old load level.

Don't trust your UPS

My idea of a basic manual UPS test

  1. Shutdown all connected computers and switch them back on but make sure they do not boot. All other external equipment (network switches, routers, USB stuff etc.) should be switched on, too.
  2. Then pull the mains plug and let the UPS run on batteries for 3-5 minutes. (How long one wants to wait, actually, depends on the capacity of the UPS. Generally, the manuals recommend to not discharge the batteries as this will decrease their capacity.)
  3. If all is fine switch off the UPS (of course, this kills the power of all connected devices) and switch it back on. Your servers should start automatically (unless they are configured otherwise).
  4. Plug in the UPS again! (For the sake of safety you'd rather be quick.)
  5. Check the UPS battery charge level. Ideally, it should be somewhere between 60–99%, again depending on your UPS' capacity.


 
blog/index.txt · Last modified: 2011/11/22 20:18 by andreas