Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Process Monitoring

Updated on 2025-01-14 GMT+08:00

Overview

Process monitoring is used to monitor active processes on a host. By default, the Agent collects information such as CPU usage, memory usage, and the number of opened files of these processes. If you have customized process monitoring, the number of processes containing keywords is also monitored.

The Agent collects process CPU usages every minute and displays the top 5 processes, ranked by the CPU usage over the last 24 hours.

NOTE:

To view the process monitoring information, install the Agent.

Adding Process Monitoring

Process monitoring is used to monitor active processes on a host. By default, the Agent collects information such as CPU usage, memory usage, and the number of opened files of these processes. Customized process monitoring can collect the number of key processes and obtain the status of key processes at any time.
NOTE:

Currently, there's no limit on the number of processes to be added, but the Agent collects only the first 20 processes.

Suppose that the following processes are running on a server:

/usr/bin/java
/usr/bin/ntpd
/telescope
/usr/bin/python

Three keywords are configured, and the collection results are as follows:

  • Key word: Java, number of processes: 1
  • Key word: telescope, number of processes: 1
  • Key word: /usr/bin, number of processes: 3

Add specified processes.

  1. Log in to the management console.
  2. Choose Service List > Cloud Eye.
  3. Perform the following operations based on the resources to be viewed:
    • To check the process monitoring of an ECS, choose Server Monitoring > Elastic Cloud Server.
    • To check the process monitoring of a BMS, choose Server Monitoring > Bare Metal Server.
  4. On the Server Monitoring page, locate the ECS and click View Metric to go to the OS Monitoring page.
  5. Select the Process Monitoring tab.
  6. Click Add Process under Custom Process Monitoring. On the Add Process page, enter a process name or keyword.
    Figure 1 Add Process

    NOTE:

    You do not need to configure the Processes column. After you set the process name, the system will update the number of matched processes.

    After the configuration is complete, you can view the number of custom processes you added in the Custom Process Monitoring area.

Adding processes in batches
  1. Log in to the management console.
  2. Choose Service List > Cloud Eye.
  3. Choose Server Monitoring > Process Monitoring.
  4. Access the Process Monitoring page.
  5. Click Add Process, configure the task name, select a cloud product, select a specified resource, and configure the process name.
    Figure 2 Add Process
  6. Click OK.

Modifying a Process Monitoring Task

  1. Log in to the management console.
  2. Choose Service List > Cloud Eye.
  3. Choose Server Monitoring > Process Monitoring.
  4. Access the Process Monitoring page.
  5. Locate the row containing a process monitoring task and click Modify in the Operation column. On the displayed Modify Process Monitoring Task page, modify the description, selected resource, and monitored process name for the process monitoring task.
    Figure 3 Modify Process Monitoring Task
  6. Click OK.

Deleting a Process Monitoring Task

  1. Log in to the management console.
  2. Choose Service List > Cloud Eye.
  3. Choose Server Monitoring > Process Monitoring.
  4. Access the Process Monitoring page.
  5. Click Delete in the Operation column of a process monitoring task. In the displayed Delete Monitored Process dialog box, enter DELETE and click OK.
    Figure 4 Delete Monitored Process

Viewing Process Monitoring Metrics

  1. Log in to the management console.
  2. Choose Service List > Cloud Eye.
  3. Choose Server Monitoring > Process Monitoring.
  4. Access the Process Monitoring page.
  5. Click in the Monitoring column of a process monitoring task to go to the View Metric page.
  6. Set Instance, Process Name, and Process ID to view the CPU usage, memory usage, and number of opened files of a specified process in line graphs. For details about related metrics, see Table 1.
  7. On the View Metric page, select a monitoring period (1h, 3h, 12h, 1d, 7d, and 30d), or select Select Range to customize a monitoring period, to view historical monitoring data for any period during the last six months.

