summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorhasso <hasso>2005-01-18 13:44:35 +0000
committerhasso <hasso>2005-01-18 13:44:35 +0000
commit6f2c27af2189794187e4c30ee70fcb9cc6cb1a3b (patch)
tree43e2830ca4d832b3d68bb9f5ddaa6cf9328c0a14 /zebra
parent239c26fdeae4dbccb43da359f9ea034041440831 (diff)
* interface.c: Better statistics output in "show interface" command in
case of /proc being used. I don't have others to test with at the moment.
Diffstat (limited to 'zebra')
-rw-r--r--zebra/ChangeLog5
-rw-r--r--zebra/interface.c28
2 files changed, 20 insertions, 13 deletions
diff --git a/zebra/ChangeLog b/zebra/ChangeLog
index 8f34c94c..b3710cf2 100644
--- a/zebra/ChangeLog
+++ b/zebra/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-18 Hasso Tepper <hasso at quagga.net>
+
+ * interface.c: Better statistics output in "show interface" command in
+ case of /proc being used.
+
2005-01-17 Hasso Tepper <hasso at quagga.net>
* main.c: With --nl-bufsize argument is required.
diff --git a/zebra/interface.c b/zebra/interface.c
index 391997bf..0b206d32 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -742,30 +742,32 @@ if_dump_vty (struct vty *vty, struct interface *ifp)
#ifdef HAVE_PROC_NET_DEV
/* Statistics print out using proc file system. */
- vty_out (vty, " input packets %lu, bytes %lu, dropped %lu,"
- " multicast packets %lu%s",
- ifp->stats.rx_packets, ifp->stats.rx_bytes,
- ifp->stats.rx_dropped, ifp->stats.rx_multicast, VTY_NEWLINE);
+ vty_out (vty, " %lu input packets (%lu multicast), %lu bytes, "
+ "%lu dropped%s",
+ ifp->stats.rx_packets, ifp->stats.rx_multicast,
+ ifp->stats.rx_bytes, ifp->stats.rx_dropped, VTY_NEWLINE);
- vty_out (vty, " input errors %lu, length %lu, overrun %lu,"
- " CRC %lu, frame %lu, fifo %lu, missed %lu%s",
+ vty_out (vty, " %lu input errors, %lu length, %lu overrun,"
+ " CRC %lu, frame %lu%s",
ifp->stats.rx_errors, ifp->stats.rx_length_errors,
ifp->stats.rx_over_errors, ifp->stats.rx_crc_errors,
- ifp->stats.rx_frame_errors, ifp->stats.rx_fifo_errors,
+ ifp->stats.rx_frame_errors, VTY_NEWLINE);
+
+ vty_out (vty, " %lu fifo, %lu missed%s", ifp->stats.rx_fifo_errors,
ifp->stats.rx_missed_errors, VTY_NEWLINE);
- vty_out (vty, " output packets %lu, bytes %lu, dropped %lu%s",
+ vty_out (vty, " %lu output packets, %lu bytes, %lu dropped%s",
ifp->stats.tx_packets, ifp->stats.tx_bytes,
ifp->stats.tx_dropped, VTY_NEWLINE);
- vty_out (vty, " output errors %lu, aborted %lu, carrier %lu,"
- " fifo %lu, heartbeat %lu, window %lu%s",
+ vty_out (vty, " %lu output errors, %lu aborted, %lu carrier,"
+ " %lu fifo, %lu heartbeat%s",
ifp->stats.tx_errors, ifp->stats.tx_aborted_errors,
ifp->stats.tx_carrier_errors, ifp->stats.tx_fifo_errors,
- ifp->stats.tx_heartbeat_errors, ifp->stats.tx_window_errors,
- VTY_NEWLINE);
+ ifp->stats.tx_heartbeat_errors, VTY_NEWLINE);
- vty_out (vty, " collisions %lu%s", ifp->stats.collisions, VTY_NEWLINE);
+ vty_out (vty, " %lu window, %lu collisions%s",
+ ifp->stats.tx_window_errors, ifp->stats.collisions, VTY_NEWLINE);
#endif /* HAVE_PROC_NET_DEV */
#ifdef HAVE_NET_RT_IFLIST