[Crash-utility] [PATCH] add a new command: cgget

Zhang Xiaohe zhangxh at cn.fujitsu.com
Fri Dec 7 10:28:35 UTC 2012


Hello Dave,

I made a new command 'cgget' to help investigating parameters
of cgroup.

Followings are 2 examples.

1. Print parameters of some cgroup
crash> cgget -g cpu /
/:
cpu.rt_period_us: 1000000
cpu.rt_runtime_us: 950000
cpu.stat:
         nr_periods: 0
         nr_throttled: 0
         throttled_time: 0
cpu.cfs_period_us: 0
cpu.cfs_quota_us: 0
cpu.shares: 1024

2. Print parameters of all cgroups
crash> cgget -a /
/:
cpuset.cpu_exclusive: 1
cpuset.mem_exclusive: 1
cpuset.mem_hardwall: 0
cpuset.memory_migrate: 0
cpuset.sched_load_balance: 1
cpuset.memory_spread_page: 0
cpuset.memory_spread_slab: 0
cpuset.memory_pressure_enabled: 0
cpuset.memory_pressure: 0
cpuset.sched_relax_domain_level: -1
cpuset.mems: 0
cpuset.cpus: 0-3
...
blkio.io_merged:
         8:0 Read 10925
         8:0 Write 31704
         8:0 Sync 25413
         8:0 Async 17216
         8:0 Total 42629
         Total 42629
blkio.io_queued:
         8:0 Read 0
         8:0 Write 0
         8:0 Sync 0
         8:0 Async 0
         8:0 Total 0
         Total 0
blkio.reset_stats:

To build the module from the top-level crash-<version> directory, enter:
   $ cp <path-to>/cgget.c extensions
   $ make extensions

Please refer to the attachment for more information. And I'm
expecting you to give me some advices soon.

-- 
Zhang Xiaohe
Regards
--------------------------------------------------
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8552
FAX: +86+25-83317685
MAIL: zhangxh at cn.fujitsu.com
--------------------------------------------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cgget.c
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20121207/1eaac923/attachment.c>


More information about the Crash-utility mailing list