~ubuntu-branches/ubuntu/natty/sysstat/natty

« back to all changes in this revision

Viewing changes to sa_stub.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Luberda
  • Date: 2008-11-13 19:46:29 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20081113194629-kvn8jz6g7unc5ksq
Tags: 8.1.7-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
                = (struct stats_cpu *) a->_buf0;
165
165
        
166
166
        /* Read CPU statistics */
167
 
        read_stat_cpu(st_cpu, a->nr, &(record_hdr.uptime), &(record_hdr.uptime0));
 
167
        read_stat_cpu(st_cpu, *a->nr, &record_hdr.uptime, &record_hdr.uptime0);
168
168
        
169
169
        return;
170
170
}
208
208
                = (struct stats_irq *) a->_buf0;
209
209
 
210
210
        /* Read interrupts stats */
211
 
        read_stat_irq(st_irq, a->nr);
 
211
        read_stat_irq(st_irq, *a->nr);
212
212
        
213
213
        return;
214
214
}
353
353
 
354
354
        /* Try to read stats from /proc/diskstats, /proc/partitions or /proc/stat */
355
355
        if (HAS_DISKSTATS(flags)) {
356
 
                read_diskstats_disk(st_disk, a->nr);
 
356
                read_diskstats_disk(st_disk, *a->nr);
357
357
        }
358
358
        else if (HAS_PPARTITIONS(flags)) {
359
 
                read_partitions_disk(st_disk, a->nr);
 
359
                read_partitions_disk(st_disk, *a->nr);
360
360
        }
361
361
        else {
362
 
                read_stat_disk(st_disk, a->nr);
 
362
                read_stat_disk(st_disk, *a->nr);
363
363
        }
364
364
 
365
365
        return;
382
382
                = (struct stats_serial *) a->_buf0;
383
383
 
384
384
        /* Read serial lines stats */
385
 
        read_tty_driver_serial(st_serial, a->nr);
 
385
        read_tty_driver_serial(st_serial, *a->nr);
386
386
        
387
387
        return;
388
388
}
426
426
                = (struct stats_net_dev *) a->_buf0;
427
427
 
428
428
        /* Read network interfaces stats */
429
 
        read_net_dev(st_net_dev, a->nr);
 
429
        read_net_dev(st_net_dev, *a->nr);
430
430
        
431
431
        return;
432
432
}
448
448
                = (struct stats_net_edev *) a->_buf0;
449
449
 
450
450
        /* Read network interfaces errors stats */
451
 
        read_net_edev(st_net_edev, a->nr);
 
451
        read_net_edev(st_net_edev, *a->nr);
452
452
        
453
453
        return;
454
454
}
519
519
        return;
520
520
}
521
521
 
 
522
/*
 
523
 ***************************************************************************
 
524
 * Read IP statistics.
 
525
 *
 
526
 * IN:
 
527
 * @a   Activity structure.
 
528
 *
 
529
 * OUT:
 
530
 * @a   Activity structure with statistics.
 
531
 ***************************************************************************
 
532
 */
 
533
__read_funct_t wrap_read_net_ip(struct activity *a)
 
534
{
 
535
        struct stats_net_ip *st_net_ip
 
536
                = (struct stats_net_ip *) a->_buf0;
 
537
 
 
538
        /* Read IP stats */
 
539
        read_net_ip(st_net_ip);
 
540
        
 
541
        return;
 
542
}
 
543
 
 
544
/*
 
545
 ***************************************************************************
 
546
 * Read IP error statistics.
 
547
 *
 
548
 * IN:
 
549
 * @a   Activity structure.
 
550
 *
 
551
 * OUT:
 
552
 * @a   Activity structure with statistics.
 
553
 ***************************************************************************
 
554
 */
 
555
__read_funct_t wrap_read_net_eip(struct activity *a)
 
556
{
 
557
        struct stats_net_eip *st_net_eip
 
558
                = (struct stats_net_eip *) a->_buf0;
 
559
 
 
560
        /* Read IP error stats */
 
561
        read_net_eip(st_net_eip);
 
562
        
 
563
        return;
 
564
}
 
565
 
 
566
/*
 
567
 ***************************************************************************
 
568
 * Read ICMP statistics.
 
569
 *
 
570
 * IN:
 
571
 * @a   Activity structure.
 
572
 *
 
573
 * OUT:
 
574
 * @a   Activity structure with statistics.
 
575
 ***************************************************************************
 
576
 */
 
577
__read_funct_t wrap_read_net_icmp(struct activity *a)
 
578
{
 
579
        struct stats_net_icmp *st_net_icmp
 
580
                = (struct stats_net_icmp *) a->_buf0;
 
581
 
 
582
        /* Read ICMP stats */
 
583
        read_net_icmp(st_net_icmp);
 
584
        
 
585
        return;
 
586
}
 
587
 
 
588
/*
 
589
 ***************************************************************************
 
590
 * Read ICMP error statistics.
 
591
 *
 
592
 * IN:
 
593
 * @a   Activity structure.
 
594
 *
 
595
 * OUT:
 
596
 * @a   Activity structure with statistics.
 
597
 ***************************************************************************
 
598
 */
 
599
__read_funct_t wrap_read_net_eicmp(struct activity *a)
 
600
{
 
601
        struct stats_net_eicmp *st_net_eicmp
 
602
                = (struct stats_net_eicmp *) a->_buf0;
 
603
 
 
604
        /* Read ICMP error stats */
 
605
        read_net_eicmp(st_net_eicmp);
 
606
        
 
607
        return;
 
608
}
 
609
 
 
610
/*
 
611
 ***************************************************************************
 
612
 * Read TCP statistics.
 
613
 *
 
614
 * IN:
 
615
 * @a   Activity structure.
 
616
 *
 
617
 * OUT:
 
618
 * @a   Activity structure with statistics.
 
619
 ***************************************************************************
 
620
 */
 
621
__read_funct_t wrap_read_net_tcp(struct activity *a)
 
622
{
 
623
        struct stats_net_tcp *st_net_tcp
 
624
                = (struct stats_net_tcp *) a->_buf0;
 
625
 
 
626
        /* Read TCP stats */
 
627
        read_net_tcp(st_net_tcp);
 
628
        
 
629
        return;
 
630
}
 
631
 
 
632
/*
 
633
 ***************************************************************************
 
634
 * Read TCP error statistics.
 
635
 *
 
636
 * IN:
 
637
 * @a   Activity structure.
 
638
 *
 
639
 * OUT:
 
640
 * @a   Activity structure with statistics.
 
641
 ***************************************************************************
 
642
 */
 
643
__read_funct_t wrap_read_net_etcp(struct activity *a)
 
644
{
 
645
        struct stats_net_etcp *st_net_etcp
 
646
                = (struct stats_net_etcp *) a->_buf0;
 
647
 
 
648
        /* Read TCP error stats */
 
649
        read_net_etcp(st_net_etcp);
 
650
        
 
651
        return;
 
652
}
 
653
 
 
654
/*
 
655
 ***************************************************************************
 
656
 * Read UDP statistics.
 
657
 *
 
658
 * IN:
 
659
 * @a   Activity structure.
 
660
 *
 
661
 * OUT:
 
662
 * @a   Activity structure with statistics.
 
663
 ***************************************************************************
 
664
 */
 
665
__read_funct_t wrap_read_net_udp(struct activity *a)
 
666
{
 
667
        struct stats_net_udp *st_net_udp
 
668
                = (struct stats_net_udp *) a->_buf0;
 
669
 
 
670
        /* Read UDP stats */
 
671
        read_net_udp(st_net_udp);
 
672
        
 
673
        return;
 
674
}