/usr/include/boinc/procinfo.h is in boinc-dev 7.0.24+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | // This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// 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.
//
// BOINC is distributed in the hope that it will be useful,
// 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.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#ifndef _PROCINFO_
#define _PROCINFO_
#include <vector>
#include <map>
struct PROCINFO {
int id;
int parentid;
double swap_size;
double working_set_size;
double working_set_size_smoothed;
unsigned long page_fault_count;
double user_time;
double kernel_time;
bool is_boinc_app;
bool is_low_priority;
// running at or below priority of BOINC apps
char command[256];
bool scanned;
double page_fault_rate; // derived by higher-level code
std::vector<int> children;
PROCINFO(){}
void clear() {
id = 0;
parentid = 0;
swap_size = 0;
working_set_size = 0;
//working_set_size_smoothed = 0;
// *Don't* clear this
page_fault_count = 0;
user_time = 0;
kernel_time = 0;
is_boinc_app = false;
is_low_priority = false;
command[0] = 0;
scanned = false;
page_fault_rate = 0;
children.clear();
}
};
typedef std::map<int, PROCINFO> PROC_MAP;
extern void find_children(PROC_MAP&);
// fill in the children fields
extern int procinfo_setup(PROC_MAP&);
// call this first to get data structure
extern void procinfo_app(
PROCINFO&, std::vector<int>* other_pids, PROC_MAP&, char* graphics_exec_file
);
// get info for a given app, and mark processes as BOINC
extern void procinfo_non_boinc(PROCINFO&, PROC_MAP&);
// After getting info for all BOINC apps,
// call this to get info for everything else
extern double process_tree_cpu_time(int pid);
// get the CPU time of the given process and its descendants
#endif
|