Fix Linux Server Issues With These 5 Troubleshooting Steps

Fix Linux Server Issues

Fix Linux Server Issues With These 5 Troubleshooting Steps

With these clever troubleshooting suggestions, your Linux server can be operational once more in no time.

If the performance of your Linux server isn’t up to par, there probably is a problem at the root of the problem that has to be fixed.

To troubleshoot a Linux server and minimize downtime, take the following five easy-to-follow procedures.

maxresdefault 1

1. Check the Hardware 

Let’s start with the simplest step: inspect the hardware. This calls for you to visit the actual rack and examine it for any loose cables or power outages.
Optionally, enter the command $ sudo ethtool eth0.

If it responds with a yes, your port is communicating with the network.
Use the following command to examine a server’s BIOS/UEFI hardware report:

dmidecode —type memory $

This is also not the issue if the response appears to be satisfactory. Run the following command if you believe there are memory problems:
modprobe edac core with sudo.

Run the aforementioned command again if there are no outcomes, then type:
sudo grep $ “[0-9]
“/sys/devices/system/etc/mc/mc*/csrow*/ch* ce count

This displays the error count and a list of the rows for the memory controller. You may locate the corrupt memory stick by combining an output with the dmidecode information on the memory channel, part number, and slot.

2. Decipher the Exact Problem

There is no denying the fact that your server is down. Determining the precise nature of the issue is crucial before applying your tools. Make that the issue is not on the client’s end, for instance, if your users are having problems with a server application.

Second, as part of the problem hunt, you ought to make an effort to identify the problem’s root cause. Either the server itself or the server application would be referred to here. For instance, a server programme may malfunction while the server itself runs smoothly.

Type the following to see if a programme is functioning properly:
$ sudo ps -ef | grep apache2
$ sudo netstat -plunt | grep apache2

You can activate the Apache server by typing $ sudo service if the server is not responding. apache2 begin
In other words, identify the precise issue before taking action. This would enable you to focus your list of problems and develop a suitable solution.

3. Making use of the Top Option

With its ability to load the average, swap, and a list of programmes utilising the system’s resources, Top is one of Linux’s most excellent debugging features.

However, utilising it for the first time can be confusing. Here is a brief top breakdown.

Line 1: 
• How long has the computer been on?
• User count
• Average load (the system load time for the last minute, last 5 minutes, and last 15 minutes)

Line 2 

provides the following information: total number of tasks, running tasks, sleeping tasks, stopped tasks, and zombie tasks.

Line 3:

“CPU utilisation as a percentage by the user, as a percentage by the system, as a percentage by low-priority processes, as a percentage by idle processes, as a percentage by I/O wait, as a percentage by hardware interrupts, as a percentage by software interrupts, and as a percentage by steal time”
Memory consumed, total system memory, free memory, and buffer cache

Line 4:

Available memory, Total swap available, Total swap free, and Total swap used

A line for each active application follows this. It contains the following information: Process ID, User, Priority, Nice Level, Virtual Memory Used by Process, Resident Memory Used by Process, Shareable Memory Used by Process, and CPU Used by Process as a Percentage.

  • The percentage of memory consumed by a process.
  • The time process has been active.
  • Sort the process first by entering M to see which one is consuming the most memory.
  • Press P to see which processes are consuming the most CPU power.
  • Pressing O will bring up the following instructions, which can be used to filter on particular options:                                                                                                      In addition, you can filter on a certain procedure, such as

COMMAND=apache

Using this filter, only Apache processes will be displayed.

4. Tracking Disk Space

Even with limitless storage, a server can run out of room, which can result in a host of issues. Use the df command (disc filesystem) to get a detailed breakdown of the available/used disc space in such circumstances.

There are the following three applications for it:
$ sudo df -h
$ sudo df -i
$ sudo df -hT

The command %util, which shows how overworked the device is, is another helpful one. Any numbers above 60% utilisation signify subpar storage performance. The drive is nearly saturated whenever it comes close to 100%.

5. Examine the logs for issues.

The /var/log, a subfolder particular to the service, where the logs are stored, contains a wealth of useful information. The server logs for Linux may be the most terrifying place on earth for beginners.

That need not be the case, especially because the logs are separated according to their functionality. One records system/program activity, while the other logs system/application error messages. Given the volume of data they contain, logs are frequently huge files.
Because log data files are ambiguous, it’s best to learn how to navigate them.

Use dmesg to view all of the kernel’s messages if you’re unsure. By default, the tail function displays the first 10 messages.
$ dmesg | tail

The tail command will continue to monitor the syslog file and display the subsequent event when combined with the -f keyword.
$ dmesg | tail -f /var/log/syslog
This command will keep going through the logs and highlighting any potential issues.

 

For reading Similar Article click on this link https://nextepiclife.com/5-must-have-open-source-tools-to-secure-your-linux-server/

Leave a Reply

Your email address will not be published. Required fields are marked *