~ubuntu-branches/ubuntu/wily/sysstat/wily

« back to all changes in this revision

Viewing changes to xml_stats.c

  • Committer: Package Import Robot
  • Author(s): Robert Luberda
  • Date: 2013-09-21 22:27:45 UTC
  • mfrom: (22.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20130921222745-8e9zv1n3tn3uc0wa
Tags: 10.1.7-1
* New upstream version.
* Remove no longer needed 11-fix-concurrency-build-issue.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
738
738
{
739
739
        int i, j;
740
740
        struct stats_net_dev *sndc, *sndp;
 
741
        double rxkb, txkb, ifutil;
741
742
 
742
743
        if (!IS_SELECTED(a->options) || (a->nr <= 0))
743
744
                goto close_xml_markup;
755
756
                j = check_net_dev_reg(a, curr, !curr, i);
756
757
                sndp = (struct stats_net_dev *) ((char *) a->buf[!curr] + j * a->msize);
757
758
 
 
759
                rxkb = S_VALUE(sndp->rx_bytes, sndc->rx_bytes, itv);
 
760
                txkb = S_VALUE(sndp->tx_bytes, sndc->tx_bytes, itv);
 
761
                ifutil = compute_ifutil(sndc, rxkb, txkb);
 
762
 
758
763
                xprintf(tab, "<net-dev iface=\"%s\" "
759
764
                        "rxpck=\"%.2f\" "
760
765
                        "txpck=\"%.2f\" "
762
767
                        "txkB=\"%.2f\" "
763
768
                        "rxcmp=\"%.2f\" "
764
769
                        "txcmp=\"%.2f\" "
765
 
                        "rxmcst=\"%.2f\"/>",
 
770
                        "rxmcst=\"%.2f\" "
 
771
                        "ifutil-percent=\"%.2f\"/>",
766
772
                        sndc->interface,
767
773
                        S_VALUE(sndp->rx_packets,    sndc->rx_packets,    itv),
768
774
                        S_VALUE(sndp->tx_packets,    sndc->tx_packets,    itv),
769
 
                        S_VALUE(sndp->rx_bytes,      sndc->rx_bytes,      itv) / 1024,
770
 
                        S_VALUE(sndp->tx_bytes,      sndc->tx_bytes,      itv) / 1024,
 
775
                        rxkb / 1024,
 
776
                        txkb / 1024,
771
777
                        S_VALUE(sndp->rx_compressed, sndc->rx_compressed, itv),
772
778
                        S_VALUE(sndp->tx_compressed, sndc->tx_compressed, itv),
773
 
                        S_VALUE(sndp->multicast,     sndc->multicast,     itv));
 
779
                        S_VALUE(sndp->multicast,     sndc->multicast,     itv),
 
780
                        ifutil);
774
781
        }
775
782
        tab--;
776
783