Systems Administration

This section will, for now, contain tips and tech info about systems administration. I'm using it as sort of a scratch pad but as it gets larger expect some sort of organization.

Professor Frink and the Gambletron

Little Stuff

To get a list of running processes, sorted in reverse order by the process's resident set size, run this:

ps aux --sort rss

To manually remove an IP address from an interface in Linux, use the "ip" tool.

ip address del 172.20.201.100/24 dev eth0

This has nothing to do with systems administration, but I'm putting it here so I don't forget it. Here is how to use ffmpeg to convert an mpeg4 video to H265/Matroska, with sound:

ffmpeg -i input.mp4 -vcodec libx265 -c:a copy output.mkv

To suspend output to the terminal, hit Ctrl-S. To resume, hit Ctrl-Q. I put this on the page because from time to time I accidentally hit Ctrl-S, and this is a better solution to fixing the problem than killing the terminal and starting another one.

Docker

Networking with FirewallD

By default, when running Docker in CentOS 7, Docker writes its own rules to iptables that override what is configured through firewalld. In order to override this, it is necessary to pass the --iptables=false option to Docker.

To accomplish this cleanly in CentOS 7, edit Docker's systemd service file, /etc/systemd/system/docker.service. Make the ExecStart part look like this:

ExecStart=/usr/bin/docker daemon --iptables=false $OPTIONS ...

Once you've done that, reload the systemd daemon with systemctl daemon-reload and restart Docker. Be sure to also restart your Docker container because it's going to be stopped by default.

Useful Links