8.8 Displaying and Setting Subsystem Parameters

To display the value of a subsystem parameter, use the cgget command. The following example shows how to display the memory statistics for the cgroup hipri.

# cgget -r memory.stat hipri
        rss 168132608
        mapped_file 57577472

You can use the cgset command to change the value of subsystem parameters for a cgroup. The next example removes input throttling from the device /dev/sda1 for the cgroup iocap1 by setting the value of blkio.throttle.read_bps_device to 0.

# cgset -r blkio.throttle.read_bps_device="8:1 0" iocap1

Any change that you make to a parameter is effective only while the cgconfig service continues to run. The cgset command does not write the new value to the configuration file, /etc/cgconfig.conf. You can use the cgsnapshot command to display the current cgroup configuration in a form that you can use as the basis for a new /etc/cgconfig.conf file.

# cgsnapshot -s > current_cgconfig.conf

For more information, see the cgget(1), cgset(1), and cgsnapshot(1) manual pages.