Viewing Custom Process Monitoring

  1. Log in to the management console.
  2. Choose Service List > Cloud Eye.
  3. In the navigation pane, choose Server Monitoring.
  4. On the Server Monitoring page, locate the ECS and click View Metric to go to the OS Monitoring page.
  5. Select the Process Monitoring tab.
  6. Under Custom Process Monitoring, locate a custom process and click on the left of the process name.
  7. Locate the row containing the target process ID and click View Details in the Operation column. On the View Metric drawer that is slid out, view the CPU usage, memory usage, and number of opened files of the current process. For details about the three metrics, see Table 1. Above the graphs, Time Range can be 1h, 3h, 12h, 1d, or 7d. You can also customize the time range to view historical monitoring data for any period during the last year.
  8. In the Custom Processes area, details of custom processes running on the host is displayed.
    Table 1 Process Monitoring metrics

    Metric

    Description

    Value Range

    Collection (Linux)

    Collection (Windows)

    CPU Usage

    CPU consumed by a process

    pHashId (process name and process ID) is the value of md5.

    0-1 x Number of CPU cores

    Monitored object: ECS or BMS

    Check the metric value changes in file /proc/pid/stat.

    Monitored object: ECS or BMS

    Call the API GetProcessTimes to obtain the CPU usage of the process.

    Memory Usage

    Memory consumed by a process

    pHashId (process name and process ID) is the value of md5.

    0 to 1

    Monitored object: ECS or BMS

    Memory Usage = RSS*PAGESIZE/MemTotal

    RSS: Obtain its value by checking the second column of file /proc/pid/statm.

    PAGESIZE: Obtain its value by running the getconf PAGESIZE command.

    MemTotal: Obtain its value by checking file /proc/meminfo.

    Monitored object: ECS or BMS

    1. Invoke Windows API procGlobalMemoryStatusEx to obtain the total memory size.
    2. Invoke GetProcessMemoryInfo to obtain the used memory size.
    3. Use the used memory size to divide the total memory size to get the memory usage.

    Open Files

    The number of opened files consumed by the process

    pHashId (process name and process ID) is the value of md5.

    ≥ 0

    Monitored object: ECS or BMS

    You can run the ls -l /proc/pid/fd command to view the number.

    Not supported

Enabling Alarm Notifications for Custom Process Monitoring

You can configure alarm notifications. When the number of processes decreases or increases, Cloud Eye will notify you immediately.

To enable alarm notifications for custom process monitoring, perform the following steps:

  1. Log in to the management console.
  2. Choose Service List > Cloud Eye.
  3. In the navigation pane, choose Server Monitoring.
  4. On the Server Monitoring page, locate the ECS and click View Metric to go to the OS Monitoring page.
  5. Select the Process Monitoring tab.
  6. On the Custom Process Monitoring page, create an alarm rule for a process by using either of the following method:
    • Locate a process and click Create Alarm Rule in the Operation column.
    • Click the icon next to the process name and click Create Alarm Rule in the row where the process ID is located.
  7. Configure basic information about the alarm rule. For details, see Creating an Alarm Rule.

Querying the System Processes

After the Agent is installed, you can check system processes on Cloud Eye.

To query the number of processes, perform the following steps:

  1. Log in to the management console.
  2. Choose Service List > Cloud Eye.
  3. In the navigation pane, choose Server Monitoring.
  4. On the Server Monitoring page, locate the ECS and click View Metric to go to the OS Monitoring page.
  5. Select the Process Monitoring tab.
    In the System Processes area, the process information is displayed. Table 2 describes the metrics of system processes.
    Table 2 System process metrics

    Metric

    Description

    Value Range

    Collection (Linux)

    Collection (Windows)

    Running Processes

    Number of processes that are running

    ≥ 0

    Monitored object: ECS or BMS

    You can obtain the state of each process by checking the Status value in the /proc/pid/status file, and then collect the total number of processes in each state.

    Not supported

    Idle Processes

    Number of processes that are idle

    ≥ 0

    Monitored object: ECS or BMS

    You can obtain the state of each process by checking the Status value in the /proc/pid/status file, and then collect the total number of processes in each state.

    Not supported

    Zombie Processes

    Number of zombie processes

    ≥ 0

    Monitored object: ECS or BMS

    You can obtain the state of each process by checking the Status value in the /proc/pid/status file, and then collect the total number of processes in each state.

    Not supported

    Blocked Processes

    Number of processes that are blocked

    ≥ 0

    Monitored object: ECS or BMS

    You can obtain the state of each process by checking the Status value in the /proc/pid/status file, and then collect the total number of processes in each state.

    Not supported

    Sleeping Processes

    Number of processes that are sleeping

    ≥ 0

    Monitored object: ECS or BMS

    You can obtain the state of each process by checking the Status value in the /proc/pid/status file, and then collect the total number of processes in each state.

    Not supported

    Total Processes

    Total number of processes

    ≥ 0

    Monitored object: ECS or BMS

    You can obtain the state of each process by checking the Status value in the /proc/pid/status file, and then collect the total number of processes in each state.

    Monitored object: ECS or BMS

    Obtain the total number of processes by using the system process status support module psapi.dll.

