cgroup.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:docklet 作者: unias 项目源码 文件源码
def get_cgroup_containers():
        containers = subprocess.getoutput("find %s -type d 2>/dev/null | awk -F\/ '{print $(NF-1)}'" % (cgroup_manager.__default_prefix__ % ('cpu', '*', '.'))).split()
        uuids = []
        for item in containers:
            if item.startswith('docker-') and item.endswith('.scope') and len(item) > 64:
                uuids.append(item[7:-6])
            else:
                uuids.append(item)
        return uuids
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号