1
/*___INFO__MARK_BEGIN__*/
2
/*************************************************************************
4
* The Contents of this file are made available subject to the terms of
5
* the Sun Industry Standards Source License Version 1.2
7
* Sun Microsystems Inc., March, 2001
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
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.
24
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
26
* Copyright: 2001 by Sun Microsystems, Inc.
28
* All Rights Reserved.
30
************************************************************************/
31
/*___INFO__MARK_END__*/
33
#ifndef __LOADVALUES_H
34
#define __LOADVALUES_H
36
#include "win32_type.h"
41
* Don't change the position of the hostname attribute within this
42
* structure. It has to be the first element.
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 */
59
typedef struct _loadvalues t_loadvalues;
61
extern t_loadvalues loadvalue;
62
extern HANDLE loadvalue_mutex;
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;
72
loadvalue_set_adj(DOUBLE adj);
75
loadvalue_set_fac(DOUBLE fac);
78
loadvalue_prefix(void);
81
loadvalue_postfix(void);
84
loadvalue_print(t_loadvalues *loadvalue);
87
loadvalue_update_hostname(t_loadvalues *loadvalue);
90
loadvalue_update_num_proc(t_loadvalues *loadvalue);
93
loadvalue_update_memory(t_loadvalues *loadvalue);
96
loadvalue_update_cpuusage(t_loadvalues *loadvalue, t_pdhquery *query,
97
t_pdhcounterset *counter_cpuusage);
100
loadvalue_update_processor_queue_length(t_loadvalues *loadvalue, t_pdhquery *query,
101
t_pdhcounterset *counter_queue_length);
104
loadvalue_update_load(t_loadvalues *loadvalue, t_pdhquery *query,
105
t_pdhcounterset *counter_state,
106
t_pdhcounterset *counter_pid);
108
#endif /* __LOADVALUES_H */