Add or edit Swap Space for Linux

Introduction

To run and store loaded applications, each processor in the machine needs a certain quantity of data storage space. Every PC is built with primary and secondary memories, from which applications may operate, and data can be stored while processing. If you work in IT or are a computer scientist, you should give storage some severe thought. In that circumstance, some software programs must be developed.

(more…)

How to troubleshoot Linux using dmesg

Introduction

The dmesg command is a Linux utility that retrieves kernel-related messages from the kernel ring buffer and displays them. The ring buffer holds information regarding hardware, device drivers’ initialization, and kernel modules’ messages that occur during system startup.
The dmesg command is crucial for diagnosing hardware-related errors, warnings, and device failure.

(more…)

How to Use strace to Monitor Linux System Calls

Introduction

A system call is a programmatic method of asking the kernel for a service, and strace is an effective tool for tracing the communication between user processes and the Linux kernel.
It would help if you first comprehended system calls to understand how an operating system functions. An operating system’s primary purpose is to give user programs abstractions.
Generally speaking, an operating system has two modes:
Kernel mode: a privileged, strong mode that the operating system kernel employs
User mode: most user programs are run

Users mostly employ command-line tools and graphical user interfaces (GUI) to do daily chores. System calls communicate with the kernel to complete tasks while operating invisibly in the background.
System calls accept and process inputs and return values in a manner that is quite similar to that of function calls. The only distinction is that function calls do not enter a kernel, while system calls do. User space is shifted to kernel space through a novel trap mechanism. (more…)

How to Use the ps Command to Monitor Linux Processes

Introduction

There will be a time when you need to learn more about a specific process frequently to get its ID so you can parse the “kill” command. Of course, it is not necessary to be for that. This manual will cover the ‘ps’ and ‘top’ commands each must be present in a typical Linux installation.

What is ps?

An application called “ps,” which stands for “process state,” may read all of the process data on your computer, display the results on the terminal, and then shut down. The running status, user and group it belongs to, the process ID, and whether it was started from a terminal are all examples of information that can be provided.

It can also list only a few or all of the processes. It takes both standard style parameters (with a dash, such as “-e”) and BSD style arguments (without a dash), as well as GNU style syntax (those preceded by two dashes). To learn more, refer to the man page.

(more…)

How to Monitor CPU Temperature for Windows and Linux

Introduction

Monitor the CPU temperature of your Windows or Linux computer to keep it running smoothly. You can help with this by using contemporary CPU temperature monitoring software.

Why do you require it?

The fact is, every PC produces heat. It can only withstand so much heat before the hardware starts to malfunction. The PC has numerous components, including a motherboard, hard drive, and more, and while operating, it generates heat. Before a threshold, the heat is normal, but it might seriously harm the CPU if it isn’t controlled.

So, if the temperature rises unusually, you can face a sudden system shutdown. While working, you or the other employees can notice a slowdown in their performance. In the worst instance, heat could harm the CPU’s motherboard, essential chips, or other components.

You must use a CPU temperature monitoring program to monitor your computer CPU to prevent all of these and safeguard your system and its performance.

(more…)

Top 9 Monitoring tools on Linux

Introduction

Every computer system can benefit from effective management and monitoring. Keeping an eye on the performance of your system will allow you to identify and handle any issues that may arise immediately.

For this reason, numerous command-line utilities have been developed. This article will expose you to the most useful applications in your toolkit.

Prerequisites

You’ll need access to a Linux-based operating system PC to follow along with this article. This might be either a virtual private server to which you have connected through SSH or your local computer. Note that this article was confirmed on a Linux server running Ubuntu 20.04, but the examples should work on any machine running any version of the Linux operating system.

(more…)

How to install TCPdump and use it

What is TCPdump

This versatile and effective command-line tool facilitates network troubleshooting.
Tcpdump is a command-line utility that enables the collection and analysis of network traffic traversing the system. It is frequently used for network troubleshooting and as a security tool. TCPdump is a robust and flexible tool with numerous settings and filters that can be used in several situations. Since it is a command-line tool, it is suitable for running on distant servers or devices that lack a graphical user interface to collect data for subsequent analysis. It can be run in the background or scheduled with cron. This essay will discuss some of TCPdump’s most prevalent features.
Capturing packets with TCPdump
TCPdump requires elevated rights to collect packets for troubleshooting or analysis, so most commands in the following examples are started with sudo.
Use the following command to get started for a list of interfaces that can be captured:

tcpdump --list-interfaces

or

sudo tcpdump -D

(more…)

Install LEMP Stack on Ubuntu 20.04

What is LEMP Stack

LEMP (Linux, NGINX, MySQL, PHP) is a software stack that used to be the environment for Websites and Web-applications which uses Linux as the Operating system, NGINX (Engine-X) as the web-server, MySQL as the database management system, and PHP as the Scripting language. is almost like LAMP stack with one main difference in the web-server application, in the LEMP stack we use NGINX as the web-server application which is more flexible and lightweight than Apache.

Install NGINX

For installing NGINX on Ubuntu 20.04 you can install it using the official “apt” repository.

apt install nginx

You can start the Nginx service using systemctl also you can make it run at the system startup:

systemctl start nginx
systemctl enable nginx

(more…)

Install LEMP Stack on CentOS 8

What is LEMP Stack

LEMP (Linux, NGINX, MySQL, PHP) is a software stack that used to be the environment for Websites and Web-applications which uses Linux as the Operating system, NGINX (Engine-X) as the web-server, MySQL as the database management system, and PHP as the Scripting language. is almost like LAMP stack with one main difference in the web-server application, in the LEMP stack we use NGINX as the web-server application which is more flexible and lightweight than Apache.

(more…)

Setup NTP server using Chrony on CentOS 8

What is Chrony

Chrony is the default NTP server/client on RHEL/CentOS 8 operating system. basically, Chrony is an implementation of the NTP (Network Time Protocol) and it performs well in a wide range of conditions. Chrony can be used to synchronize the system date and time with NTP servers.
(more…)