摘要: 一. 命令行获取 通过调用shell命令获取系统信息,如cpu个数,cpu/内存磁盘使用情况,网络信息等。golang可通过gopsutil库获取。 获取IP地址:ifconfig ens33 | awk '/inet addr/{ print \$2; }' | cut -d : -f 2 CPU 阅读全文
posted @ 2019-10-04 10:37 yuxi_o 阅读(670) 评论(0) 推荐(0)