----- Original Message -----
Hello, Dave,
To begin with, I am sincerely grateful for your detailed suggestions.
I have read the suggetions you gave and finished modifying the relative
parts. The following will demonstrate the modifications.
The first is when it comes to older kernels that do not have cgroups, it
now offers justification of whether the kernel have cgroups and output
information when the kernel do not contain cgroup.
Good...
Secondly, you mentioned the cgroups "unabled" in the
previous mail,
considerring those inactive cgroups whose root(cgroupfs_root) is not
linked by the active root list, I prefer to display something when there
are no active cgroups other than output the inactive cgroups.
If the inactive cgroups' information is needy, I need to rethink and
find another way to get target data structure.
Showing just the enabled cgroups is fine, and what you have done is OK.
Thirdly, the unnecessary -h option was deleted and help information
was
corrected according to your suggestions.
OK.
Lastly, the changed "lscgroup" command add the address of
cgroup when
displaying cgroups. For the reason that address length is fixed on a
certain system, the first column of output is used to display the address.
Typically command headers use capitalized structure names,
and output sections are separated with two spaces. So instead
of this:
crash> lscgroup
CGROUP_ADDR <CONTROLLER>:<PATH>
ffff88020ff82030 perf_event:/
ffff88020ff80030 blkio:/
ffff8801f5f2d400 blkio:/libvirt
ffff880212ae2c00 blkio:/libvirt/lxc
ffff8801f659d000 blkio:/libvirt/qemu
I would suggest this:
crash> lscgroup
CGROUP CONTROLLER:PATH
ffff88020ff82030 perf_event:/
ffff88020ff80030 blkio:/
ffff8801f5f2d400 blkio:/libvirt
ffff880212ae2c00 blkio:/libvirt/lxc
ffff8801f659d000 blkio:/libvirt/qemu
...
And I would suggest a new option, where a user can enter a cgroup
address, and it would find and display its controller/path name:
crash> lscgroup
CGROUP CONTROLLER:PATH
ffff8801f668c400 cpuacct,cpu:/system/nfs-lock.service
crash>
Thanks,
Dave