Projet

Général

Profil

Révision 5105020f

ID5105020fcfadf6adb45133c604db55639de7596e
Parent 241b0c60
Enfant 50a998b4

Ajouté par Marc SCHAEFER il y a plus de 6 ans

- added systemd possibility for stats - cleanup

Voir les différences:

plugins/lxc/lxc_proc
47 47
# Ubuntu 12.04 with fstab: /sys/fs/cgroup/lxc/<container>/tasks
48 48
# Ubuntu 12.04 with cgroup-lite: /sys/fs/cgroup/cpuacct/lxc/<container>/tasks
49 49
# Ubuntu 12.04 with cgroup-bin: /sys/fs/cgroup/cpuacct/sysdefault/lxc/<container>/tasks
50
# Ubuntu 14.04 /sys/fs/cgroup/systemd/lxc/<container>/tasks
50 51
# and with cgmanager on jessie
51 52
count_processes () {
52 53
    [ -z "$1" ] && return 0
......
61 62
    for SYSFS in \
62 63
        /sys/fs/cgroup/$1/tasks \
63 64
        /sys/fs/cgroup/lxc/$1/tasks \
65
        /sys/fs/cgroup/systemd/lxc/$1/tasks \
64 66
        /sys/fs/cgroup/cpuacct/lxc/$1/tasks \
65
        /sys/fs/cgroup/cpuacct/sysdefault/lxc/$1/tasks \
66
    ; do
67
        /sys/fs/cgroup/cpuacct/sysdefault/lxc/$1/tasks
68
    do
67 69
        if [ -e $SYSFS ]; then
68 70
            return `wc -l < $SYSFS`
69 71
        fi

Formats disponibles : Unified diff