Posts tagged with “unix”

Monit style alerts for Systemd

TL;DR

I created a ruby gem to provide email and slack notifications for Systemd services, which gives visibility over process stops, starts, restarts and reloads. This post documents why and how.

I also need some testers, so if this is relevant to you please give it a go and send the appropriate feedback.

Read more →

Impress your friends with this UNIX terminal setup

My UNIX terminal configuration has gradually evolved over the last couple of years, and I finally feel like I’m happy with the setup. In short, I use Tilda for my terminal, Zsh (with Oh My Zsh) as my shell and tmux as a multiplexer. This post explains why, and how, to set it all up, making you the envy of all your friends and colleagues.

Read more →

Understanding ssh-agent and ssh-add

You may have come across the following message when doing some operation that uses your private key, such as working with git or ssh:

Read more →

What you need to know about bash functions

Bash, as a scripting language, can be a bit painful sometimes. It doesn’t have good distinction between variable types, it has strange syntax for functions and the syntax for statements (such as if/while/case) is unintuitive and inconsistent. Having said that, you can rely on shell script being available on any Unix machine, and bash is almost as prevalent. Therefore, it’s often the best choice for scripting.

Read more →

Wait for a unix process to finish

I sometimes find myself in the situation where I have a command running in my terminal, and want to run another command only after the first has finished. I’m pretty forgetful, so I don’t want to come back later and start the new command.

Read more →

Finding the process ID (PID) of a command in unix

Getting the PID of a running command is something I do daily, particularly by grepping on the name, e.g.:

Read more →