~ubuntu-branches/ubuntu/lucid/sysstat/lucid

« back to all changes in this revision

Viewing changes to sa.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Luberda
  • Date: 2009-03-08 19:01:43 UTC
  • mfrom: (1.1.14 upstream)
  • Revision ID: james.westby@ubuntu.com-20090308190143-88odmo9euvg7f71d
Tags: 9.0.1-1
* New upstream release:
  + sar man page now mentions dependencies on sadc options (closes: #518438).
* Makefile.in: don't update sysstat.pot in clean. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * sar/sadc: Report system activity
3
 
 * (C) 1999-2008 by Sebastien Godard (sysstat <at> orange.fr)
 
3
 * (C) 1999-2009 by Sebastien Godard (sysstat <at> orange.fr)
4
4
 */
5
5
 
6
6
#ifndef _SA_H
17
17
 */
18
18
 
19
19
/* Number of activities */
20
 
#define NR_ACT  23
 
20
#define NR_ACT  30
21
21
 
22
22
/* Activities */
23
23
#define A_CPU           1
43
43
#define A_NET_TCP       21
44
44
#define A_NET_ETCP      22
45
45
#define A_NET_UDP       23
 
46
#define A_NET_SOCK6     24
 
47
#define A_NET_IP6       25
 
48
#define A_NET_EIP6      26
 
49
#define A_NET_ICMP6     27
 
50
#define A_NET_EICMP6    28
 
51
#define A_NET_UDP6      29
 
52
#define A_PWR_CPUFREQ   30
 
53
 
46
54
 
47
55
/* Macro used to flag an activity that should be collected */
48
56
#define COLLECT_ACTIVITY(m)     act[get_activity_position(act, m)]->options |= AO_COLLECTED
126
134
#define K_DISK          "DISK"
127
135
#define K_INT           "INT"
128
136
#define K_SNMP          "SNMP"
 
137
#define K_SOCK6         "SOCK6"
 
138
#define K_IP6           "IP6"
 
139
#define K_EIP6          "EIP6"
 
140
#define K_ICMP6         "ICMP6"
 
141
#define K_EICMP6        "EICMP6"
 
142
#define K_UDP6          "UDP6"
 
143
#define K_IPV6          "IPV6"
 
144
#define K_POWER         "POWER"
129
145
 
130
146
/* sadc program */
131
147
#define SADC            "sadc"
234
250
 
235
251
#define _buf0   buf[0]
236
252
 
 
253
/* Structure used to define a bitmap needed by an activity */
 
254
struct act_bitmap {
 
255
        /*
 
256
         * Bitmap for activities that need one. Remember to allocate it
 
257
         * before use!
 
258
         */
 
259
        unsigned char *b_array;
 
260
        /*
 
261
         * Size of the bitmap in bits. In fact, bitmap is sized to bitmap_size + 1
 
262
         * to take into account CPU "all"
 
263
         */
 
264
        int b_size;
 
265
};
 
266
 
 
267
/* Structure used to define an activity */
237
268
struct activity {
238
269
        /*
239
270
         * This variable contains the identification value (A_...) for this activity.
317
348
         */
318
349
        void *buf[3];
319
350
        /*
320
 
         * Bitmap for activities that need one. Such a bitmap is needed by activity if
321
 
         * @bitmap_size has a non zero value. Bitmap should be allocated before use!
322
 
         */
323
 
        unsigned char *bitmap;
324
 
        /*
325
 
         * Size of the bitmap in bits. In fact, bitmap is sized to bitmap_size + 1
326
 
         * to take into account CPU "all"
327
 
         */
328
 
        int bitmap_size;
 
351
         * Bitmap for activities that need one. Such a bitmap is needed by activity
 
352
         * if @bitmap is not NULL.
 
353
         */
 
354
        struct act_bitmap *bitmap;
329
355
};
330
356
 
331
357
 
541
567
 ***************************************************************************
542
568
 */
543
569
 
544
 
/*
545
 
 * Structure used to compute statistics average
546
 
 * for counters which are not cumulative.
547
 
 */
548
 
struct stats_sum {
549
 
        unsigned long long frmkb;
550
 
        unsigned long long bufkb;
551
 
        unsigned long long camkb;
552
 
        unsigned long long frskb;
553
 
        unsigned long long tlskb;
554
 
        unsigned long long caskb;
555
 
        unsigned long long comkb;
556
 
        unsigned long long dentry_stat;
557
 
        unsigned long long file_used;
558
 
        unsigned long long inode_used;
559
 
        unsigned long long pty_nr;
560
 
        unsigned long long sock_inuse;
561
 
        unsigned long long tcp_inuse;
562
 
        unsigned long long tcp_tw;
563
 
        unsigned long long udp_inuse;
564
 
        unsigned long long raw_inuse;
565
 
        unsigned long long frag_inuse;
566
 
        unsigned long long nr_running;
567
 
        unsigned long long nr_threads;
568
 
        unsigned long load_avg_1;
569
 
        unsigned long load_avg_5;
570
 
        unsigned long load_avg_15;
571
 
        unsigned long count;
572
 
};
573
 
 
574
 
#define STATS_SUM_SIZE  (sizeof(struct stats_sum))
575
 
 
576
570
/* Structure for timestamps */
577
571
struct tstamp {
578
572
        int tm_sec;
647
641
        wrap_read_net_etcp(struct activity *);
648
642
extern __read_funct_t
649
643
        wrap_read_net_udp(struct activity *);
 
644
extern __read_funct_t
 
645
        wrap_read_net_sock6(struct activity *);
 
646
extern __read_funct_t
 
647
        wrap_read_net_ip6(struct activity *);
 
648
extern __read_funct_t
 
649
        wrap_read_net_eip6(struct activity *);
 
650
extern __read_funct_t
 
651
        wrap_read_net_icmp6(struct activity *);
 
652
extern __read_funct_t
 
653
        wrap_read_net_eicmp6(struct activity *);
 
654
extern __read_funct_t
 
655
        wrap_read_net_udp6(struct activity *);
 
656
extern __read_funct_t
 
657
        wrap_read_cpuinfo(struct activity *);
650
658
 
651
659
/* Other functions */
652
660
extern void