Author Archives: Erik Ljungstrom

About Erik Ljungstrom

I'm Erik Ljungstrom and I work in a datacenter as a technical team leader. In this blog I will mostly jot down things I consider noteworthy things I encounter in my work. For more information, please see http://northernmost.org

How does MySQL hide the command line password in ps?

If you do decide to write an application which takes a password (or any other sensitive information) on the command line, you can prevent other users on the system from easily seeing it like this Continue reading

Posted in misc, MySQL | Leave a comment

Font rendering – no more jealousy

f you like me is an avid Fedora user, I’m sure you’ve thrown glances at colleague’s or friend’s Ubuntu machines and thought that there was something that was slightly different about the way it looked (aside from the obvious Gnome vs Unity differences). Shinier somehow… So had I, but I mainly dismissed it as a case of “the grass is always greener…”. Continue reading

Posted in misc, Sundry sysadmin | Leave a comment

Transactions and code testing

A little while ago I worked with a customer to migrate their DB from using MyISAM to InnoDB (something I definitely don’t mind doing!) I set up a smaller test instance with all tables using the InnoDB engine as part … Continue reading

Posted in MySQL | Leave a comment

Find out what is using your swap

Have you ever logged in to a server, ran `free`, seen that a bit of swap is used and wondered what’s in there? It’s usually not very indicative of anything, or even overly helpful knowing what’s in there, mostly it’s a curiosity thing.
Either way, starting from kernel 2.6.16, we can find out using smaps found in the proc filesystem. I’ve written a simple bash script which prints out all running processes and their swap usage. Continue reading

Posted in Sundry sysadmin | 25 Comments

Example using Cassandra with Thrift in C++

The only somewhat useful example of using Cassandra with C++ one can find online is this, but due to the API changes, this is now outdated (it’s still worth a read).
So in the hope that nobody else will have to spend the better part of a day piecing things together to achieve even the most basic thing, here’s an example which works with Cassandra 0.7 and Thrift 0.6. Continue reading

Posted in misc | 1 Comment