Now, after r263102 we have ifi_oqdrops in if_data, restore printing of
output queue drops in netstat(1). No driver, neither kernel fills this field in if_data, yet. Sponsored by: Netflix Sponsored by: Nginx, Inc.
This commit is contained in:
parent
b41aca8e4d
commit
1bb14616e9
@ -249,7 +249,7 @@ intpr(int interval, void (*pfunc)(char *), int af)
|
||||
printf(" %10.10s","Obytes");
|
||||
printf(" %5s", "Coll");
|
||||
if (dflag)
|
||||
printf(" %s", "Drop");
|
||||
printf(" %s", "Drop");
|
||||
putchar('\n');
|
||||
}
|
||||
|
||||
@ -358,7 +358,8 @@ intpr(int interval, void (*pfunc)(char *), int af)
|
||||
if (bflag)
|
||||
show_stat("lu", 10, IFA_STAT(obytes), link|network);
|
||||
show_stat("NRSlu", 5, IFA_STAT(collisions), link);
|
||||
/* XXXGL: output queue drops */
|
||||
if (dflag)
|
||||
show_stat("LSlu", 5, IFA_STAT(oqdrops), link);
|
||||
putchar('\n');
|
||||
|
||||
if (!aflag)
|
||||
@ -438,6 +439,7 @@ struct iftot {
|
||||
u_long ift_id; /* input drops */
|
||||
u_long ift_op; /* output packets */
|
||||
u_long ift_oe; /* output errors */
|
||||
u_long ift_od; /* output drops */
|
||||
u_long ift_co; /* collisions */
|
||||
u_long ift_ib; /* input bytes */
|
||||
u_long ift_ob; /* output bytes */
|
||||
@ -473,6 +475,7 @@ fill_iftot(struct iftot *st)
|
||||
st->ift_ib += IFA_STAT(ibytes);
|
||||
st->ift_op += IFA_STAT(opackets);
|
||||
st->ift_oe += IFA_STAT(oerrors);
|
||||
st->ift_od += IFA_STAT(oqdrops);
|
||||
st->ift_ob += IFA_STAT(obytes);
|
||||
st->ift_co += IFA_STAT(collisions);
|
||||
}
|
||||
@ -551,7 +554,8 @@ sidewaysintpr(int interval)
|
||||
show_stat("lu", 5, new->ift_oe - old->ift_oe, 1);
|
||||
show_stat("lu", 10, new->ift_ob - old->ift_ob, 1);
|
||||
show_stat("NRSlu", 5, new->ift_co - old->ift_co, 1);
|
||||
/* XXXGL: output queue drops */
|
||||
if (dflag)
|
||||
show_stat("LSlu", 5, new->ift_od - old->ift_od, 1);
|
||||
putchar('\n');
|
||||
fflush(stdout);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user