~ubuntu-branches/ubuntu/vivid/cctools/vivid

« back to all changes in this revision

Viewing changes to dttools/src/load_average.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2011-05-07 09:05:00 UTC
  • Revision ID: james.westby@ubuntu.com-20110507090500-lqpmdtwndor6e7os
Tags: upstream-3.3.2
ImportĀ upstreamĀ versionĀ 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (C) 2008- The University of Notre Dame
 
3
This software is distributed under the GNU General Public License.
 
4
See the file COPYING for details.
 
5
*/
 
6
 
 
7
#ifndef LOAD_AVERAGE_H
 
8
#define LOAD_AVERAGE_H
 
9
 
 
10
/** @file load_average.h Get the current load and number of CPUs. */
 
11
 
 
12
/** Get the current load average.
 
13
Uses different techniques on each platform to get the current 1, 5, and 15 minute load average.
 
14
@param avg A pointer to an array of three doubles.  avg[0] gets the one minute load average, avg[1] gets the five minute load average, and avg[2] gets the 15 minute load average.
 
15
*/
 
16
 
 
17
void load_average_get( double *avg );
 
18
 
 
19
/** Get the number of CPU cores.
 
20
This function returns the number of CPU cores that the operating system assumes are actually available for use.  Due to hyperthreading, BIOS settings, operating system configuration, and so forth, this may not actually be the physical number of CPU cores.  A more accurate description might be the number of programs that the operating system can efficiently run at once.
 
21
@return The number of CPU cores.
 
22
*/
 
23
 
 
24
int  load_average_get_cpus();
 
25
 
 
26
#endif