Viewing Top 5 Processes with the Highest CPU Usage

  • The Agent collects process CPU usages every minute and displays the top 5 processes, ranked by the CPU usage over the last 24 hours.
  • Run the top command to query the CPU usage and memory usage of a process.
  • Run the lsof or ls /proc/pid/fd |wc -l command to query the number of files opened by the current process. In the command, replace pid with the ID of the process to be queried.
    NOTE:
    • If a process occupies multiple CPUs, the CPU usage may exceed 100% because the collection result is the total usage of multiple CPUs.
    • The top 5 processes are not fixed. The process list displays the top 5 processes that have entered the statistical period of 1 minute in the last 24 hours.
    • The CPU usage, memory usage, and number of opened files are collected only for the top 5 processes for which monitoring has been enabled in the last 24 hours. If such a process has been stopped, its data will not be displayed.
    • The time in the list indicates the time when a process was created.
    • If the system time on the client browser is different from that on the monitored ECS, the graph may have no metric data. In this case, synchronize the local time with the ECS time.

To query information about the top 5 processes with the highest CPU usages

  1. Log in to the management console.
  2. Choose Service List > Cloud Eye.
  3. In the navigation pane, choose Server Monitoring.
  4. On the Server Monitoring page, locate the ECS and click View Metric to go to the OS Monitoring page.
  5. Select the Process Monitoring tab.
  6. Click Configure under TOP 5 Processes with Highest CPU Usage.
  7. In the displayed TOP 5 Processes with Highest CPU Usage dialog box, enable monitoring for target processes and click OK.

    Locate a process and click View Details in the Operation column. On the View Metric drawer that is slid in, view the CPU usage, memory usage, and number of opened files of the process. For details about the three metrics, see Table 3. Above the graphs, Time Range can be 1h, 3h, 12h, 1d, or 7d. You can also customize the time range to view historical monitoring data for any period during the last year.

    Table 3 Process Monitoring metrics

    Metric

    Description

    Value Range

    Collection (Linux)

    Collection (Windows)

    CPU Usage

    CPU consumed by a process

    pHashId (process name and process ID) is the value of md5.

    0-1 x Number of CPU cores

    Monitored object: ECS or BMS

    Check the metric value changes in file /proc/pid/stat.

    Monitored object: ECS or BMS

    Call the API GetProcessTimes to obtain the CPU usage of the process.

    Memory Usage

    Memory consumed by a process

    pHashId (process name and process ID) is the value of md5.

    0 to 1

    Monitored object: ECS or BMS

    Memory Usage = RSS*PAGESIZE/MemTotal

    RSS: Obtain its value by checking the second column of file /proc/pid/statm.

    PAGESIZE: Obtain its value by running the getconf PAGESIZE command.

    MemTotal: Obtain its value by checking file /proc/meminfo.

    Monitored object: ECS or BMS

    1. Invoke Windows API procGlobalMemoryStatusEx to obtain the total memory size.
    2. Invoke GetProcessMemoryInfo to obtain the used memory size.
    3. Use the used memory size to divide the total memory size to get the memory usage.

    Open Files

    The number of opened files consumed by the process

    pHashId (process name and process ID) is the value of md5.

    ≥ 0

    Monitored object: ECS or BMS

    You can run the ls -l /proc/pid/fd command to view the number.

    Not supported

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback