No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Advanced O&M Command Reference

OceanStor 2000, 5000, and 6000 V3 Series V300R006

This document is applicable to OceanStor 2200 V3, 2600 V3 Video Surveillance Edition, 2600 V3, 5300 V3, 5500 V3, 5600 V3, 5800 V3, and 6800 V3. Based on the CLI, this document describes how to use various commands classified by functionsand how to set the CLI and manage the storage system through these commands. The document that you browse online matches the latest C version of the product. Click Download to download documents of other C versions.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
cgroup_manage.sh

cgroup_manage.sh

Function

The cgroup_manage.sh command is used to query statistics on memory cgroup in minisystem mode.

Format

cgroup_manage.sh [-c xxx] [-g xxx] [-p xxx] show

cgroup_manage.sh [-l xxx] [-s xxx] install

cgroup_manage.sh -p xxx -v xxx oom_adj

cgroup_manage.sh -g xxx [-l xxx] [-s xxx] [-i xxx] start

cgroup_manage.sh -g xxx [-l xxx] [-s xxx] update

cgroup_manage.sh uninstall

cgroup_manage.sh [-i xxx] end

Parameters

Parameter

Description

Value

-c xxx

Specifies the cgroup subsystem. "xxx" indicates the subsystem name. Only "memory" is supported, and "memory" is used by default.

Only "memory" is supported.

-g xxx

Specifies the cgroup name. "xxx" indicates the cgroup name, which is specified by the user.

Control group name.

-p xxx

Specifies the process name. "xxx" indicates the process name, which is specified by the user.

Process name.

-l xxx

Specifies the hard upper limit of memory usage of the memory subsystem. "xxx" is used to specify the hard upper limit of memory usage of the specified cgroup. For example, "-l 240M" indicates that the hard upper limit of memory usage of the specified cgroup is 240 MB. When parameters "-l" and "-s" are not used, parameters are read from "product.ini" by default.

0-0xFFFFFFFFFFFFFFFF bytes.

-s xxx

Specifies the soft upper limit of memory usage of the memory subsystem. "xxx" is used to specify the soft upper limit of memory usage of the specified cgroup. For example, "-s 200M" indicates that the soft upper limit of memory usage of the specified cgroup is 200 MB. When parameters "-l" and "-s" are not used, parameters are read from "product.ini" by default.

0-0xFFFFFFFFFFFFFFFF bytes.

-v xxx

Sets the weight of a process being selected during the omm process. "xxx" indicates the value of "oom_adj". The larger the value, the more likely the process to be selected and killed. "-17" indicates the process will never be selected during the omm process.

[-17,15]

-i xxx

Specifies the process PID. "xxx" indicates the process PID. In the "start" command, this parameter indicates that the PID is added to the specified cgroup. In the "end" command, this parameter indicates that the PID is removed from the specified cgroup.

Process ID.

Modes

Minisystem mode

Usage Guidelines

The "cgroup_manage.sh show" command is used to query statistics on memory cgroups.

Exercise caution when using the other commands.

Example

  • Query the cgroup subsystem memory information specified by -c.
    Storage: minisystem> cgroup_manage.sh -c memory show 
      1 ------------show memory subsystem------------- 
      2 usage        max_usage limit        soft_limit failcnt  cgroup 
      3 772M120K     0            Invalid      Invalid      0        /cgroup/memory 
      4 93M640K      97M8K        4G420M       3G691M       0        /cgroup/memory/cg_root 
      5 13M64K       13M504K      60M          50M          0        /cgroup/memory/cg_root/antivirus 
      6 5M304K       8M728K       240M         200M         0        /cgroup/memory/cg_root/ccdb 
      7 72M112K      75M424K      650M         580M         0        /cgroup/memory/cg_root/omm 
      8 3M160K       4M292K       700M         700M         0        /cgroup/memory/cg_root/protocol 
      9 
  • Query the process information specified by -p.
    Storage: minisystem> cgroup_manage.sh -p ccdb_server show 
      1 -----------show process info----------------- 
      2 cmd:           /OSM/bin/ccdb_server 
      3 cgroup:        /cg_root/ccdb 
      4 oom_adj:       0 
      5 Pid            VmSize           RSS         Name 
      6 25612          370432 kB        5092 kB     ccdb_server 
      7
  • Query the statistic of cgroup specified by -g.
    Storage: minisystem> cgroup_manage.sh -g ccdb show 
      1 -----------show cgroup property--------------- 
      2 memory_usage:             4M912K 
      3 memory_max_usage:         8M764K 
      4 memory_limit:             240M 
      5 memory_soft_limit:        200M 
      6 memory_failcnt:           0 
      7 Pid            VmSize           RSS         Name 
      8 25612          370432 kB        5092 kB     ccdb_server 
      9 
  • Modify the hard or soft upper limit of memory usage of a specified cgroup.
    Storage: minisystem> cgroup_manage.sh -g diagnose -l 100M -s 80M update 
      1 update cgroup diagnose limit:100M soft_limit:80M success

System Response

The following table describes the parameter meanings.

Parameter

Meaning

usage

Memory usage.

max_usage

Maximum memory usage.

limit

Hard upper limit of memory usage of the cgroup.

soft_limit

Soft upper limit of memory usage of the cgroup.

failcnt

Count of memory application failures.

memory_failcnt

Count of memory application failures.

cgroup

Control group.

cmd

Command for starting the process.

oom_adj

Priority of the process being selected during the oom process.

Pid

Process ID.

VmSize

Virtual memory size.

RSS

Physical memory size.

Name

Process name.

memory_usage

Memory usage.

memory_max_usage

Maximum memory usage.

memory_limit

Hard upper limit of memory usage of the cgroup.

memory_soft_limit

Soft upper limit of memory usage of the cgroup.

Translation
Download
Updated: 2019-07-12

Document ID: EDOC1000138402

Views: 606024

Downloads: 693

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next