~ubuntu-branches/ubuntu/raring/sysstat/raring

« back to all changes in this revision

Viewing changes to rd_sensors.h

  • Committer: Bazaar Package Importer
  • Author(s): Robert Luberda
  • Date: 2011-03-23 13:26:07 UTC
  • mfrom: (1.1.20 upstream) (2.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20110323132607-huhxd19s8ts5muq7
Tags: 10.0.0-1
* New upstream (stable) release:
  + Don't link sysstat's commands with sensors library if not
    needed (closes: #612571).
  + [Adam Heath]: iostat incorrectly mapped device-mapper IDs
    greater than 256. This is now fixed (closes: #614397).
* debian/rules: switch to using dh command.
* Remove 07-remove_fdatasync.patch, no longer needed. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * rd_sensors.h: Include file used to read sensors statistics
 
3
 * (C) 1999-2011 by Sebastien Godard (sysstat <at> orange.fr)
 
4
 */
 
5
 
 
6
#ifndef _RD_SENSORS_H
 
7
#define _RD_SENSORS_H
 
8
 
 
9
#include "common.h"
 
10
 
 
11
/*
 
12
 ***************************************************************************
 
13
 * Definitions of structures for sensors statistics
 
14
 ***************************************************************************
 
15
 */
 
16
 
 
17
/*
 
18
 * Structure for fan statistics.
 
19
 */
 
20
struct stats_pwr_fan {
 
21
        double  rpm                             __attribute__ ((aligned (8)));
 
22
        double  rpm_min                         __attribute__ ((aligned (8)));
 
23
        char    device[MAX_SENSORS_DEV_LEN]     __attribute__ ((aligned (8)));
 
24
};
 
25
 
 
26
#define STATS_PWR_FAN_SIZE     (sizeof(struct stats_pwr_fan))
 
27
 
 
28
/*
 
29
 * Structure for device temperature statistics.
 
30
 */
 
31
struct stats_pwr_temp {
 
32
        double  temp                            __attribute__ ((aligned (8)));
 
33
        double  temp_min                        __attribute__ ((aligned (8)));
 
34
        double  temp_max                        __attribute__ ((aligned (8)));
 
35
        char    device[MAX_SENSORS_DEV_LEN]     __attribute__ ((aligned (8)));
 
36
};
 
37
 
 
38
#define STATS_PWR_TEMP_SIZE    (sizeof(struct stats_pwr_temp))
 
39
 
 
40
/*
 
41
 * Structure for voltage inputs statistics.
 
42
 */
 
43
struct stats_pwr_in {
 
44
        double  in                              __attribute__ ((aligned (8)));
 
45
        double  in_min                          __attribute__ ((aligned (8)));
 
46
        double  in_max                          __attribute__ ((aligned (8)));
 
47
        char    device[MAX_SENSORS_DEV_LEN]     __attribute__ ((aligned (8)));
 
48
};
 
49
 
 
50
#define STATS_PWR_IN_SIZE       (sizeof(struct stats_pwr_in))
 
51
 
 
52
/*
 
53
 ***************************************************************************
 
54
 * Prototypes for functions used to read sensors statistics
 
55
 ***************************************************************************
 
56
 */
 
57
 
 
58
extern void
 
59
        read_fan(struct stats_pwr_fan *, int);
 
60
extern void
 
61
        read_temp(struct stats_pwr_temp *, int);
 
62
extern void
 
63
        read_in(struct stats_pwr_in *, int);
 
64
 
 
65
/*
 
66
 ***************************************************************************
 
67
 * Prototypes for functions used to count number of items
 
68
 ***************************************************************************
 
69
 */
 
70
 
 
71
extern int
 
72
        get_fan_nr(void);
 
73
extern int
 
74
        get_temp_nr(void);
 
75
extern int
 
76
        get_in_nr(void);
 
77
 
 
78
#endif /* _RD_SENSORS_H */