0
當我運行下面的命令,我得到cgroup change of group failed
:RHEL:A組的cgroup更改失敗
cgexec --sticky -g *:/throttle some_task
CGROUP throttle
在cgconfig.conf定義,它看起來像這樣:
# Configuration file generated by cgsnapshot
mount {
cpuset = /cgroup/cpuset;
cpu = /cgroup/cpu;
cpuacct = /cgroup/cpuacct;
memory = /cgroup/memory;
devices = /cgroup/devices;
freezer = /cgroup/freezer;
net_cls = /cgroup/net_cls;
blkio = /cgroup/blkio;
}
group throttle {
cpu {
cpu.rt_period_us="1000000";
cpu.rt_runtime_us="0";
cpu.cfs_period_us="1000000";
cpu.cfs_quota_us="500000";
cpu.shares="1024";
}
}
group throttle {
memory {
memory.memsw.failcnt="0";
memory.limit_in_bytes="1073741824";
memory.memsw.max_usage_in_bytes="0";
memory.move_charge_at_immigrate="0";
memory.swappiness="60";
memory.use_hierarchy="0";
memory.failcnt="0";
memory.soft_limit_in_bytes="134217728";
memory.memsw.limit_in_bytes="1073741824";
memory.max_usage_in_bytes="0";
}
}
group throttle {
blkio {
blkio.throttle.write_iops_device="8:0 10";
blkio.throttle.read_iops_device="8:0 10";
blkio.throttle.write_bps_device="";
blkio.throttle.read_bps_device="";
blkio.weight="500";
blkio.weight_device="";
}
}
我已經搜索了很多,並沒有線索如何開始解決這個問題。這似乎通常與不正確的權限相關聯。但是,我沒有定義權限(cgroups的文檔說這是可選的)。我以root身份運行該進程。
如果你寫''*:/ throttle'',會發生什麼?用引號?殼牌擴張會毀了這個嗎?如果是的話,我很驚訝,manpage並沒有警告它,但是... –