~ubuntu-branches/ubuntu/vivid/sysstat/vivid-proposed

« back to all changes in this revision

Viewing changes to nfsiostat.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Luberda
  • Date: 2011-02-07 20:57:05 UTC
  • mfrom: (12.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110207205705-6rbilpmalr1gkfra
Tags: 9.1.7-2
* Upload to unstable.
* debian/rules:
  + call dpkg-buildflags for initial values of CFLAGS & LDFLAGS;
  + use dh_auto_{configure,install,clean} debhelper commands;
  + provide build-arch and build-indep targets.
* Updated 00-Makefile.patch to make it possible to install isag only.
* 09-format-warning.patch: Fix a warning given by gcc -Wformat.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * nfsiostat: Report NFS I/O statistics
 
3
 * Copyright (C) 2010 Red Hat, Inc. All Rights Reserved
 
4
 * Written by Ivana Varekova <varekova@redhat.com>
 
5
 */
 
6
 
 
7
#ifndef _NFSIOSTAT_H
 
8
#define _NFSIOSTAT_H
 
9
 
 
10
#include "common.h"
 
11
 
 
12
#define NFSMOUNTSTATS  "/proc/self/mountstats"
 
13
 
 
14
/* I_: iostat - D_: Display - F_: Flag */
 
15
#define I_D_TIMESTAMP           0x001
 
16
#define I_D_KILOBYTES           0x002
 
17
#define I_D_MEGABYTES           0x004
 
18
#define I_D_ISO                 0x008
 
19
#define I_D_HUMAN_READ          0x010
 
20
 
 
21
#define DISPLAY_TIMESTAMP(m)    (((m) & I_D_TIMESTAMP)     == I_D_TIMESTAMP)
 
22
#define DISPLAY_KILOBYTES(m)    (((m) & I_D_KILOBYTES)     == I_D_KILOBYTES)
 
23
#define DISPLAY_MEGABYTES(m)    (((m) & I_D_MEGABYTES)     == I_D_MEGABYTES)
 
24
#define DISPLAY_ISO(m)          (((m) & I_D_ISO)           == I_D_ISO)
 
25
#define DISPLAY_HUMAN_READ(m)   (((m) & I_D_HUMAN_READ)    == I_D_HUMAN_READ)
 
26
 
 
27
/* Environment variable */
 
28
#define ENV_POSIXLY_CORRECT     "POSIXLY_CORRECT"
 
29
 
 
30
/* Preallocation constats */
 
31
#define NR_NFS_PREALLOC 2
 
32
 
 
33
struct io_nfs_stats {
 
34
        unsigned long long rd_normal_bytes      __attribute__ ((aligned (8)));
 
35
        unsigned long long wr_normal_bytes      __attribute__ ((packed));
 
36
        unsigned long long rd_direct_bytes      __attribute__ ((packed));
 
37
        unsigned long long wr_direct_bytes      __attribute__ ((packed));
 
38
        unsigned long long rd_server_bytes      __attribute__ ((packed));
 
39
        unsigned long long wr_server_bytes      __attribute__ ((packed));
 
40
        unsigned long rpc_sends                 __attribute__ ((packed));
 
41
        unsigned long nfs_rops                  __attribute__ ((packed));
 
42
        unsigned long nfs_wops                  __attribute__ ((packed));
 
43
};
 
44
 
 
45
#define IO_NFS_STATS_SIZE       (sizeof(struct io_nfs_stats))
 
46
 
 
47
struct io_hdr_stats {
 
48
        unsigned int active             __attribute__ ((aligned (4)));
 
49
        unsigned int used               __attribute__ ((packed));
 
50
        char name[MAX_NAME_LEN];
 
51
};
 
52
 
 
53
#define IO_HDR_STATS_SIZE       (sizeof(struct io_hdr_stats))
 
54
 
 
55
#endif  /* _NFSIOSTAT_H */