Homelab Reiteration Pt. 5

in homelab •  8 years ago 

Servers, in a very basic way, perform tasks for people on the network or in some remote way. This facilitates the entire Internet, full of webpages and file hosting. What this article is going to cover is helpful tools for remote Linux server administration. These tools enable you to interact with your Linux server completely through the command line interface (CLI), such as an SSH server.

The first tool we're going to discuss is htop. This is an advanced form of top, which is essentially a task manager through the CLI.

I already have it installed, but if you would like to follow along and you have a deb system, you can obtain htop by typing 'sudo apt-get update && sudo apt-get install htop' in the CLI.

Typing htop starts the program, and the flag '-d 10' tells htop to update every second.


https://supload.com/HyDuvcpix

Similar to task manager, htop will show you the most intensive processes, as well as CPU usage, memory, and SWAP which is similar to RAM but uses your storage space instead of RAM. SWAP is slower and should be looked at as a backup, if you're using a lot of SWAP you should try adding more RAM or using less intensive processes.


https://supload.com/SyyH_9pje

As you'll note, the most intensive processes on the server is my Bitcoin Core node. This is to be expected, and so no actions are needed to be taken against the processes.

At the bottom you'll find all the commands you'll need to operate htop, and if feel you need more, you can type 'man htop' and you'll be presented the htop manual.

Since my full node is the most intensive, let's look deeper into how I would monitor that. As we know, full nodes download the entire bitcoin blockchain, and should be expected to take up a lot of storage space. The command 'df' should already be installed on your distro. Adding the flag '-h' tells the program to be human readable. I'll show both options, both df with and without the -h flag.


https://supload.com/BJDycqTie


https://supload.com/HJubccpse

As demonstrated, the -h flag tells df to present the storage in common metrics such as megabyte, gigabyte, and even terabyte, compared to 1k blocks. As of now, most of that 41% storage space used is from the full node.

To recap, we've covered how to remotely monitor tasks, how to quickly see disk space, next let's discuss how to monitor network usage. To install this next program, type the command 'sudo apt-get update && sudo apt-get install nload'.

Nload allows us to view incoming and outgoing network traffic on our server. This can provide many facilities, but regarding things like full nodes we can easily see if our server is still downloading lots of blocks. Since mine is caught up with the blockchain, there is not a lot of network traffic.


https://supload.com/B19mjcaog

What I like about nload is that its UI is pretty self explanatory. This allows it to be a helpful tool for even very inexperienced sysadmins.

That about wraps up my favorite (less complex) Linux CLI programs. If you would like to read my previous homelab article, it is linked below.

https://steemit.com/homelab/@tfj/homelab-reiteration-pt-4-2017320t25415763z

Want a server of your own? You don't need awesome hardware to perform basic stuff on Linux. Check out hagbardceline's article on how to install Debian as an operating system on any old desktop.

https://steemit.com/debian/@hagbardceline/installing-debian-gnu-linux-for-absolute-beginners

Thanks for reading! If you would like to help improve my homelab, be sure to upvote and Resteem. If you don't want to miss my next homelab article, remember to follow.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Very good article, thank you for mentioning my article about installing Debian as well. Upvoted and resteemed. :-)