mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=12073
This commit is contained in:
parent
14a4030ccd
commit
e66b1572ef
|
@ -1646,3 +1646,10 @@ David 12 Feb 2007
|
|||
|
||||
win_build/
|
||||
boinc_zip.vcproj
|
||||
|
||||
David 12 Feb 2007
|
||||
- core client, Unix: add '[Family x Model x Stepping x]' in p_model string.
|
||||
This will enable better homogeneous redundancy resolution
|
||||
|
||||
client/
|
||||
hostinfo_unix.C
|
||||
|
|
|
@ -176,7 +176,7 @@ int CLIENT_STATE::init() {
|
|||
LPTSTR pbuf = buf;
|
||||
|
||||
GetUserName(pbuf, &buf_size);
|
||||
if (executing_as_daemon && (0 != strcmp("SYSTEM", pbuf))) {
|
||||
if (executing_as_daemon && (strcmp("SYSTEM", pbuf))) {
|
||||
msg_printf(NULL, MSG_INFO,
|
||||
"BOINC is running as a service and as a non-system user."
|
||||
);
|
||||
|
|
|
@ -35,26 +35,26 @@
|
|||
static void print_options(char* prog) {
|
||||
printf(
|
||||
"Usage: %s [options]\n"
|
||||
" -help show options\n"
|
||||
" -version show version info\n"
|
||||
" -exit_when_idle Get/process/report work, then exit\n"
|
||||
" -show_projects show attached projects\n"
|
||||
" -return_results_immediately contact server when have results\n"
|
||||
" -detach_project <URL> detach from a project\n"
|
||||
" -reset_project <URL> reset (clear) a project\n"
|
||||
" -attach_project <URL> <key> attach to a project\n"
|
||||
" -update_prefs <URL> contact a project to update preferences\n"
|
||||
" -run_cpu_benchmarks run the CPU benchmarks\n"
|
||||
" -check_all_logins for idle detection, check remote logins\n too"
|
||||
" -allow_remote_gui_rpc allow remote GUI RPC connections\n"
|
||||
" -gui_rpc_port port for GUI RPCs\n"
|
||||
" -redirectio redirect stdout and stderr to log files\n"
|
||||
" -detach detach from console (Windows)\n"
|
||||
" -dir <path> use given dir as BOINC home\n"
|
||||
" -no_gui_rpc don't allow GUI RPC, don't make socket\n"
|
||||
" -daemon run as daemon (Unix)\n"
|
||||
" -insecure disable BOINC security users and permissions (Unix, Linux)\n"
|
||||
" -launched_by_manager core client was launched by Manager\n"
|
||||
" --help show options\n"
|
||||
" --version show version info\n"
|
||||
" --exit_when_idle Get/process/report work, then exit\n"
|
||||
" --show_projects show attached projects\n"
|
||||
" --return_results_immediately contact server when have results\n"
|
||||
" --detach_project <URL> detach from a project\n"
|
||||
" --reset_project <URL> reset (clear) a project\n"
|
||||
" --attach_project <URL> <key> attach to a project\n"
|
||||
" --update_prefs <URL> contact a project to update preferences\n"
|
||||
" --run_cpu_benchmarks run the CPU benchmarks\n"
|
||||
" --check_all_logins for idle detection, check remote logins\n too"
|
||||
" --allow_remote_gui_rpc allow remote GUI RPC connections\n"
|
||||
" --gui_rpc_port port for GUI RPCs\n"
|
||||
" --redirectio redirect stdout and stderr to log files\n"
|
||||
" --detach detach from console (Windows)\n"
|
||||
" --dir <path> use given dir as BOINC home\n"
|
||||
" --no_gui_rpc don't allow GUI RPC, don't make socket\n"
|
||||
" --daemon run as daemon (Unix)\n"
|
||||
" --insecure disable BOINC security users and permissions (Unix, Linux)\n"
|
||||
" --launched_by_manager core client was launched by Manager\n"
|
||||
,
|
||||
prog
|
||||
);
|
||||
|
@ -66,6 +66,8 @@ static void print_options(char* prog) {
|
|||
// So just record the args here.
|
||||
// The actions get done in do_cmdline_actions()
|
||||
//
|
||||
// Check for both -X (deprecated) and --X
|
||||
//
|
||||
#define ARGX2(s1,s2) (!strcmp(argv[i], s1)||!strcmp(argv[i], s2))
|
||||
#define ARG(S) ARGX2("-"#S, "--"#S)
|
||||
|
||||
|
|
|
@ -248,10 +248,11 @@ bool HOST_INFO::host_is_running_on_batteries() {
|
|||
// See http://people.nl.linux.org/~hch/cpuinfo/ for some examples.
|
||||
//
|
||||
void parse_cpuinfo(HOST_INFO& host) {
|
||||
char buf[256];
|
||||
char buf[256], features[1024], model_buf[1024];
|
||||
bool vendor_found=false, model_found=false;
|
||||
bool cache_found=false, flags_found=false;
|
||||
bool cache_found=false, features_found=false;
|
||||
int n;
|
||||
int family=-1, model=-1, stepping=-1;
|
||||
|
||||
FILE* f = fopen("/proc/cpuinfo", "r");
|
||||
if (!f) return;
|
||||
|
@ -264,6 +265,7 @@ void parse_cpuinfo(HOST_INFO& host) {
|
|||
vendor_found = true;
|
||||
#endif
|
||||
|
||||
strcpy(features, "");
|
||||
while (fgets(buf, 256, f)) {
|
||||
strip_whitespace(buf);
|
||||
if (strstr(buf, "vendor_id\t: ") || strstr(buf, "system type\t\t: ")) {
|
||||
|
@ -278,31 +280,59 @@ void parse_cpuinfo(HOST_INFO& host) {
|
|||
strlcpy(host.p_model, strchr(buf, ':') + 2, sizeof(host.p_model));
|
||||
}
|
||||
}
|
||||
if (strstr(buf, "cpu family\t: ") && family<0) {
|
||||
family = atoi(buf+strlen("cpu family\t: "));
|
||||
}
|
||||
if (strstr(buf, "model\t\t: ") && model<0) {
|
||||
model = atoi(buf+strlen("model\t\t: "));
|
||||
}
|
||||
if (strstr(buf, "stepping\t: ") && stepping<0) {
|
||||
stepping = atoi(buf+strlen("stepping\t: "));
|
||||
}
|
||||
if (!cache_found && (strstr(buf, "cache size\t: ") == buf)) {
|
||||
cache_found = true;
|
||||
sscanf(buf, "cache size\t: %d", &n);
|
||||
host.m_cache = n*1024;
|
||||
}
|
||||
|
||||
if (!flags_found) {
|
||||
if (!features_found) {
|
||||
// Some versions of the linux kernel call them flags,
|
||||
// others call them features, so look for both.
|
||||
//
|
||||
char buf2[256], buf3[1024];
|
||||
strcpy(buf2, "");
|
||||
if ((strstr(buf, "flags\t\t: ") == buf)) {
|
||||
strlcpy(buf2, strchr(buf, ':') + 2, sizeof(buf2));
|
||||
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
||||
} else if ((strstr(buf, "features\t\t: ") == buf)) {
|
||||
strlcpy(buf2, strchr(buf, ':') + 2, sizeof(buf2));
|
||||
strlcpy(features, strchr(buf, ':') + 2, sizeof(features));
|
||||
}
|
||||
if (strlen(buf2)) {
|
||||
flags_found = true;
|
||||
sprintf(buf3, "%s [%s]", host.p_model, buf2);
|
||||
strlcpy(host.p_model, buf3, sizeof(host.p_model));
|
||||
if (strlen(features)) {
|
||||
features_found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
strcpy(model_buf, host.p_model);
|
||||
if (family>=0 || model>=0 || stepping>0) {
|
||||
strcat(model_buf, " [");
|
||||
if (family>=0) {
|
||||
sprintf(buf, "Family %d ", family);
|
||||
strcat(model_buf, buf);
|
||||
}
|
||||
if (model>=0) {
|
||||
sprintf(buf, "Model %d ", model);
|
||||
strcat(model_buf, buf);
|
||||
}
|
||||
if (stepping>=0) {
|
||||
sprintf(buf, "Stepping %d", stepping);
|
||||
strcat(model_buf, buf);
|
||||
}
|
||||
strcat(model_buf, "]");
|
||||
}
|
||||
if (strlen(features)) {
|
||||
strcat(model_buf, "[");
|
||||
strcat(model_buf, features);
|
||||
strcat(model_buf, "]");
|
||||
}
|
||||
|
||||
strlcpy(host.p_model, model_buf, sizeof(host.p_model));
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
|
|
|
@ -146,8 +146,9 @@ void resume_client() {
|
|||
}
|
||||
|
||||
// Trap logoff and shutdown events on Win9x so we can clean ourselves up.
|
||||
LRESULT CALLBACK Win9xMonitorSystemWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
LRESULT CALLBACK Win9xMonitorSystemWndProc(
|
||||
HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
||||
) {
|
||||
if (uMsg == WM_QUERYENDSESSION) {
|
||||
BOINCTRACE("***** Win9x Monitor System Shutdown/Logoff Event Detected *****\n");
|
||||
// Win95 is stupid, we really only need to wait until we have
|
||||
|
@ -297,29 +298,26 @@ static void init_core_client(int argc, char** argv) {
|
|||
|
||||
#ifndef _WIN32
|
||||
if (g_use_sandbox)
|
||||
umask (2); // Set file creation mask to be writable by both user and group
|
||||
// Our umask will be inherited by all our child processes
|
||||
// Set file creation mask to be writable by both user and group
|
||||
// Our umask will be inherited by all our child processes
|
||||
//
|
||||
umask (2);
|
||||
#endif
|
||||
|
||||
// Initialize the BOINC Diagnostics Framework
|
||||
int dwDiagnosticsFlags =
|
||||
int flags =
|
||||
BOINC_DIAG_DUMPCALLSTACKENABLED |
|
||||
BOINC_DIAG_HEAPCHECKENABLED |
|
||||
BOINC_DIAG_HEAPCHECKEVERYALLOC |
|
||||
BOINC_DIAG_TRACETOSTDOUT;
|
||||
|
||||
if (gstate.redirect_io || gstate.executing_as_daemon || gstate.detach_console) {
|
||||
dwDiagnosticsFlags |=
|
||||
flags |=
|
||||
BOINC_DIAG_REDIRECTSTDERR |
|
||||
BOINC_DIAG_REDIRECTSTDOUT;
|
||||
}
|
||||
|
||||
diagnostics_init(
|
||||
dwDiagnosticsFlags,
|
||||
"stdoutdae",
|
||||
"stderrdae"
|
||||
);
|
||||
|
||||
diagnostics_init(flags, "stdoutdae", "stderrdae");
|
||||
|
||||
// Win32 - detach from console if requested
|
||||
#ifdef _WIN32
|
||||
|
@ -534,7 +532,9 @@ int finalize() {
|
|||
stprintf(event_message,
|
||||
TEXT("BOINC Core Client Error Message\n"
|
||||
"Failed to cleanup the BOINC Idle Detection Interface\n"
|
||||
"Unload failed: %s\n"), windows_error_string(event_message, sizeof(event_message))
|
||||
"Unload failed: %s\n"
|
||||
),
|
||||
windows_error_string(event_message, sizeof(event_message))
|
||||
);
|
||||
if (!gstate.executing_as_daemon) {
|
||||
fprintf(stderr, event_message);
|
||||
|
@ -546,11 +546,13 @@ int finalize() {
|
|||
}
|
||||
|
||||
#ifdef USE_WINSOCK
|
||||
if ( WinsockCleanup() != 0 ) {
|
||||
if (WinsockCleanup()) {
|
||||
stprintf(event_message,
|
||||
TEXT("BOINC Core Client Error Message\n"
|
||||
"Failed to cleanup the Windows Sockets interface\n"
|
||||
"Unload failed: %s\n"), windows_error_string(event_message, sizeof(event_message))
|
||||
"Unload failed: %s\n"
|
||||
),
|
||||
windows_error_string(event_message, sizeof(event_message))
|
||||
);
|
||||
if (!gstate.executing_as_daemon) {
|
||||
fprintf(stderr, event_message);
|
||||
|
@ -561,8 +563,9 @@ int finalize() {
|
|||
}
|
||||
#endif
|
||||
|
||||
if (g_bIsWin9x && g_Win9xMonitorSystemThreadID)
|
||||
if (g_bIsWin9x && g_Win9xMonitorSystemThreadID) {
|
||||
PostThreadMessage(g_Win9xMonitorSystemThreadID, WM_QUIT, 0, 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -582,7 +585,7 @@ int main(int argc, char** argv) {
|
|||
PROCESS_INFORMATION pi;
|
||||
|
||||
// Allow the system to know it is running as a Windows service
|
||||
// and adjust it's diagnostics schemes accordingly.
|
||||
// and adjust its diagnostics schemes accordingly.
|
||||
if ( (argc > 1) && ((*argv[1] == '-') || (*argv[1] == '/')) ) {
|
||||
if ( stricmp( "daemon", argv[1]+1 ) == 0 ) {
|
||||
gstate.executing_as_daemon = true;
|
||||
|
@ -641,9 +644,11 @@ int main(int argc, char** argv) {
|
|||
#elif defined linux
|
||||
int i;
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
for (i=1; i<argc; i++) {
|
||||
if (strcmp(argv[i], "-daemon") == 0 || strcmp(argv[i], "--daemon") == 0) {
|
||||
syslog(LOG_DAEMON|LOG_INFO, "Starting Boinc-Daemon, listening on port %d.", GUI_RPC_PORT);
|
||||
syslog(LOG_DAEMON|LOG_INFO,
|
||||
"Starting Boinc-Daemon, listening on port %d.", GUI_RPC_PORT
|
||||
);
|
||||
// from <unistd.h>:
|
||||
// Detach from the controlling terminal and run in the background as system daemon.
|
||||
// Don't change working directory to root ("/"), but redirect
|
||||
|
@ -716,8 +721,9 @@ int main(int argc, char** argv) {
|
|||
// GDB can't attach to applications which are running as a diferent user
|
||||
// or group, so fix up data with current user and group during debugging
|
||||
//
|
||||
if (check_security(g_use_sandbox, false))
|
||||
if (check_security(g_use_sandbox, false)) {
|
||||
SetBOINCDataOwnersGroupsAndPermissions();
|
||||
}
|
||||
#endif // _DEBUG && __APPLE__
|
||||
int i = check_security(g_use_sandbox, false);
|
||||
if (i) {
|
||||
|
@ -738,8 +744,8 @@ int main(int argc, char** argv) {
|
|||
#endif // SANDBOX
|
||||
|
||||
#ifdef __APPLE__
|
||||
// Initialize Mac OS X idle time measurement / idle detection
|
||||
gEventHandle = NXOpenEventStatus();
|
||||
// Initialize Mac OS X idle time measurement / idle detection
|
||||
gEventHandle = NXOpenEventStatus();
|
||||
#endif // __APPLE__
|
||||
|
||||
retval = boinc_main_loop();
|
||||
|
|
|
@ -53,65 +53,65 @@ with a running client, is provided by the
|
|||
<p>
|
||||
";
|
||||
list_start();
|
||||
list_item("-help",
|
||||
list_item("--help",
|
||||
"Show client options."
|
||||
);
|
||||
list_item("-version",
|
||||
list_item("--version",
|
||||
"Show client version."
|
||||
);
|
||||
list_item("<nobr>-attach_project URL account_key</nobr>",
|
||||
list_item("<nobr>--attach_project URL account_key</nobr>",
|
||||
"Attach this computer to a new project."
|
||||
);
|
||||
list_item("-show_projects",
|
||||
list_item("--show_projects",
|
||||
"Print a list of projects to which this computer is attached."
|
||||
);
|
||||
|
||||
list_item("-detach_project URL",
|
||||
list_item("--detach_project URL",
|
||||
"Detach this computer from a project."
|
||||
);
|
||||
|
||||
list_item("-reset_project URL",
|
||||
list_item("--reset_project URL",
|
||||
"Clear pending work for a project.
|
||||
Use this if there is a problem that is preventing
|
||||
your computer from working."
|
||||
);
|
||||
list_item("-update_prefs URL",
|
||||
list_item("--update_prefs URL",
|
||||
"Contact a project's server to obtain new preferences.
|
||||
This will also report completed results
|
||||
and get new work if needed."
|
||||
);
|
||||
list_item("-return_results_immediately",
|
||||
"Contact scheduler as soon as any result done."
|
||||
list_item("--return_results_immediately",
|
||||
"Report each result as soon as it's done."
|
||||
);
|
||||
list_item("-run_cpu_benchmarks",
|
||||
list_item("--run_cpu_benchmarks",
|
||||
"Run CPU benchmarks.
|
||||
Do this if you have modified your computer's hardware."
|
||||
);
|
||||
list_item("-check_all_logins",
|
||||
"If 'run if user active' preference is off,
|
||||
list_item("--check_all_logins",
|
||||
"(Unix) If 'run if user active' preference is off,
|
||||
check for input activity on all current logins;
|
||||
default is to check only local mouse/keyboard"
|
||||
);
|
||||
list_item("-exit_when_idle",
|
||||
list_item("--exit_when_idle",
|
||||
"Get, process and report work, then exit."
|
||||
);
|
||||
list_item("-gui_rpc_port N",
|
||||
list_item("--gui_rpc_port N",
|
||||
"Specify port for GUI RPCs"
|
||||
);
|
||||
list_item("-allow_remote_gui_rpc",
|
||||
list_item("--allow_remote_gui_rpc",
|
||||
"Allow GUI RPCs from remote hosts"
|
||||
);
|
||||
list_item("-dir abs_path",
|
||||
list_item("--dir abs_path",
|
||||
"Use the given directory as BOINC home"
|
||||
);
|
||||
list_item("-detach",
|
||||
list_item("--detach",
|
||||
"Detach from console (Windows only)"
|
||||
);
|
||||
list_item("-no_gui_rpc",
|
||||
list_item("--no_gui_rpc",
|
||||
"Don't allow GUI RPCs."
|
||||
);
|
||||
list_item("-daemon",
|
||||
"Run as daemon (detach from controlling terminal; Linux only)"
|
||||
list_item("--daemon",
|
||||
"Linux: detach from controlling terminal; Windows: run as service"
|
||||
);
|
||||
list_end();
|
||||
echo "
|
||||
|
@ -127,28 +127,31 @@ list_item("SOCKS5_USER", "User name for SOCKS authentication");
|
|||
list_item("SOCKS5_PASSWD", "Password for SOCKS authentication");
|
||||
list_end();
|
||||
echo "
|
||||
<h2>Command-line options for debugging</h2>
|
||||
<h2>Implementation and debugging command-line options</h2>
|
||||
";
|
||||
list_start();
|
||||
list_item(" -exit_when_idle ",
|
||||
" Exit when we're not working on anything and a scheduling server
|
||||
list_item(" --exit_when_idle ",
|
||||
" Exit when we have no work and a scheduling server
|
||||
gives a 'no work' return."
|
||||
);
|
||||
list_item(" -no_time_test",
|
||||
list_item(" --no_time_test",
|
||||
" Don't run performance benchmarks; used fixed numbers instead."
|
||||
);
|
||||
list_item(" -exit_after N",
|
||||
" Exit after about N seconds"
|
||||
list_item(" --exit_after_app_start N",
|
||||
" Exit about N seconds after first application starts"
|
||||
);
|
||||
list_item(" -giveup_after N",
|
||||
" Give up on file transfers after N seconds (default is 2 weeks)"
|
||||
);
|
||||
list_item(" -limit_transfer_rate N",
|
||||
" Limit total network traffic to N bytes/sec."
|
||||
);
|
||||
list_item(" -min",
|
||||
list_item(" --min",
|
||||
" Put client in the background after starting up"
|
||||
);
|
||||
list_item(" --skip_cpu_benchmarks",
|
||||
" Don't run CPU benchmarks"
|
||||
);
|
||||
list_item(" --file_xfer_giveup_period N",
|
||||
" Specify giveup period for file transfers"
|
||||
);
|
||||
list_item(" --started_by_screensaver N",
|
||||
" Passed by screensaver when it launches client"
|
||||
);
|
||||
list_end();
|
||||
page_tail();
|
||||
?>
|
||||
|
|
|
@ -23,6 +23,7 @@ $spoken_languages = array(
|
|||
'Gujarati',
|
||||
'Hausa',
|
||||
'Hindi',
|
||||
'Hungarian/Magyar',
|
||||
'Italian',
|
||||
'Japanese',
|
||||
'Javanese',
|
||||
|
|
Loading…
Reference in New Issue