~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/utilbin/windows/qloadsensor/loadvalues.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*___INFO__MARK_BEGIN__*/
 
2
/*************************************************************************
 
3
 *
 
4
 *  The Contents of this file are made available subject to the terms of
 
5
 *  the Sun Industry Standards Source License Version 1.2
 
6
 *
 
7
 *  Sun Microsystems Inc., March, 2001
 
8
 *
 
9
 *
 
10
 *  Sun Industry Standards Source License Version 1.2
 
11
 *  =================================================
 
12
 *  The contents of this file are subject to the Sun Industry Standards
 
13
 *  Source License Version 1.2 (the "License"); You may not use this file
 
14
 *  except in compliance with the License. You may obtain a copy of the
 
15
 *  License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
 
16
 *
 
17
 *  Software provided under this License is provided on an "AS IS" basis,
 
18
 *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
 
19
 *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
 
20
 *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
 
21
 *  See the License for the specific provisions governing your rights and
 
22
 *  obligations concerning the Software.
 
23
 *
 
24
 *   The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 
25
 *
 
26
 *   Copyright: 2001 by Sun Microsystems, Inc.
 
27
 *
 
28
 *   All Rights Reserved.
 
29
 *
 
30
 ************************************************************************/
 
31
/*___INFO__MARK_END__*/
 
32
 
 
33
#ifndef __LOADVALUES_H
 
34
#define __LOADVALUES_H
 
35
 
 
36
#include "win32_type.h"
 
37
#include "pdhquery.h"
 
38
 
 
39
struct _loadvalues {
 
40
   /*
 
41
    * Don't change the position of the hostname attribute within this
 
42
    * structure. It has to be the first element.
 
43
    */
 
44
   TXCHAR hostname;      
 
45
   DOUBLE load_avg[3];   /* 1/5/15 minute load average */
 
46
   LONGLONG cpu;         /* cpu load */
 
47
   DWORD num_proc;       /* number of processors */
 
48
   DOUBLE swap_free;     /* the amount of swap memory */
 
49
   DOUBLE swap_used;     /* the amount of used spaw space */
 
50
   DOUBLE swap_total;    /* the total amount of swap space */
 
51
   DOUBLE mem_free;      /* the amount of free memory */
 
52
   DOUBLE mem_used;      /* the amount of used memory */
 
53
   DOUBLE mem_total;     /* the total amount of memory */
 
54
   DOUBLE virtual_free;  
 
55
   DOUBLE virtual_used;  
 
56
   DOUBLE virtual_total; 
 
57
};
 
58
 
 
59
typedef struct _loadvalues t_loadvalues;
 
60
 
 
61
extern t_loadvalues loadvalue;
 
62
extern HANDLE loadvalue_mutex;
 
63
 
 
64
extern BOOL disable_beginend;
 
65
extern BOOL disable_numproc;
 
66
extern BOOL disable_load;
 
67
extern BOOL disable_memory;
 
68
extern BOOL disable_cpu;
 
69
extern TXCHAR default_hostname;
 
70
 
 
71
void
 
72
loadvalue_set_adj(DOUBLE adj);
 
73
 
 
74
void
 
75
loadvalue_set_fac(DOUBLE fac);
 
76
 
 
77
void
 
78
loadvalue_prefix(void);
 
79
 
 
80
void
 
81
loadvalue_postfix(void);
 
82
 
 
83
void
 
84
loadvalue_print(t_loadvalues *loadvalue);
 
85
 
 
86
int
 
87
loadvalue_update_hostname(t_loadvalues *loadvalue);
 
88
 
 
89
int
 
90
loadvalue_update_num_proc(t_loadvalues *loadvalue);
 
91
 
 
92
int
 
93
loadvalue_update_memory(t_loadvalues *loadvalue);
 
94
 
 
95
int
 
96
loadvalue_update_cpuusage(t_loadvalues *loadvalue, t_pdhquery *query,
 
97
                          t_pdhcounterset *counter_cpuusage);
 
98
 
 
99
int
 
100
loadvalue_update_processor_queue_length(t_loadvalues *loadvalue, t_pdhquery *query,
 
101
                          t_pdhcounterset *counter_queue_length);
 
102
 
 
103
int
 
104
loadvalue_update_load(t_loadvalues *loadvalue, t_pdhquery *query,
 
105
                      t_pdhcounterset *counter_state,
 
106
                      t_pdhcounterset *counter_pid);
 
107
 
 
108
#endif /* __LOADVALUES_H */