Becoming better at Devops is something I seemed to always need through my career. As I continued to dive deeper and deeper on my work projects. I quickly realized how helpful so many little commands were that I never even knew about.
Some of these I learned pretty quickly, such as ssh, scp, and git. Others have taken a little longer and I learned from working closely with a Devops Badass.
I think one of the things we tend to forget at times, or not thing about looking at is the Manual that comes with most basic linux commands such as top, dig, etc. You can easily see the manual for commands by typing
man (service name). Example:
As simple as you think it is,
top is amazingly helpful. This can be used to tell you how the CPU is being used and by what processes. This helps to determine if a process is over bloating your CPU with commands.
ssh into a machine or just in terminal on your mac. Type
You will see this.
man top you can learn additional ways to use top such as typing “u” when you are in the top view. You can then define processes by users.
Dig gives you helpful information about a server/website. Such as the ip address of the A name in the DNS, or the CNAME if it’s based on a CNAME. It also can be used to keep dive into the Name-servers that you currently have your domain setup at.
One that many people might already know, as I think it’s one of the first commands you learn when you start working with servers. The importance of monitoring logs or changing files. The command
tail can be used with
-f to continuously monitor for the new logs that are appended.
This comes very helpful when monitoring while a server might be having problems, or a web page error that is thrown, or even an api failure. Typing
tail -f xxx.log. You can monitor a log.
Example of access.log