blog-image

Dec 05, 2018

17 min read

Checklist: 12 Tips For Smarter Server Maintenance

Written by

Vippy The VPS

Like a home or a car, a virtual private server (VPS) works best when it’s maintained both thoroughly and thoughtfully. We get a lot of questions from our users about how they should be maintaining their servers, and so we thought it was time to put together a checklist of key tips.

These tips aren’t necessarily in order of importance— there are too many variables to say this one maintenance tip is most important for all servers. This checklist should be just one guiding pillar of your overall maintenance plan.

It’s also important to mention that these are general tips that should work for most deployments. If you’re running an application you’ve built yourself, you’ll need to find and follow additional maintenance tips. This also applies if you’re running a complex infrastructure like a self-hosted Docker setup or Linux containers.

How often should you be maintaining your VPS?

This is another question we hear often. Again, the maintenance schedule depends quite a bit on what applications you’re running, how important they are to you, and how much time and effort you can devote to server maintenance.

To help answer some of those questions, I’ve organized the checklist into weekly, monthly, and semi-annually groups.

[cta_inline]

Weekly

Review your memory/CPU utilization

Your server’s performance is entirely dependent on resource utilization. If you’re running low on RAM, for example, your operating system will begin killing programs until it fixes the problem. That could include an essential part of your service.

Most hosting companies offer a dashboard that allows you to see resource usage over a certain period. This will help you understand, at a glance, whether anything weird is happening on your VPS. With SSD Nodes, you can see this information in your client area. Just click on the server you’re interested in, and then find the “Usage Statistics” link.

A more direct way to examine live resource utilization is to use a monitoring program like top or htop. To use these, SSH into your server and run them (after installing them via your package manager, if necessary). Be sure to check out our quick tip on maximizing top for more information. top and htop will tell you if any specific programs are using too much RAM or CPU.

If resources have spiked unexpectedly (or dropped, for that matter), you’ll know that something has gone awry. Time to spend some time in the terminal figuring out what’s gone wrong, and what to do about it.

Check in on disk space

If you’re running any database on your server and it runs out of disk space, bad things start to happen. We’re talking unresponsiveness, corrupted data, and more.

Fortunately, checking in on disk space is pretty easy. A simple df run will help you see which partitions are filling up, and how much space is left.

If you’re nearly out of space, here’s one trick to perhaps clear out some space: Delete your package manager’s cache.

Ubuntu/Debian:

$ sudo apt-get clean

CentOS

$ sudo yum clean all

If that doesn’t help, you may have to hone in on your own files, as Linux installations are pretty bare bones.

Review logins and user accounts

You can see precisely who is currently logged in using w. The last command will list every recent login, and the lastlog command will tell you exactly when each user last logged into the VPS. Generally, these commands parse access log files into a more human-readable format.

You can use these commands together to understand precisely when—or how—someone might have accessed your VPS. If you see that an unexpected IP address has logged into your VPS using your user, you’ll know that your server has been compromised.

Sadly, in this case, it’s most likely time

Continue reading this article
by subscribing to our newsletter.
Subscribe now

Leave a Reply