2011-04-25 03:18:26 +00:00
|
|
|
// 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/>.
|
|
|
|
|
|
|
|
// flags determining what is written to standard out.
|
|
|
|
// (errors go to stderr)
|
|
|
|
//
|
|
|
|
// NOTE: all writes to stdout should have an if (log_flags.*) {} around them.
|
|
|
|
//
|
|
|
|
|
2017-04-08 06:54:49 +00:00
|
|
|
#ifndef BOINC_CC_CONFIG_H
|
|
|
|
#define BOINC_CC_CONFIG_H
|
2011-04-25 03:18:26 +00:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "proxy_info.h"
|
|
|
|
#include "coproc.h"
|
|
|
|
|
2013-06-07 22:20:14 +00:00
|
|
|
#define DEFAULT_MAX_EVENT_LOG_LINES 2000
|
|
|
|
|
2012-11-07 08:08:18 +00:00
|
|
|
struct XML_PARSER;
|
2017-05-11 08:53:50 +00:00
|
|
|
struct PROJECT;
|
|
|
|
struct RESULT;
|
2011-04-25 03:18:26 +00:00
|
|
|
|
2011-04-29 12:04:07 +00:00
|
|
|
#define MAX_FILE_XFERS_PER_PROJECT 2
|
|
|
|
#define MAX_FILE_XFERS 8
|
|
|
|
// kind of arbitrary
|
|
|
|
|
2011-04-25 03:18:26 +00:00
|
|
|
struct LOG_FLAGS {
|
2011-05-07 17:56:13 +00:00
|
|
|
// If you add anything, you must add it to parse() and write()
|
|
|
|
|
2011-04-25 03:18:26 +00:00
|
|
|
// on by default; intended for all users
|
|
|
|
//
|
|
|
|
bool file_xfer;
|
|
|
|
// file transfer start and finish
|
|
|
|
bool sched_ops;
|
|
|
|
// interactions with schedulers
|
|
|
|
bool task;
|
2013-01-25 22:30:34 +00:00
|
|
|
// task start and finish, and suspend/resume
|
2011-04-25 03:18:26 +00:00
|
|
|
|
|
|
|
// off by default; intended for developers and testers
|
|
|
|
//
|
2013-06-04 18:25:11 +00:00
|
|
|
bool android_debug;
|
|
|
|
// show Android-specific info (battery etc.)
|
2011-04-25 03:18:26 +00:00
|
|
|
bool app_msg_receive;
|
|
|
|
// show shared-mem message from apps
|
|
|
|
bool app_msg_send;
|
|
|
|
// show shared-mem message to apps
|
2012-02-09 00:47:04 +00:00
|
|
|
bool async_file_debug;
|
|
|
|
// show asynchronous file operations (copy, MD5, decompress)
|
2011-04-25 03:18:26 +00:00
|
|
|
bool benchmark_debug;
|
|
|
|
// debug CPU benchmarks
|
|
|
|
bool checkpoint_debug;
|
|
|
|
bool coproc_debug;
|
|
|
|
// show coproc reserve/free and startup msgs
|
|
|
|
bool cpu_sched;
|
|
|
|
// preemption and resumption
|
|
|
|
bool cpu_sched_debug;
|
|
|
|
// explain scheduler decisions
|
|
|
|
bool cpu_sched_status;
|
|
|
|
// show what's running
|
|
|
|
bool dcf_debug;
|
|
|
|
// show changes to duration correction factors
|
2012-01-02 05:53:42 +00:00
|
|
|
bool disk_usage_debug;
|
|
|
|
// disk usage and project share info
|
2011-10-19 06:37:03 +00:00
|
|
|
bool priority_debug;
|
|
|
|
// info related to REC and scheduling priority
|
2011-04-25 03:18:26 +00:00
|
|
|
bool file_xfer_debug;
|
|
|
|
// show completion of FILE_XFER
|
|
|
|
bool gui_rpc_debug;
|
|
|
|
bool heartbeat_debug;
|
|
|
|
bool http_debug;
|
|
|
|
bool http_xfer_debug;
|
Reinstate and Improve XScreenSaver Idle Detection
The set of commits on this pull request:
https://github.com/BOINC/boinc/pull/1453
first reinstated previously existing code to utilize the XScreenSaver
(XSS) X extension when determining a system's idle state (there was
also additional DPMS code that was not reinstated).
Original removal:
https://github.com/BOINC/boinc/commit/bfae1032e5c1ac73f2d8d92f222293d8383a6cee
The code would attempt to open a connection to the display at the client
binary's DISPLAY environment variable and, if unable to connect, always
report busy (undesirable).
The original motivation for reinstating this code was that the remaining
idle detection mechanisms did not detect mouse or keyboard movement if
an Xserver was responsible for them. Only activities in terminals were
detected. Through the course of extending and improving this code, the
following changes have been made:
* As per "man Xserver", each local Xserver should have a socket file
at standard location /tmp/.X11-unix/ with standard naming scheme
"Xn", where n is the number of the DISPLAY. This code will open this
directory and parse its contents for open DISPLAYs, adding them to a
vector for later interrogation of idle time by xss_idle. If no DISPLAYs
were found, a static guess-list from DISPLAY :0 to DISPLAY :6 is set and
interrogated.
* xss_idle uses the XScreenSaver X extension's API, as documented at
"man 3 xss". Certain checks are performed to determine if the X
server is accessible, and if so, whether it has the XScreenSaver
extension. If it does, then we obtain information on the DISPLAY's idle
time and determine whether the Xserver is idle or not.
* The user running the boinc client (typically the "boinc" user for
most distributions), must have access to the Xserver for XSS idle
detection to work. Dropping an appropriate file in /etc/X11/Xsession.d/
(Debian flavours) or /etc/X11/xinit/xinitrc.d/ (Fedora and others)
should permit Xservers to run something like "xhost +SI:localuser:boinc"
on start. If the boinc client cannot access an Xserver/DISPLAY, it
simply skips it and treats it as though it is idle. If no DISPLAY is
accessible, then xss_idle is effectively passed through --xss_idle will
report the system as idle-- and idle detection is left to other
mechanisms.
* A debug logging flag "idle_detection_debug" was added. If this
flag is defined in the cc_config.xml file as "1", then verbose
debugging information related to boinc's idle detection determinations is
provided to the Event Log. This logging flag may also be utilized
by other components of idle detection as/if needed/desired.
2015-12-30 23:03:35 +00:00
|
|
|
bool idle_detection_debug;
|
|
|
|
// show details leading to idle/not-idle determinations.
|
2011-04-25 03:18:26 +00:00
|
|
|
bool mem_usage_debug;
|
|
|
|
// memory usage
|
|
|
|
bool network_status_debug;
|
2016-06-29 20:05:12 +00:00
|
|
|
bool notice_debug;
|
2011-04-25 03:18:26 +00:00
|
|
|
bool poll_debug;
|
|
|
|
// show what polls are responding
|
|
|
|
bool proxy_debug;
|
|
|
|
bool rr_simulation;
|
2011-09-12 17:01:54 +00:00
|
|
|
// results of RR sim
|
|
|
|
bool rrsim_detail;
|
|
|
|
// details of RR sim
|
2011-04-25 03:18:26 +00:00
|
|
|
bool sched_op_debug;
|
|
|
|
bool scrsave_debug;
|
|
|
|
bool slot_debug;
|
|
|
|
// allocation of slots
|
|
|
|
bool state_debug;
|
|
|
|
// print textual summary of CLIENT_STATE initially
|
|
|
|
// and after each scheduler RPC and garbage collect
|
|
|
|
// also show actions of garbage collector
|
|
|
|
bool statefile_debug;
|
|
|
|
// show when and why state file is written
|
2012-04-20 17:46:27 +00:00
|
|
|
bool suspend_debug;
|
|
|
|
// details of processing and network suspend/resume
|
2011-04-25 03:18:26 +00:00
|
|
|
bool task_debug;
|
|
|
|
// task start and control details, and when apps checkpoint
|
|
|
|
bool time_debug;
|
|
|
|
// changes in on_frac, active_frac, connected_frac
|
2011-09-22 18:52:21 +00:00
|
|
|
bool trickle_debug;
|
|
|
|
// show trickle messages
|
2011-04-25 03:18:26 +00:00
|
|
|
bool unparsed_xml;
|
|
|
|
// show unparsed XML lines
|
|
|
|
bool work_fetch_debug;
|
|
|
|
// work fetch policy
|
|
|
|
|
|
|
|
LOG_FLAGS();
|
|
|
|
void init();
|
|
|
|
int parse(XML_PARSER&);
|
|
|
|
void show();
|
2011-04-27 11:01:07 +00:00
|
|
|
int write(MIOFILE& out);
|
2011-04-25 03:18:26 +00:00
|
|
|
};
|
|
|
|
|
2011-06-25 05:13:56 +00:00
|
|
|
struct EXCLUDE_GPU {
|
|
|
|
std::string url;
|
2011-09-26 23:34:40 +00:00
|
|
|
std::string type; // empty means all types
|
|
|
|
std::string appname; // empty means all apps
|
|
|
|
int device_num; // -1 means all instances
|
2011-11-14 23:31:12 +00:00
|
|
|
|
|
|
|
int parse(XML_PARSER&);
|
2014-04-02 07:54:14 +00:00
|
|
|
void write(MIOFILE&);
|
2011-06-25 05:13:56 +00:00
|
|
|
};
|
|
|
|
|
2011-05-07 17:56:13 +00:00
|
|
|
// if you add anything, you must add it to
|
|
|
|
// defaults(), parse_options(), and write()
|
|
|
|
//
|
2014-05-08 07:51:18 +00:00
|
|
|
struct CC_CONFIG {
|
2011-04-25 03:18:26 +00:00
|
|
|
bool abort_jobs_on_exit;
|
|
|
|
bool allow_multiple_clients;
|
|
|
|
bool allow_remote_gui_rpc;
|
|
|
|
std::vector<std::string> alt_platforms;
|
|
|
|
std::string client_download_url;
|
2013-05-20 17:28:19 +00:00
|
|
|
std::string client_new_version_text;
|
|
|
|
std::string client_version_check_url;
|
2011-04-25 03:18:26 +00:00
|
|
|
COPROCS config_coprocs;
|
|
|
|
bool disallow_attach;
|
|
|
|
bool dont_check_file_sizes;
|
|
|
|
bool dont_contact_ref_site;
|
2015-01-05 20:58:40 +00:00
|
|
|
bool dont_suspend_nci;
|
2014-09-25 08:28:19 +00:00
|
|
|
bool dont_use_vbox;
|
2011-06-25 05:13:56 +00:00
|
|
|
std::vector<EXCLUDE_GPU> exclude_gpus;
|
2011-04-25 03:18:26 +00:00
|
|
|
std::vector<std::string> exclusive_apps;
|
|
|
|
std::vector<std::string> exclusive_gpu_apps;
|
|
|
|
bool exit_after_finish;
|
2011-09-07 22:45:00 +00:00
|
|
|
bool exit_before_start;
|
2011-04-25 03:18:26 +00:00
|
|
|
bool exit_when_idle;
|
|
|
|
bool fetch_minimal_work;
|
2013-03-03 06:40:49 +00:00
|
|
|
bool fetch_on_update;
|
2011-04-25 03:18:26 +00:00
|
|
|
std::string force_auth;
|
|
|
|
bool http_1_0;
|
2011-05-07 17:56:13 +00:00
|
|
|
int http_transfer_timeout_bps;
|
|
|
|
int http_transfer_timeout;
|
2012-12-10 12:59:06 +00:00
|
|
|
std::vector<int> ignore_gpu_instance[NPROC_TYPES];
|
2015-11-25 08:52:54 +00:00
|
|
|
bool lower_client_priority;
|
2014-09-25 08:28:19 +00:00
|
|
|
int max_event_log_lines;
|
2011-04-25 03:18:26 +00:00
|
|
|
int max_file_xfers;
|
|
|
|
int max_file_xfers_per_project;
|
|
|
|
int max_stderr_file_size;
|
|
|
|
int max_stdout_file_size;
|
|
|
|
int max_tasks_reported;
|
|
|
|
int ncpus;
|
|
|
|
std::string network_test_url;
|
|
|
|
bool no_alt_platform;
|
|
|
|
bool no_gpus;
|
|
|
|
bool no_info_fetch;
|
2016-04-24 03:47:31 +00:00
|
|
|
bool no_opencl;
|
2011-04-25 03:18:26 +00:00
|
|
|
bool no_priority_change;
|
|
|
|
bool os_random_only;
|
2015-09-30 05:40:40 +00:00
|
|
|
int process_priority;
|
|
|
|
int process_priority_special;
|
2011-04-25 03:18:26 +00:00
|
|
|
PROXY_INFO proxy_info;
|
2011-07-14 16:15:45 +00:00
|
|
|
double rec_half_life;
|
2011-04-25 03:18:26 +00:00
|
|
|
bool report_results_immediately;
|
|
|
|
bool run_apps_manually;
|
|
|
|
int save_stats_days;
|
|
|
|
bool skip_cpu_benchmarks;
|
|
|
|
bool simple_gui_only;
|
|
|
|
double start_delay;
|
|
|
|
bool stderr_head;
|
|
|
|
bool suppress_net_info;
|
|
|
|
bool unsigned_apps_ok;
|
|
|
|
bool use_all_gpus;
|
|
|
|
bool use_certs;
|
|
|
|
bool use_certs_only;
|
|
|
|
// overrides use_certs
|
2012-05-18 17:38:16 +00:00
|
|
|
bool vbox_window;
|
2011-04-25 03:18:26 +00:00
|
|
|
|
2014-05-08 07:51:18 +00:00
|
|
|
CC_CONFIG();
|
2011-04-25 03:18:26 +00:00
|
|
|
void defaults();
|
2011-11-14 23:05:42 +00:00
|
|
|
int parse(FILE*);
|
2011-11-14 23:31:12 +00:00
|
|
|
int parse(XML_PARSER&, LOG_FLAGS&);
|
2011-04-25 03:18:26 +00:00
|
|
|
int parse_client(FILE*);
|
2011-11-14 23:31:12 +00:00
|
|
|
int parse_options(XML_PARSER&);
|
2011-04-25 03:18:26 +00:00
|
|
|
int parse_options_client(XML_PARSER&);
|
2011-04-27 11:01:07 +00:00
|
|
|
int write(MIOFILE&, LOG_FLAGS&);
|
2011-04-25 03:18:26 +00:00
|
|
|
void show();
|
|
|
|
};
|
|
|
|
|
2017-05-11 08:53:50 +00:00
|
|
|
// Stuff related to app_config.xml
|
|
|
|
|
|
|
|
typedef std::vector<std::string> MSG_VEC;
|
|
|
|
|
|
|
|
struct APP_CONFIG {
|
|
|
|
char name[256];
|
|
|
|
int max_concurrent;
|
|
|
|
double gpu_gpu_usage;
|
|
|
|
double gpu_cpu_usage;
|
|
|
|
bool fraction_done_exact;
|
|
|
|
bool report_results_immediately;
|
|
|
|
|
|
|
|
int parse(XML_PARSER&, MSG_VEC&, LOG_FLAGS&);
|
|
|
|
int parse_gpu_versions(XML_PARSER&, MSG_VEC&, LOG_FLAGS&);
|
|
|
|
};
|
|
|
|
|
|
|
|
struct APP_VERSION_CONFIG {
|
|
|
|
char app_name[256];
|
|
|
|
char plan_class[256];
|
|
|
|
char cmdline[256];
|
|
|
|
double avg_ncpus;
|
|
|
|
double ngpus;
|
|
|
|
|
|
|
|
int parse(XML_PARSER&, MSG_VEC&, LOG_FLAGS&);
|
|
|
|
};
|
|
|
|
|
|
|
|
struct APP_CONFIGS {
|
|
|
|
std::vector<APP_CONFIG> app_configs;
|
|
|
|
std::vector<APP_VERSION_CONFIG> app_version_configs;
|
|
|
|
int project_max_concurrent;
|
|
|
|
bool report_results_immediately;
|
|
|
|
|
|
|
|
int parse(XML_PARSER&, MSG_VEC&, LOG_FLAGS&);
|
|
|
|
int parse_file(FILE*, MSG_VEC&, LOG_FLAGS&);
|
|
|
|
int config_app_versions(PROJECT*, bool show_warnings);
|
2017-05-12 03:16:35 +00:00
|
|
|
void write(MIOFILE&);
|
2017-05-11 08:53:50 +00:00
|
|
|
void clear() {
|
|
|
|
app_configs.clear();
|
|
|
|
app_version_configs.clear();
|
|
|
|
project_max_concurrent = 0;
|
|
|
|
report_results_immediately = false;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2011-04-25 03:18:26 +00:00
|
|
|
#endif
|