📜  ubuntu sysmon - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:35:25.771000             🧑  作者: Mango

Ubuntu Sysmon - Shell-Bash

Ubuntu Sysmon is a lightweight and easy-to-use system monitor tool for Ubuntu. It is written in Bash shell scripting language and can be used to monitor various system resources such as CPU usage, memory usage, disk space usage, network traffic, and much more.

Features
  • CPU usage monitoring
  • Memory usage monitoring
  • Disk space usage monitoring
  • Network traffic monitoring
  • Displaying system uptime and load average
  • Alerting system resource usage above set thresholds
  • Easy to use and configure
Installation
  1. Download the latest version of the Ubuntu Sysmon from the Github repository - Ubuntu Sysmon.

  2. Extract the downloaded archive using the following command:

tar -xvf ubuntu-sysmon.tar.gz
  1. Navigate to the extracted directory:
cd ubuntu-sysmon
  1. Install the sysmon script by running the following command:
sudo ./install.sh
  1. The Ubuntu Sysmon is now installed, and you can run it by typing the following command in the terminal:
sysmon
Usage

Ubuntu Sysmon is straightforward to use. Once you run the sysmon command, it will display a real-time monitor of your system's resource usage, including CPU usage, memory usage, disk space usage, and network traffic.

Moreover, Ubuntu sysmon provides threshold-based alerts, which means you can set resource usage thresholds, and if any resource exceeds that threshold, it will alert you immediately, helping you take timely action to avoid any system crashes or failures.

Configuration

Ubuntu Sysmon provides various configuration options that you can use to customize the system monitoring experience. You can edit the configuration file located at /etc/sysmon.conf to set resource monitoring thresholds and adjust monitoring intervals.

Example Configuration File:

# CPU threshold for warning and critical
CPU_WARN_THRESHOLD=70
CPU_CRIT_THRESHOLD=90

# Memory threshold for warning and critical
MEMORY_WARN_THRESHOLD=80
MEMORY_CRIT_THRESHOLD=90

# Disk threshold for warning and critical
DISK_WARN_THRESHOLD=80
DISK_CRIT_THRESHOLD=90

# Network Traffic threshold for warning and critical
NET_IN_WARN_THRESHOLD=250
NET_IN_CRIT_THRESHOLD=500

NET_OUT_WARN_THRESHOLD=250
NET_OUT_CRIT_THRESHOLD=500

# sleep interval in seconds
SLEEP_INTERVAL=3

You can adjust the values according to your system requirements and save the configuration file.

Conclusion

Ubuntu Sysmon is an excellent tool for monitoring your Ubuntu system resources in real-time. It provides various options to customize the monitoring experience and alerts you when any resource usage exceeds the set threshold values. Moreover, it is lightweight and straightforward to use, making it an ideal choice for system administrators who want to keep an eye on their system's health.