Erlang: Install R16B or R16A on Ubuntu or Debian via apt-get

I ran into a problem where erlang R15 had some segfaults i could not determine. In the #erlang Channel on Freenode i was told to try the newest R16B release of erlang. Instead of building R16B myself with configure and make, i searched for a deb repository and found one at erlang-solutions.com.

Check out this site, there is a howto for debian and rpm based distributions:
https://www.erlang-solutions.com/downloads/download-erlang-otp

Proxmox: ‘exit code 60′ – corrupt quota file

Every now and then i get some mails from my hosters monitoring that something at my server is not running. As always i have a look and this time stumbled across this problem.

The VM could not be started, which resulted in this log output.

Searching for ‘exit code 60′ brought me on the right tracks. The solution was to use this commands:

The problem seems to be a “corrupted” quota file, because the VM has not been shut down correctly and the quota file still assumed the VM was running.

SSHFS: Relative and absolute target path

I recently had to mount a system with sshfs and ended up with a error.
Aim was to mount the folder ‘backups’ in the home directory of the user ‘bob’.

The error seems confusing at first, but does say exactly what is wrong.
Solution would be using this target path:

As you can see, the first slash of ‘backups’ is gone. This is correct, because after the ‘:’, a absolute path can be given to sshfs for mounting. In my case, i wanted to work relative to the user home directory, so i simply hat do ommit the first slash.
Hope this helps someone.

Linux: Monitoring Cronjob for apt-get and SMART

I am using this cronjob for monitoring updates and SMART values.

File: “/etc/cron.d/monitoring”

Dont forget to reload cron!

You will need this package: “smartmontools” for “smartctl”.

The output will be send via mail at root. You can configure that in “/etc/aliases” and then running “newaliases”.

Bash: Solve ‘Argument list too long’ with xargs

I recently got the error “Argument list too long” when trying to remove many files in a folder:

Simple solution:
If all the files do not contain whitespace or special chars, this will work:

Otherwise you you need a solution with special handling of filenames.

Pidgin: ‘Fix’ for Bug #12238 with error “corrupt … blist.xml”

I use Pidgin for some IRC channels but there is a problem with some channels with special chars in their channel topic text. There seem to be some special chars that are used for colors and similar, but pidgin does not handle them correctly in the xml files like blist.xml (buddylist).

More about that bug in this tickets:
https://bugs.launchpad.net/ubuntu/+source/pidgin/+bug/326425
and
http://developer.pidgin.im/ticket/12238

My fix for the bug: Creating a start script for pidgin, that converts the badly escaped stuff in the xml files:

CentOS 6.2: Make eth0 work with DHCP

I recently installed CentOS 6.2 in a VirtualBox and was pretty astonished, because it did not have networking or a eth0 working.

You need to change this file:
/etc/sysconfig/network-scripts/ifcfg-eth0
to this:
ONBOOT="yes"
NM_Controlled="no"
BOOTPROTO="dhcp"

More info about that problem:
http://it.toolbox.com/blogs/linux-gnu/configuring-the-ethernet-nic-in-centos-6-rhel-6-scientific-linux-6-48390

Configure eth0:
http://www.cyberciti.biz/faq/linux-configure-a-static-ip-address-tutorial/

Linux: Use Git to backup/store /etc directory

If more than one person has to manage a server, it might come in handy to have some kind of versioning of the config files.
But also having the possibility to keep track of local configuration changes in your system could be very usefull.

I found 2 tools that can help you:

1. etckepper
http://joeyh.name/code/etckeeper/

etckeeper is a collection of tools to let /etc be stored in a git, mercurial, darcs, or bzr repository. It hooks into apt (and other package managers including yum and pacman-g2) to automatically commit changes made to /etc during package upgrades. It tracks file metadata that revison control systems do not normally support, but that is important for /etc, such as the permissions of /etc/shadow. It’s quite modular and configurable, while also being simple to use if you understand the basics of working with revision control.

2. Changetrack:
http://changetrack.sourceforge.net/

Changetrack logs modifications of a set of files, and allows recovery of the tracked files from any stage of development. The changes are presented in a powerful web-based form, a text file, or an email message. A handful of options allow situation-specific configuration, but the code is readily available for more complex modifications.