My configuration for bash, vim, git, tmux and a few other tools can be found on GitHub now.
I have spent a considerable amount of time to get them working on OS X and Linux.
(Tested on Mac OS X Yosemite 10.10.3 and Debian 7.8 – YMMV!)
Month: April 2015
Set tmux pane title on SSH connections
I am frequently connecting to several servers over SSH at once and like to use tmux to organize those different sessions. To be able to keep track which pane is which server I am using the following function in my .bashrc
file to display the machine name in tmux’s pane title.
https://gist.github.com/florianbeer/ee02c149a7e25f643491
Waiting for a server
Today two of my servers went down. It turned out, that the datacenter they are hosted in had a slight connectivity hiccup – nothing serious. While I was battling my monitoring system and frantically typed support tickets, I wanted an audible alert if the hosts where reachable again in the meantime.
That’s when I thought of OS X’s text to speech system and devised the following little shell script.
https://gist.github.com/florianbeer/8c1e0a56bc306d603987
It will announce that the host is back up with your configured standard voice as soon as there is a ping response and then quit. Just copy it in your .bashrc
file call it with the desired hostname or IP address, leave it running in a Terminal window in the background and turn up your speakers.
hostup no-panic.at
Inspecting logfiles on the commandline
One of my most used means of monitoring what’s going on at a remote Linux server, is looking at the log lines that each daemon or client program writes to the disk. Using this technique you can see a real time view about what is happening and find out if there are any outstanding errors or optimizations in your configuration. I am going to show how I tackle this task and what tricks I use to make tons of lines of dull text more readable.
My backup strategy
Recently I’ve had to re-engineer my whole backup strategy because of a looming hardware issue on my old backup server. Since I am operating servers at Hetzner, I purchased some backup space there and based my new system around their available system. The new strategy consists of several key components: