ServerAddon.py 文件源码

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

项目:zual 作者: ninadmhatre 项目源码 文件源码
def _get_memory_stats(self):
        mem_info = {'virtual': {}, 'swap': {}}
        v_mem = ps.virtual_memory()
        s_mem = ps.swap_memory()

        _c = mem_info['virtual']
        _c['total'] = v_mem.total
        _c['used'] = v_mem.used
        _c['free'] = v_mem.free
        _c['used_percent'] = v_mem.percent

        _c = mem_info['swap']
        _c['total'] = s_mem.total
        _c['used'] = s_mem.used
        _c['free'] = s_mem.free
        _c['used_percent'] = s_mem.percent

        return mem_info
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号