mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine network bytes of summaries, remove the lo data.
This commit is contained in:
parent
d0b08d0d51
commit
b0e4dc8085
2 changed files with 11 additions and 5 deletions
|
@ -406,12 +406,17 @@ int SrsApiSummaries::do_process_request(SrsSocket* skt, SrsHttpMessage* req)
|
|||
int nb_n = srs_get_network_devices_count();
|
||||
for (int i = 0; i < nb_n; i++) {
|
||||
SrsNetworkDevices& o = n[i];
|
||||
if (o.ok) {
|
||||
n_ok = true;
|
||||
nr_bytes += o.rbytes;
|
||||
ns_bytes += o.sbytes;
|
||||
n_sample_time = o.sample_time;
|
||||
|
||||
// ignore the lo interface.
|
||||
std::string inter = o.name;
|
||||
if (!o.ok || inter == "lo") {
|
||||
continue;
|
||||
}
|
||||
|
||||
n_ok = true;
|
||||
nr_bytes += o.rbytes;
|
||||
ns_bytes += o.sbytes;
|
||||
n_sample_time = o.sample_time;
|
||||
}
|
||||
|
||||
ss << JOBJECT_START
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue