All Products
Search
Document Center

Log tool for monitoring CPU and memory

Last Updated: Dec 17, 2020

Overview

This topic describes how to use log service to monitor CPU usage and memory usage.

Detail

Alibaba Cloud reminds you that:

  • Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
  • If you modify the configurations and data of instances including but not limited to ECS and RDS instances, we recommend that you create snapshots or enable RDS log backup.
  • If you have authorized or submitted security information such as the logon account and password in the Alibaba Cloud Management console, we recommend that you modify such information in a timely manner.

The following are the log tools for monitoring CPU and memory in Linux and Windows respectively.

Note: The Linux related tools can be used for Red Hat, CentOS, and Alibaba Cloud Linux 2 operating systems.

Linux tools

  1. Download the following tool.
  2. Download the file, decompress it, and upload it to the /TMP directory.
  3. On the command line, run the following command to enter the specified directory:
    cd /tmp
  4. Run the following command to run the script in the background.
    nohup bash get_cpu_mem_info.sh &
  5. The tool generates a log file in the /TMP directory to record the CPU and memory usage of the system in real time and be used to analyze logs when a system exception occurs.

Windows tools

  1. Download the following tool.
  2. Download the file, extract it, and upload it to the C: \ directory.
  3. Do not close after opening the file to run. This operation can be minimized.
  4. The tool generates a log file in the C:\directory to record the system performance status in real time and be used to analyze logs when a system exception occurs.

Application scope

  • Elastic Compute Service