]> git.proxmox.com Git - mirror_lxcfs.git/commit - lxcfs.c
Calculate and read the average load.
authorzhang2639 <zhangshiqiang@hust.edu.cn>
Thu, 24 May 2018 10:42:37 +0000 (18:42 +0800)
committerzhang2639 <zhangshiqiang@hust.edu.cn>
Thu, 24 May 2018 10:42:37 +0000 (18:42 +0800)
commit6db4f7a36aca41e2db91ac55f95ace1f27676db6
treea59cd43accd0bf343397be92e26f97a0642b2672
parent0e47acaa3d3131ff07fe8b37fb3bc839dbc3279e
Calculate and read the average load.

Use load daemon to calculate the loadavg and use proc_loadavg_read() to read the loadavg.
calc_pid : find the process pid from cgroup path of a container.
calc_load : calculate the loadavg of a container.
refresh_load : refresh the loadavg of a container.
load_begin : traverse the hash table and update it.

Signed-off-by: zhang2639 <zhangshiqiang@hust.edu.cn>
Signed-off-by: yuwang <yuwang@linux.alibaba.com>
bindings.c
bindings.h
lxcfs.c