How to monitor Disk Health on Linux/Windows?

Recently, we published an article about Disk Health Checks on our blog and explained what they are and the benefits they offer to system administrators. Today, we want to delve deeper into this topic and explore how disk health checks work on Windows and Linux servers.

What is a Disk Health Check?

A disk health check is the process of evaluating the condition and performance of a storage device, such as a hard disk drive (HDD) or solid-state drive (SSD). This includes checking for potential issues like bad sectors, wear and tear, read/write errors, and other signs of degradation that could lead to data loss or drive failure.

How to Check Disk Health on Linux

  1. Using smartctl from the smartmontools Package:
    • Installation:
      sudo apt-get install smartmontools # Debian/Ubuntu
      sudo yum install smartmontools # CentOS/RHEL
      sudo pacman -S smartmontools # Arch
    • Check Disk Health:
      sudo smartctl -a /dev/sda
    • Run a Self-Test:
      sudo smartctl -t short /dev/sda # Short test
      sudo smartctl -t long /dev/sda # Long test
    • View Test Results:
      sudo smartctl -l selftest /dev/sda
  2. Using badblocks:
    • Check for Bad Blocks:
      sudo badblocks -v /dev/sda
  3. Using fsck for Filesystem Check (only for unmounted partitions or during boot):
    • Check Filesystem:
      sudo fsck /dev/sda1
  4. Graphical Tools:
    • GNOME Disks (also known as gnome-disk-utility):
      sudo apt-get install gnome-disk-utility # Debian/Ubuntu

      Open GNOME Disks and select the drive to view SMART data and run tests.

How to Check and Monitor Disk Health on Windows

  1. Using Windows Built-in Tools:
    • CHKDSK (Check Disk):
      chkdsk C: /f /r
      • /f fixes errors on the disk.
      • /r locates bad sectors and recovers readable information.
    • Windows Disk Management: Access through Control Panel -> Administrative Tools -> Computer Management -> Disk Management.
    • Windows Explorer: Right-click on the drive -> Properties -> Tools tab -> Check.
  2. Using wmic (Windows Management Instrumentation Command-line):
    • Check SMART Status:
      wmic diskdrive get status

      Returns “OK” if the drive is healthy.

Monitoring Disk Health

Monitoring disk health on Linux and Windows is crucial for any business, even if you are running a system that doesn’t handle sensitive data. If a hard drive in your servers fails, your system goes down, data can be lost, and you will face significant challenges in restoring your data, even from backup files. Therefore, it is always better to monitor your hard drive health to get notified right away before a failure occurs.

There are several ways to monitor your disk health. Xitoring has recently developed an automated system that gathers information from your system, monitors your disk health, and notifies you immediately if something goes wrong.

To use an automated monitoring system for your hard drive health check, you need to register your server with Xitoring and activate the Health Check integration on your Linux/Windows server in just a few seconds.

For more information, please follow the documentation (Disk Health Integration) and get ready for your peace of mind.

 

How to increase database performance

Did you know that a one-second delay in website load time can result in an 11% reduction in page visits and a 7% decrease in conversions?

Databases are the foundation of several applications and services. When a database is housed on a Linux server, increasing its speed is critical to ensuring application responsiveness, customer pleasure, and operational efficiency. Performance difficulties in a database might degrade user experiences and result in possible corporate losses.

In this post, I’ll look at advanced ways for improving the speed of databases running on Linux servers. I’ll focus on popular open-source databases such as MySQL, PostgreSQL, and MongoDB, which are known for their robust features and smooth interaction with the Linux environment.

(more…)

How to Fine-Tune Linux Kernel Parameters

Servers work really hard. They’re like the busy bees of the computer world!  Sometimes, servers can get a little tired and slow, and we don’t want that. It’s important to give them a boost and help them become faster and stronger. One way to do this is by playing with something called Linux kernel parameters.

Linux is known for its flexibility and ability to be customized, which allows system administrators to adjust its behavior to achieve top performance. The secret to tapping into this potential is knowing how to fine-tune its kernel parameters. Adjusting these parameters affects the Linux kernel’s resource management, impacting networking, file systems, and memory.

This guide covers Linux kernel optimization by focusing on TCP/IP settings, file system parameters, and memory management for improved server performance.

What Are Kernel Parameters?

The Linux kernel is the core of the Linux operating system. It’s responsible for controlling hardware and software resources, like your computer’s memory and network connections. Kernel parameters are configuration options that let you change how the kernel works, letting you fine-tune the system’s performance.

(more…)