2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2006-09-08 19:27:42 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2006-09-08 19:27:42 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
2006-09-08 19:27:42 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2006-09-08 19:27:42 +00:00
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2006-09-08 19:27:42 +00:00
|
|
|
|
|
|
|
#ifndef _PROCINFO_
|
|
|
|
#define _PROCINFO_
|
|
|
|
|
2006-08-25 21:31:04 +00:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
struct PROCINFO {
|
2006-08-28 18:22:07 +00:00
|
|
|
int id;
|
|
|
|
int parentid;
|
|
|
|
double swap_size;
|
2006-08-25 21:31:04 +00:00
|
|
|
double working_set_size;
|
2006-10-02 23:42:38 +00:00
|
|
|
double working_set_size_smoothed;
|
2006-09-08 19:27:42 +00:00
|
|
|
unsigned long page_fault_count;
|
2006-08-25 21:31:04 +00:00
|
|
|
double user_time;
|
|
|
|
double kernel_time;
|
2006-08-28 18:22:07 +00:00
|
|
|
bool is_boinc_app;
|
2008-09-29 01:55:58 +00:00
|
|
|
char command[256];
|
2006-09-08 19:27:42 +00:00
|
|
|
|
|
|
|
double page_fault_rate; // derived by higher-level code
|
2006-08-25 21:31:04 +00:00
|
|
|
};
|
|
|
|
|
2006-08-28 18:22:07 +00:00
|
|
|
extern int procinfo_setup(std::vector<PROCINFO>&);
|
|
|
|
// call this first to get data structure
|
2010-04-07 05:54:20 +00:00
|
|
|
extern void procinfo_app(PROCINFO&, std::vector<PROCINFO>&, char* graphics_exec_file);
|
2006-08-28 18:22:07 +00:00
|
|
|
// call this to get mem usage for a given app
|
|
|
|
// (marks process as BOINC)
|
|
|
|
extern void procinfo_other(PROCINFO&, std::vector<PROCINFO>&);
|
|
|
|
// After getting mem usage for all BOINC apps,
|
|
|
|
// call this to get mem usage for everything else
|
2006-09-08 19:27:42 +00:00
|
|
|
|
2006-09-08 22:35:19 +00:00
|
|
|
#endif
|