DEV Community

Collins Kipruto
Collins Kipruto

Posted on

100 DAYS OF DEVOPS

Process Monitoring and Docker Installation — Day 2

One thing I appreciate about the KodeKloud challenges is how closely they simulate real-world scenarios where DevOps practices can be applied. Each challenge gives me an opportunity not only to complete a task, but also to understand the reasoning behind the tools and commands I am using.

Today, I worked on two main challenges and spent some additional time exploring Linux process and network monitoring.

1. Temporary User Setup with an Expiry Date

The first task involved creating a temporary user account with an expiry date.

I used:

sudo useradd -e 2027-01-08 kareem
Enter fullscreen mode Exit fullscreen mode

This introduced me to an important aspect of Linux user management: controlling how long an account remains active.

I also explored commands such as userdel for removing users and learned how user account properties, including expiry dates, can be modified when necessary.

This is particularly useful in environments where temporary access needs to be granted to developers, contractors, or other team members for a specific period.

2. Installing Docker and Starting the Docker Service

The second task involved installing Docker packages and starting the Docker service.

The installation itself was fairly straightforward, especially with the official Docker documentation available as a reference. However, one important lesson I picked up was to understand the system before installing software.

I used:

cat /etc/os-release
Enter fullscreen mode Exit fullscreen mode

This allows you to identify the operating system and its version, which is important because installation steps and package repositories can vary between distributions.

It reminded me that in DevOps, following documentation is important, but understanding the environment you are working in is just as important.

Process Monitoring with lsof

Another area I explored today was process monitoring.

Process monitoring involves observing running processes, their resource usage, and their interactions with the operating system. One of the tools I used was lsof.

lsof stands for List Open Files. In Linux, many resources are represented as files, so lsof can provide useful information about which processes have files, devices, or network connections open and which users are associated with them.

For example:

lsof
Enter fullscreen mode Exit fullscreen mode

can provide information about processes and the resources they are currently using.

Process monitoring with lsof

I also learned that lsof can be useful when investigating network connections, including IPv4 and IPv6 connections. With the appropriate permissions, it can also be used to investigate resources associated with specific users or processes.

This gave me a better understanding of how Linux administrators and DevOps engineers can investigate what is happening on a system instead of simply guessing when something goes wrong.

Exploring Network Information

I also spent some time exploring Linux networking commands and learning how to identify different types of network information.

Some of the commands I used were:

hostname -I
Enter fullscreen mode Exit fullscreen mode

Displays the IP addresses assigned to the host.

curl ifconfig.me
Enter fullscreen mode Exit fullscreen mode

Shows the public IP address visible to the internet.

ip a
Enter fullscreen mode Exit fullscreen mode

Provides detailed information about network interfaces and their assigned addresses.

ip route
Enter fullscreen mode Exit fullscreen mode

Displays the system's routing table, including information about gateways and routes.

These commands helped me understand the difference between local network information and the public IP address used when communicating with external networks.

Exploring SSH

Another interesting thing I learned today was how SSH can be used for remote administration.

SSH allows an authorized user to connect to another machine remotely. However, having the machine's IP address alone is not enough. The target machine needs to have SSH access available, and the connecting user must have the appropriate credentials and permissions.

I would like to explore this further by setting up a controlled environment with a friend and learning how SSH authentication, networking, and remote administration work in practice.

Final Thoughts

Day 2 gave me a broader view of what happens underneath the applications I build.

From managing user accounts and installing Docker to monitoring processes and exploring network information, I am starting to see how individual Linux skills fit into the bigger DevOps picture.

There is still a lot to learn, but that is what makes the journey exciting.

Day 2 complete. On to Day 3.

Top comments (0)