@property
    def type(self):
        path = self.short_path

        # Guess cgroup owner
        if any(path.startswith(prefix) for prefix in DOCKER_PREFIXES):
            return 'docker'
        elif path.startswith('/lxc/'):
            return 'lxc'
        elif path.startswith('/user.slice/'):
            _, parent, name = path.rsplit('/', 2)
            if parent.endswith('.scope'):
                if os.path.isdir('/home/%s/.local/share/lxc/%s' % (self.owner, name)):
                    return 'lxc-user'
            return 'systemd'
        elif path == '/user.slice' or path == '/system.slice' or path.startswith('/system.slice/'):
            return 'systemd'
        elif regexp_ovz_container.match(path) and path != '/0' and HAS_OPENVZ:
            return 'openvz'
        else:
            return '-'
dataset/ETHPy150Open yadutaf/ctop/cgroup_top.py/Cgroup.type/original