--- projects/libstatgrab/examples/network_traffic.c 2004/03/06 22:37:27 1.9 +++ projects/libstatgrab/examples/network_traffic.c 2004/03/08 12:30:08 1.11 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Id: network_traffic.c,v 1.9 2004/03/06 22:37:27 tdb Exp $ + * $Id: network_traffic.c,v 1.11 2004/03/08 12:30:08 tdb Exp $ */ /* A very basic example of how to get the network statistics from the system @@ -122,11 +122,11 @@ int main(int argc, char **argv){ printf("\033[%d;2H%-30s : %5.2f m", line_number++, "Network Interface Rx", network_stats->rx / (1024.00*1024.00)); printf("\033[%d;2H%-30s : %5.2f m", line_number++, "Network Interface Tx", network_stats->tx / (1024.00*1024.00)); } - printf("\033[%d;2H%-30s : %ld ", line_number++, "Network Interface packets in", network_stats->ipackets); - printf("\033[%d;2H%-30s : %ld ", line_number++, "Network Interface packets out", network_stats->opackets); - printf("\033[%d;2H%-30s : %ld ", line_number++, "Network Interface errors in", network_stats->ierrors); - printf("\033[%d;2H%-30s : %ld ", line_number++, "Network Interface errors out", network_stats->oerrors); - printf("\033[%d;2H%-30s : %ld ", line_number++, "Network Interface collisions", network_stats->collisions); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Interface packets in", network_stats->ipackets); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Interface packets out", network_stats->opackets); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Interface errors in", network_stats->ierrors); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Interface errors out", network_stats->oerrors); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Interface collisions", network_stats->collisions); printf("\033[%d;2H%-30s : %ld ", line_number++, "Network Interface systime", (long) network_stats->systime); /* Add a blank line between interfaces */ @@ -161,11 +161,11 @@ int main(int argc, char **argv){ printf("\033[%d;2H%-30s : %5.2f m", line_number++, "Network Total Tx", (total_tx / (1024.00*1024.00))); break; } - printf("\033[%d;2H%-30s : %8lld b", line_number++, "Network Total packets in", total_ipackets); - printf("\033[%d;2H%-30s : %8lld b", line_number++, "Network Total packets out", total_opackets); - printf("\033[%d;2H%-30s : %8lld b", line_number++, "Network Total errors in", total_ierrors); - printf("\033[%d;2H%-30s : %8lld b", line_number++, "Network Total errors out", total_oerrors); - printf("\033[%d;2H%-30s : %8lld b", line_number++, "Network Total collisions", total_collisions); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Total packets in", total_ipackets); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Total packets out", total_opackets); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Total errors in", total_ierrors); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Total errors out", total_oerrors); + printf("\033[%d;2H%-30s : %lld ", line_number++, "Network Total collisions", total_collisions); fflush(stdout);