Monday, April 25, 2022
Monday, April 18, 2022
In the previous post we created an EC2 instance in AWS in this post we are going to connect to that instance on a Linux workstation or server with SSH.
Here are the steps to connect to the EC2 instance using SSH on Linux, this will also work on a Mac as well:
1. Navigate to the folder that contains the key pair file that you've downloaded in the previous post, I store it in the folder /aws/EC2/KeyPair/ folder , so I would type cd /aws/EC2/KeyPair then type ls to see the file in the folder
Monday, April 11, 2022
In this post we are going to look at another performance related command, which is the uptime command.
First let's look at the uptime command, as the name implies the uptime command shows you what the uptime is for the system:
The command shows you the uptime for the system, the number of users who are using the system, and the system load average (Number of CPU used) in intervals of 5 minutes.
If you type w, you can see which users are using the system
The load average is the most important stat in the uptime command however, it is currently static, and to get updates you need to run the uptime every 5 minutes. There's a better way to monitor your Linux system. But you have to call now, and for a limited time only for just $19.99 you can have the answer. Since I am such a nice guy I am going to give you the answer for free.
What you can do is type the command tload and it will monitor the load average time in real-time. Before we run the tload command a good command to run is the lscpu command to see how many CPU you have. For instance you have just one CPU and your load average is 1+ then you have got a problem.
Now let's run the tload command
There are two parts to the tload utility, at the top you will see the average load time in real time instead of the 1, 5, 15 minute interval like before. But it will be dynamic and updates automatically based on the load.
On the bottom you will see a graphical representation of the load average, it's probably not going to win any awards for best graphics
Everything looks fine right now, but if you open another terminal and run the dnf update -y command you will see the load changing accordingly. Or some tasks that would put stress on the system.
Monday, April 4, 2022
In this post we are going to look at the procps-ng package commands to get some performance related information on our Linux system.
The first command we are going to look at is the free command, which shows the free memory available
We can use the free command with the -m option to show the free memory in megabytes
Or free -g for gigabytes
The next command we are going to look at is the pmap command, let's grab a process id for this one with the ps -l command
Let's run the pmap command on the bash process, the pmap command displays the memory map of a process, besides the memory usage it's nice to see the shared libraries used for the process
Another useful command is the pwdx command, this command finds the home working directory of a process. So if we run the command pwdx 3368 we will find out what the home working directory of the bash shell is