2008-08-06 18:36:30 +00:00
|
|
|
// This file is part of BOINC.
|
2005-01-20 23:22:22 +00:00
|
|
|
// http://boinc.berkeley.edu
|
2008-08-06 18:36:30 +00:00
|
|
|
// Copyright (C) 2008 University of California
|
2002-04-30 22:22:54 +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.
|
2005-01-20 23:22:22 +00:00
|
|
|
//
|
2008-08-06 18:36:30 +00:00
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
2005-01-20 23:22:22 +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/>.
|
2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
// flags determining what is written to standard out.
|
|
|
|
// (errors go to stderr)
|
|
|
|
//
|
2007-08-16 17:33:41 +00:00
|
|
|
// NOTE: all writes to stdout should have an if (log_flags.*) {} around them.
|
2002-04-30 22:22:54 +00:00
|
|
|
//
|
|
|
|
|
2002-10-06 00:45:29 +00:00
|
|
|
#ifndef _LOGFLAGS_H_
|
|
|
|
#define _LOGFLAGS_H_
|
|
|
|
|
2007-10-20 16:10:57 +00:00
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
2004-03-04 11:41:43 +00:00
|
|
|
#ifndef _WIN32
|
2002-04-30 22:22:54 +00:00
|
|
|
#include <stdio.h>
|
2004-03-04 11:41:43 +00:00
|
|
|
#endif
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2007-03-29 16:40:43 +00:00
|
|
|
#define MAX_FILE_XFERS_PER_PROJECT 2
|
|
|
|
#define MAX_FILE_XFERS 8
|
|
|
|
// kind of arbitrary
|
|
|
|
|
2006-08-21 22:25:21 +00:00
|
|
|
class XML_PARSER;
|
|
|
|
|
2006-05-21 21:11:28 +00:00
|
|
|
struct LOG_FLAGS {
|
2006-06-22 19:40:30 +00:00
|
|
|
// on by default, user-readable
|
2002-04-30 22:22:54 +00:00
|
|
|
//
|
2008-10-04 23:44:24 +00:00
|
|
|
/// task start and finish
|
|
|
|
bool task;
|
|
|
|
/// file transfer start and finish
|
|
|
|
bool file_xfer;
|
|
|
|
/// interactions with schedulers
|
|
|
|
bool sched_ops;
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2006-06-22 19:40:30 +00:00
|
|
|
// off by default; intended for developers and testers
|
2002-04-30 22:22:54 +00:00
|
|
|
//
|
2008-10-04 23:44:24 +00:00
|
|
|
/// preemption and resumption
|
|
|
|
bool cpu_sched;
|
|
|
|
/// explain scheduler decisions
|
|
|
|
bool cpu_sched_debug;
|
|
|
|
/// results of rr simulator
|
|
|
|
bool rr_simulation;
|
|
|
|
/// changes to debt
|
|
|
|
bool debt_debug;
|
|
|
|
/// task start and control details, and when apps checkpoint
|
|
|
|
bool task_debug;
|
|
|
|
/// work fetch policy
|
|
|
|
bool work_fetch_debug;
|
2006-06-22 19:40:30 +00:00
|
|
|
|
2008-10-04 23:44:24 +00:00
|
|
|
/// show unparsed XML lines
|
|
|
|
bool unparsed_xml;
|
|
|
|
/// print textual summary of CLIENT_STATE initially
|
|
|
|
/// and after each scheduler RPC and garbage collect
|
|
|
|
/// also show actions of garbage collector
|
|
|
|
/// also show when state file is read or written
|
|
|
|
bool state_debug;
|
|
|
|
/// show completion of FILE_XFER
|
|
|
|
bool file_xfer_debug;
|
2002-04-30 22:22:54 +00:00
|
|
|
bool sched_op_debug;
|
|
|
|
bool http_debug;
|
2004-03-27 00:45:27 +00:00
|
|
|
bool proxy_debug;
|
2008-10-04 23:44:24 +00:00
|
|
|
/// changes in on_frac, active_frac, connected_frac
|
|
|
|
bool time_debug;
|
2006-08-29 18:18:36 +00:00
|
|
|
bool http_xfer_debug;
|
2008-10-04 23:44:24 +00:00
|
|
|
/// debug CPU benchmarks
|
|
|
|
bool benchmark_debug;
|
|
|
|
/// show what polls are responding
|
|
|
|
bool poll_debug;
|
2004-06-11 20:52:27 +00:00
|
|
|
bool guirpc_debug;
|
2005-05-11 06:57:58 +00:00
|
|
|
bool scrsave_debug;
|
2008-10-04 23:44:24 +00:00
|
|
|
/// show shared-mem message to apps
|
|
|
|
bool app_msg_send;
|
|
|
|
/// show shared-mem message from apps
|
|
|
|
bool app_msg_receive;
|
|
|
|
/// memory usage
|
|
|
|
bool mem_usage_debug;
|
2006-08-29 18:18:36 +00:00
|
|
|
bool network_status_debug;
|
2007-02-22 16:33:37 +00:00
|
|
|
bool checkpoint_debug;
|
2008-10-04 23:44:24 +00:00
|
|
|
/// show coproc reserve/free
|
|
|
|
bool coproc_debug;
|
2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
LOG_FLAGS();
|
2007-04-26 21:57:42 +00:00
|
|
|
void defaults();
|
2006-08-21 22:25:21 +00:00
|
|
|
int parse(XML_PARSER&);
|
2006-09-07 17:38:54 +00:00
|
|
|
void show();
|
2002-04-30 22:22:54 +00:00
|
|
|
};
|
|
|
|
|
2006-05-21 21:11:28 +00:00
|
|
|
struct CONFIG {
|
2006-05-22 09:54:31 +00:00
|
|
|
bool dont_check_file_sizes;
|
2006-12-19 17:41:30 +00:00
|
|
|
bool http_1_0;
|
2006-05-21 21:11:28 +00:00
|
|
|
int save_stats_days;
|
2006-06-21 22:08:20 +00:00
|
|
|
int ncpus;
|
2006-10-25 16:54:47 +00:00
|
|
|
int max_file_xfers;
|
|
|
|
int max_file_xfers_per_project;
|
2007-03-13 19:33:27 +00:00
|
|
|
bool suppress_net_info;
|
|
|
|
bool disallow_attach;
|
|
|
|
bool os_random_only;
|
2007-05-07 19:38:27 +00:00
|
|
|
bool no_alt_platform;
|
2007-07-02 20:55:21 +00:00
|
|
|
bool simple_gui_only;
|
2007-07-09 16:00:10 +00:00
|
|
|
bool dont_contact_ref_site;
|
2007-10-20 16:10:57 +00:00
|
|
|
std::vector<std::string> alt_platforms;
|
2007-10-24 22:48:47 +00:00
|
|
|
int max_stdout_file_size;
|
|
|
|
int max_stderr_file_size;
|
2007-11-21 19:57:40 +00:00
|
|
|
bool report_results_immediately;
|
2007-12-27 21:40:20 +00:00
|
|
|
double start_delay;
|
2008-01-13 00:12:14 +00:00
|
|
|
bool run_apps_manually;
|
2008-02-07 16:05:56 +00:00
|
|
|
std::string force_auth;
|
2008-05-12 21:27:14 +00:00
|
|
|
bool allow_multiple_clients;
|
2008-09-04 12:17:58 +00:00
|
|
|
bool use_certs;
|
|
|
|
bool use_certs_only;
|
|
|
|
// overrides use_certs
|
2008-09-29 16:47:10 +00:00
|
|
|
std::vector<std::string> exclusive_apps;
|
2006-10-25 16:54:47 +00:00
|
|
|
|
2006-05-21 21:11:28 +00:00
|
|
|
CONFIG();
|
2007-04-26 21:57:42 +00:00
|
|
|
void defaults();
|
2006-05-21 21:11:28 +00:00
|
|
|
int parse(FILE*);
|
2006-08-21 22:25:21 +00:00
|
|
|
int parse_options(XML_PARSER&);
|
2006-05-21 21:11:28 +00:00
|
|
|
};
|
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
extern LOG_FLAGS log_flags;
|
2006-05-21 21:11:28 +00:00
|
|
|
extern CONFIG config;
|
2006-12-17 02:48:19 +00:00
|
|
|
extern int read_config_file();
|
2002-10-06 00:45:29 +00:00
|
|
|
|
2002-10-09 18:48:26 +00:00
|
|
|
#endif
|