Linux / python · 10月 13, 2022 0

使用python 查看 linux 负载

内容纲要

使用python代码获取linux的系统负载

import os
os.getloadavg ()

(1.1200000000000001, 1.0600000000000001, 0.79000000000000004)

From there, you can do whatever checks you need, and then email you, or similar.

%d 博主赞过: