The #Swap case

In case you need more swap and can’t create new partitions, here is a trick. We’re using and adding, in this case, 512MB of swap file to the box swapfileX where X is an integer >= 1 $ dd if=/dev/zero of=/swapfileX bs=1024 count=524288; chown root:root /swapfileX; chmod 0600 /swapfileX; mkswap /swapfileX; swapon /swapfileX To make […]

The magic of #strace

A collogue of mine showed me some magic today. Here is the magic command: strace -ttt -fff -o rm rm /tmp/t The result is like magic: 1455022679.446613 execve(“/bin/rm”, [“rm”, “/tmp/t”], [/* 22 vars */]) = 0 1455022679.446786 brk(0) = 0x19f4000 1455022679.446808 access(“/etc/”, F_OK) = -1 ENOENT (No such file or directory) 1455022679.446829 mmap(NULL, 8192, PROT_READ|PROT_WRITE, […]

/run/user/$uid and #systemd

Interesting and neat trick from systemd   /run/user/$uid is created by pam_systemd and used for storing files used by running processes for that user. These might be things such as your keyring daemon, pulseaudio, etc. Prior to systemd, these applications typically stored their files in /tmp. They couldn’t use a location in /home/$user as home […]