By default, process monitoring allows you to collect information about CPU usage, memory usage, and the number of files recently opened by active processes during some period of time. If you add a process keyword, the number of processes containing the keyword is collected.

View the resource consumption of active processes

  • The CloudMonitor agent filters out the top five processes with the most CPU usage every minute, and records the respective CPU usage, memory usage, and number of files opened by these processes.
  • For the CPU and memory usage of a process, see the Linux top command.
  • For the number of files opened by an active process, see the Linux lsof command.
Note
  • If your process occupies multiple CPU cores, the percentage shown for CPU usage may exceed 100% because the collected result indicates the total usage of the multiple CPU cores.
  • If, during the time period specified for your query, the top five processes have changed, the process list will display all processes that have ever ranked as top five over the specified time period. The times in the list indicate when the processes last ranked in the top five.
  • The CPU usage and memory usage, and the number of opened files are collected only for the top five processes. Therefore, if a process has not ranked top five continuously over the time period specified for your query, its data points will appear discontinuous in the charts. The density of the data points for a process indicates its degree of activity on the server.
    • As shown in the following figure, the wrapper process has not continuously ranked in the top five processes each time measured. Therefore, the data points in the charts are sparse and discontinuous. The data points in the following charts mean that the process has ranked top five for the particular time measured.

    • The following figure shows the charts of the java process. The data points in the charts are dense and continuous. This means that the process continuously ranks in the top five processes with the most CPU usage.

Monitor the number of specified processes

You can lean the number and viability status of key processes by monitoring the number of processes. Specifically, you can add process keywords to the Number of Processes(Count) chart to monitor the number of related processes.

  • Add processes for monitoring
    For example, assume the following processes run on your server: /usr/bin/java -Xmx2300m -Xms2300m org.apache.catalina.startup.Bootstrap, /usr/bin/ruby, and nginx -c /ect/nginx/nginx.conf. You then add the following six keywords (the keywords can be process names, file paths, parameter names, or other related words), and the corresponding number of processes for each target keyword is output as follows:
    • Keyword: ruby, number of processes collected: 1
    • Keyword: nginx, number of processes collected: 1
    • Keyword: /usr/bin, number of processes collected: 2
    • Keyword: apache.catalina, number of processes collected: 1
    • Keyword: nginx.conf, number of processes collected: 1
    • Keyword: -c, number of processes collected: 1

    Procedure

    1. Log on to the CloudMonitor console.
    2. In the left-side navigation pane, click Host Monitoring.
    3. Click the name of the target host, or click Monitoring Charts in the Actions column to access the host monitoring details page.
    4. On the displayed page, click the Process Monitoring tab.
    5. Rest the pointer over the Number of Processes(Count) chart, and then click Add Process.
    6. On the displayed Add Process Monitor page, add the name or keyword of the process you want to monitor and click Add.
  • Delete a monitored process
    1. Log on to the CloudMonitor console.
    2. In the left-side navigation pane, click Host Monitoring.
    3. Click the name of the target host, or click Monitoring Charts in the Actions column to access the host monitoring details page.
    4. On the displayed page, click the Process Monitoring tab.
    5. Rest the pointer over the Number of Processes(Count) chart, and then click Add Process.
    6. On the displayed page, find the target process name or keyword and click Delete.
  • Set alarm rules

    After you configure monitoring for the specified process, you can configure alarm rules for the process. After that, you can receive an alarm notification when the number of the processes changes.

    1. Log on to the CloudMonitor console.
    2. In the left-side navigation pane, click Host Monitoring.
    3. Find the host for which you want to set process monitoring alarm rules, and then click Alarm Rules in the actions column.
    4. Click Create Alarm Rule in the upper-right corner of the page.
    5. In the Set Alarm Rules area, select (Agent)Host.process.number from the Rule Describe drop-down list, set an appropriate alarm threshold, and then select the process you want to monitor from the processName drop-down list. If multiple processes are configured on the host, the number of processes varies. You can click Add Alarm Rule to configure alarm rules for multiple processes at a time.