Emergency reboot/shutdown using SysRq

As you know linux implements some type of mechanism to gracefully shutdown and reboot, this means the daemons are stopping, usually linux stops them one by one, the file cache is synced to disk.

But what sometimes happens is that the system will not reboot or shutdown no mater how many times you issue the shutdown or reboot command.

rsyslog centralized logging

First of all logging is really important, and are a critical part of any system, they will give you insight into what a system is doing as well what happened.

Virtually every process running on a system generates logs in some form or another. When your system grows to multiple hosts, managing the logs and accessing them can get complicated.

Searching for a particular error across hundreds of log files on hundreds of servers is difficult without good tools.

A common approach to this problem is to setup a centralized logging solution so that multiple logs can be aggregated in a central location.

Upgrade Plesk 11.5 to Plesk 12 on Debian Wheezy 7.6, fixing OpenDKIM and DK

I wanted to upgrade to the newer edition of Plesk as it has some interesting features for controlling outgoing mail that make my life easier. So I wanted to upgrade and ran into some weird issues during the upgrade.

tmux logging complete output to a file

I’ve needed to log the complete output of a node.js process I’ve been running, even though I’ve been logging everything, there are some situations where the process completely crashes and nothing was logged.

RVM + GitLab on Debian

I needed to install my own GitLab on my server for my personal projects, so I don’t have to use GitHub and pay for it. This will require some work, but in the end you will save some money.

Before proceeding lets install some prerequisites.

KVM port forwarding with NAT network and libvirt on Debian

I needed to forward some ports from multiple KVM machines, I tried with iptables, but the problem is libvirt adds some rules of it’s own, and the rules were never in the correct place so it didn’t work.

Fortunately KVM supports hooks, and we can use them to do what we need.

You should be able to easily adapt this to any linux distro.