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);
358
358
else if (HAS_PPARTITIONS(flags)) {
359
read_partitions_disk(st_disk, a->nr);
359
read_partitions_disk(st_disk, *a->nr);
362
read_stat_disk(st_disk, a->nr);
362
read_stat_disk(st_disk, *a->nr);
523
***************************************************************************
524
* Read IP statistics.
527
* @a Activity structure.
530
* @a Activity structure with statistics.
531
***************************************************************************
533
__read_funct_t wrap_read_net_ip(struct activity *a)
535
struct stats_net_ip *st_net_ip
536
= (struct stats_net_ip *) a->_buf0;
539
read_net_ip(st_net_ip);
545
***************************************************************************
546
* Read IP error statistics.
549
* @a Activity structure.
552
* @a Activity structure with statistics.
553
***************************************************************************
555
__read_funct_t wrap_read_net_eip(struct activity *a)
557
struct stats_net_eip *st_net_eip
558
= (struct stats_net_eip *) a->_buf0;
560
/* Read IP error stats */
561
read_net_eip(st_net_eip);
567
***************************************************************************
568
* Read ICMP statistics.
571
* @a Activity structure.
574
* @a Activity structure with statistics.
575
***************************************************************************
577
__read_funct_t wrap_read_net_icmp(struct activity *a)
579
struct stats_net_icmp *st_net_icmp
580
= (struct stats_net_icmp *) a->_buf0;
582
/* Read ICMP stats */
583
read_net_icmp(st_net_icmp);
589
***************************************************************************
590
* Read ICMP error statistics.
593
* @a Activity structure.
596
* @a Activity structure with statistics.
597
***************************************************************************
599
__read_funct_t wrap_read_net_eicmp(struct activity *a)
601
struct stats_net_eicmp *st_net_eicmp
602
= (struct stats_net_eicmp *) a->_buf0;
604
/* Read ICMP error stats */
605
read_net_eicmp(st_net_eicmp);
611
***************************************************************************
612
* Read TCP statistics.
615
* @a Activity structure.
618
* @a Activity structure with statistics.
619
***************************************************************************
621
__read_funct_t wrap_read_net_tcp(struct activity *a)
623
struct stats_net_tcp *st_net_tcp
624
= (struct stats_net_tcp *) a->_buf0;
627
read_net_tcp(st_net_tcp);
633
***************************************************************************
634
* Read TCP error statistics.
637
* @a Activity structure.
640
* @a Activity structure with statistics.
641
***************************************************************************
643
__read_funct_t wrap_read_net_etcp(struct activity *a)
645
struct stats_net_etcp *st_net_etcp
646
= (struct stats_net_etcp *) a->_buf0;
648
/* Read TCP error stats */
649
read_net_etcp(st_net_etcp);
655
***************************************************************************
656
* Read UDP statistics.
659
* @a Activity structure.
662
* @a Activity structure with statistics.
663
***************************************************************************
665
__read_funct_t wrap_read_net_udp(struct activity *a)
667
struct stats_net_udp *st_net_udp
668
= (struct stats_net_udp *) a->_buf0;
671
read_net_udp(st_net_udp);