add network minitor.
This commit is contained in:
parent
36f956b590
commit
d72b03165e
@ -34,7 +34,7 @@ void SystemUsage::start() {
|
|||||||
publish("yuyun_disk_usage", static_cast<int>(100.0f * diskUsage("/")), "%", "磁盘占用率");
|
publish("yuyun_disk_usage", static_cast<int>(100.0f * diskUsage("/")), "%", "磁盘占用率");
|
||||||
m_lastCpuStats = currentCpuStats;
|
m_lastCpuStats = currentCpuStats;
|
||||||
|
|
||||||
m_networkStats.push_back(networkStats("eth0"));
|
m_networkStats.push_back(networkStats("ens18"));
|
||||||
while (m_networkStats.size() >= 2) {
|
while (m_networkStats.size() >= 2) {
|
||||||
constexpr auto SpeedInterval = seconds(60 * 15);
|
constexpr auto SpeedInterval = seconds(60 * 15);
|
||||||
auto front = m_networkStats.front();
|
auto front = m_networkStats.front();
|
||||||
|
Loading…
Reference in New Issue
Block a user