What is eating my RAM today?

What is eating my RAM today?

Friday, Jan 11, 2019
There has been a tweet doing the rounds about how people are doing with managing their RAM. Generally speaking I have a couple of machines, varying from 4-16GB or RAM. As you can expect I don’t have many spare GB of RAM knocking about, pretty much ever. # Wtf is eating up my RAM? ps aux | awk '{print $6/1024 " MB\t\t" $11}' | sort -rn | head -25#Linux #sysadmin @nixcraft @UnixToolTip ...

Read more
Getting the size of MySql databases and tables

Getting the size of MySql databases and tables

Friday, Jan 4, 2019
Getting accurate results about the size and growth of your database tables enabled you to make smart decisions about partitioning and management of storage. I can guarantee that no-one wants to run out of storage on a database server. Show the largest database from a database server This has the assumption that you have access to the root account on the database server. You can normally look inside /var/lib/mysql to get an idea of the overall disk space, however, you will likely get more reliable results from querying the information_schema table inside MySql. ...

Read more
Testing UDP port connections using netcat

Testing UDP port connections using netcat

Wednesday, Dec 5, 2018
Sending messages over the Internet can be fun (we are doing it now). However, testing that connections are correctly established behind a mask of firewalls, load balancers and application servers can be challenging. Netcat offers a simple way to test the sending of messages between two servers and it is already available on the majority of server installs. Using netcat is relatively straightforward. The core thing we are doing here is using both UDP -u and listening -l. ...

Read more
My Most Popular Command Line Commands

My Most Popular Command Line Commands

Tuesday, Sep 4, 2018
What commands do you use most on command line? As a daily (hourly) linux user, I use command line tools for almost everything that I do. Opening files, copying, moving, making connections (ssh), starting containers (docker). But what ones do I use most? Here is a little command to find out for yourself. Find out your top 10: history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v ". ...

Read more
Tidying Docker Containers and Images without Filling Your Disk Space

Tidying Docker Containers and Images without Filling Your Disk Space

Tuesday, Jun 13, 2017
Docker. You know that I love it. I guess maybe sometimes I love it a little too much because on some of my test servers I have been filling up a lot of GB with new images and containers. All of which hang around indefinitely if you don’t clear them. Add to that if you have a continuous integration pipeline that builds a new container every time you do a commit/push and you have an ever growing disk of redundant Docker containers and images. ...

Read more
Starting Docker: Making Drupal PHPCS Docker Container

Starting Docker: Making Drupal PHPCS Docker Container

Thursday, Dec 29, 2016
Making your own containers can be a super useful way of not only understanding more about docker, but also for understanding more about the systems administration of your applications or docker images. Maybe you want a specific container for running configured services on your machine, or maybe you want to look at packaging your entire system inside a docker container to make it super easy to run. In this quick post, I am going to dover making a Dockerfile and also what to write in it so that you can start making your own containers, today! ...

Read more
Starting Docker: Running containers

Starting Docker: Running containers

Friday, Dec 2, 2016
So, you have successfully installed Docker. Brilliant! Now, what?! Well, the obvious thing to do is to go about running some containers. The Docker documentation suggests that you should pull and run the Hello World container, and although it is small, there are much better things we can do straight away to start to show the power of Docker. Docker Pull & Docker Hub To get started with running containers, you are first going to need to get some containers. ...

Read more
Starting Docker: Installation

Starting Docker: Installation

Thursday, Dec 1, 2016
Unless you have been living under a metaphorical rock you will have heard about Docker. But although lots of people have heard of Docker, far fewer are using it day-to-day and even less in production. In this short post, I am going to go over what Docker (and containers are) and how you can start to get up and running with Docker. What is Docker? Wikipedia describes Docker as: Docker is an open-source project that automates the deployment of Linux applications inside software containers. ...

Read more
Redirecting http to https on nginx

Redirecting http to https on nginx

Monday, Jul 11, 2016
If you have been following the growth of encryption on the web (https) and the fact that you can now get free SSL certificates (much like the one on this site) using Lets Encrypt, there is very little reason for not having your site running https, making your data encrypted between the server and the user, making everyone more secure. If you are doing this in Apache, then most open-source projects will suggest the you use the rewrite engine inside apache. ...

Read more
Ansible for Server Monitoring

Ansible for Server Monitoring

Friday, Apr 10, 2015
More Ansible goodness this week. We’ve been working on a basic playbook to set up the innovatively-named Monit monitoring tool to keep an eye on our webservers and give them a kick up the backside if they’re misbehaving. It’s based on a very useful Ansible Galaxy role, pgolm’s Monit, which installs and configures the tool. However, the role’s documentation doesn’t necessarily make it obvious how to get the best from Monit, so here’s an example playbook for monitoring PHP, MySQL and Nginx to get things started: ...

Read more