Category: Linux

Gotcha’s of command-line tools

I came across this recently, and I think it’s worth sharing. It outlines gotchas of commonly used commandline tools and arguments such as when ‘rm -rf’ doesn’t remove a directory, and how to get around it, or when ‘wc -l’ fails to count the last line in a file. http://www.pixelbeat.org/docs/coreutils-gotchas.html

RabbitMQ, memcache, and too many socket connections

What happens when you have hundreds of services connected to RabbitMQ and memcache, and those services have a bug that causes them to keep their previous socket connections open, and repeatedly reconnect to RabbitMQ and memcache? They crash. It occurred to me that one can prevent too many connections using iptables on the RabbitMQ and […]

ip and ss: better than ifconfig and netstat

I’ve been using Linux for a while now, so typing certain commands is fairly ingrained, like ‘ifconfig’ and ‘netstat’. I know about “ip addr”, which is more modern than ifconfig, and I use it sometimes. This week, I learned about ‘ss’, which is faster than ‘netstat’, and does more. My favorite invocation is “ss -tlp” to […]

Ubuntu, ecryptfs, and changing password

I changed my password on my Ubuntu system this week, and then found that I couldn’t log in, except on a virtual terminal. My home directory is encrypted, and apparently, it’s better to change a password using the graphical utilities, rather than the command line utilities. The following article was quite helpful in recovering: http://askubuntu.com/questions/281491/cant-log-in-after-password-change-ecryptfs

OpenWest notes

This past weekend, I attended the excellent #OpenWest conference, and I presented Scaling RabbitMQ. The volunteers that organized the conference deserve a huge amount of thanks. I can’t imagine how much work it was. I should also thank the conference sponsors. A local group of hardware engineers designed an amazing conference badge, built from a circuit […]

Linux, time and the year 2038

Software tends to live longer than we expect, as do embedded devices running Linux. Those that want to accurately handle time through the year 2038 and beyond will need to be updated. Fifteen years after Y2K, Linux kernel developers continue to refine support for time values that will get us past 2038. Jonathan Corbet, editor of LWN.net, explains […]

Containerization – the beginning of a long journey

I read this today, and thought it’s worth sharing: “The impact of containerization in redefining the enterprise OS is still vastly underestimated by most; it is a departure from the traditional model of a single-instance, monolithic, UNIX user space in favor of a multi-instance, multi-version environment using containers and aggregate packaging. We are talking about […]

Ubuntu and .local hostnames in a corporate network

In the past, I’ve had trouble getting my Ubuntu machine to resolve the .local hostnames at work. I didn’t know why Ubuntu had this problem while other machines did not. When I did a DNS lookup, it failed, and ping of host.something.local failed. Yet ping of the hostname without the .something.local extension worked. Odd. I […]

Grepping archived, rotated log files — in order

Say you’ve got the following log files with the oldest entries in myapi.log.3.gz: myapi.log.1.gz myapi.log.2.gz myapi.log.3.gz If you want to ‘grep’ them for a string, in order of date, oldest to newest, there’s no need to extract them one at a time, and there’s no need to concatenate the files first. Use sort to put […]

Ubuntu Unity application launchers for IntelliJ IDEA and PyCharm

Here’s how I got Ubuntu Unity to show application launchers for >IntelliJ IDEA and PyCharm In $HOME/.local/share/applications, add an IDEA.desktop file with these contents: #!/usr/bin/env xdg-open [Desktop Entry] Version=13 Name=IntelliJ IDEA GenericName=Text Editor Exec=/home/YourHomeDirectory/idea-IC-135.480/bin/idea.sh Terminal=false Icon=/home/YourHomeDirectory/idea-IC-135.480/bin/idea.png Type=Application Categories=TextEditor;IDE;Development X-Ayatana-Desktop-Shortcuts=NewWindow Icon[en_US]=/home/YourHomeDirectory/idea-IC-135.480/bin/idea.png And a PyCharm.desktop file: #!/usr/bin/env xdg-open [Desktop Entry] Version=3 Name=PyCharm Exec=/home/YourHomeDirectory/pycharm-3.0.1/bin/pycharm.sh Terminal=false Icon=/home/YourHomeDirectory/pycharm-3.0.1/bin/pycharm.png Type=Application Categories=TextEditor;IDE;Development X-Ayatana-Desktop-Shortcuts=NewWindow […]