Moved blog

My VPS on Contabo started to act funny, probably they overloaded their KVM hosts. I started to see messages like "[27941.674540] sh (9100): drop_caches: 3" on dmesg (totally not cool bro). So I've switched to DigitalOcean. Thanks to systemd-nspawn, moving entire system was really easy: rsync one big data file, mount it and start the container.

Read more →

Seems like only reasonable way to use "dbx" tool (like dbx -a PID and issuing proc rlimit inside attached dbx). But somehow everyone just "quit"s dbx and sending SIGTRAP to process. Only if there is a way that you can "detach" before. Maybe this is new to AIX (probably came with 6, I'm still a rookie on AIXland) but it seems possible with "detach" command in dbx.

Read more →

If you tried this topic and didn't help, you're probably using gentoo. I came across this bug with ~5.3.1. Stracing gave me following sequence: What the hell? Looking for kde pam module and skips right to "other", which denies auth without a question. If you have the same problem, try symlinking: ln -s /etc/pam.d/system-auth /etc/pam.d/kde

Read more →

I've discovered systemd added a container utility called systemd-nspawn. It's basically chroot on steroids. (No, don't think Docker) I decided to give it a shot even they don't consider it stable yet. I tried to implement encryption a bit. Data normally sitting duck on bare-metal unencrypted servers (mainly because encryption seems hard or you trust your data center & country). If someone reboots the server and adds "rescue" to grub kernel line, (s)he will get a root user prompt, bye to personal/commercial sensitive info!

Read more →

.htaccess

[Link to original xkcd]

Read more →

Drop the Dropbox

I've closed my Dropbox account (you might guess the motive behind it) and migrated my files to my fresh-installed OwnCloud 7. Configuring owncloud is still kind of pita. Here is the configuration file for Nginx/PHP-fpm virtualhost. Also follow this documentation to prevent bruteforce attacks to owncloud.

Read more →

Couldn't find an easy & reliable way to check if memcached is running (for HA tools). Current check scripts on the net are generally stalling when memcached hits to maximum connections. So I wrote a dirty script that timeouts after 1 second on unsuccesful try. It's ugly but you get the idea. Why if ? Because my version of netcat wasn't exiting with correct error status on timeout for some reason.

Read more →

Ext3 has 30K directory limit inside one single directory and I needed to create ~180K. Crap, I need another filesystem, which might be ext4, xfs or something like it. But I can't shutdown a production server or plug another disk. So I created one file which is big enough for my needs (let's say 100G): truncate -s 100G my_ext4_blockfile Let's format the file: mkfs.ext4 my_ext4_blockfile Now, you can mount the file wherever you like:

Read more →

I have an old-ish Sony VAIO netbook (this) which has few broken buttons on keyboard (I probably shouldn't open the case). This thing has 1.83GHz Atom CPU (yay! calculator!) and 2G RAM. This thing was sitting on the shelf since I realized that I can't bear the low CPU power. Lately decided to use it for something, but what? After little playing around, now it's really doing something as a low-powered (I hope), 7/24 open home server!

Read more →

I don't know why you exactly use --depclean for, but I just wanted to have a quick lookup which packages were safe to remove. Then I saw "Number to remove: 350". Hehe. That might be "safe" to remove but the system won't be same after I delete kde-base/kdm etc. I didn't want to deal with "searching on gentoo forums" stage and wrote a dirty one liner to see which packages are "really" the last one on the dependency tree.

Read more →