mirror of https://github.com/BOINC/boinc.git
Merge branch 'master' of ssh://isaac.ssl.berkeley.edu/boinc-v2
This commit is contained in:
commit
f47da314b8
|
@ -819,7 +819,15 @@ int ACCT_MGR_INFO::init() {
|
||||||
|
|
||||||
clear();
|
clear();
|
||||||
p = fopen(ACCT_MGR_URL_FILENAME, "r");
|
p = fopen(ACCT_MGR_URL_FILENAME, "r");
|
||||||
if (!p) return 0;
|
if (!p) {
|
||||||
|
// if not using acct mgr, make sure projects not flagged,
|
||||||
|
// otherwise won't be able to detach them.
|
||||||
|
//
|
||||||
|
for (unsigned int i=0; i<gstate.projects.size(); i++) {
|
||||||
|
gstate.projects[i]->attached_via_acct_mgr = false;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
mf.init_file(p);
|
mf.init_file(p);
|
||||||
XML_PARSER xp(&mf);
|
XML_PARSER xp(&mf);
|
||||||
if (!xp.parse_start("acct_mgr_login")) {
|
if (!xp.parse_start("acct_mgr_login")) {
|
||||||
|
@ -859,13 +867,6 @@ int ACCT_MGR_INFO::init() {
|
||||||
if (p) {
|
if (p) {
|
||||||
parse_login_file(p);
|
parse_login_file(p);
|
||||||
fclose(p);
|
fclose(p);
|
||||||
} else {
|
|
||||||
// if not using acct mgr, make sure projects not flagged,
|
|
||||||
// otherwise won't be able to detach them.
|
|
||||||
//
|
|
||||||
for (unsigned int i=0; i<gstate.projects.size(); i++) {
|
|
||||||
gstate.projects[i]->attached_via_acct_mgr = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -303,20 +303,27 @@ bool app_running(PROC_MAP& pm, const char* p) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0 // debugging
|
#if 1 // debugging
|
||||||
void procinfo_show(PROCINFO& pi, PROC_MAP& pm) {
|
void procinfo_show(PROC_MAP& pm) {
|
||||||
unsigned int i;
|
PROCINFO pi;
|
||||||
memset(&pi, 0, sizeof(pi));
|
pi.clear();
|
||||||
PROC_MAP::iterator i;
|
PROC_MAP::iterator i;
|
||||||
for (i=pm.begin(); i!=pm.end(); i++) {
|
for (i=pm.begin(); i!=pm.end(); i++) {
|
||||||
PROCINFO& p = i->second;
|
PROCINFO& p = i->second;
|
||||||
|
|
||||||
|
msg_printf(NULL, MSG_INFO, "%d %s: boinc? %d low_pri %d (u%f k%f)",
|
||||||
|
p.id, p.command, p.is_boinc_app, p.is_low_priority,
|
||||||
|
p.user_time, p.kernel_time
|
||||||
|
);
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (p.id == 0) continue;
|
||||||
|
#endif
|
||||||
|
if (p.is_boinc_app) continue;
|
||||||
|
if (p.is_low_priority) continue;
|
||||||
pi.kernel_time += p.kernel_time;
|
pi.kernel_time += p.kernel_time;
|
||||||
pi.user_time += p.user_time;
|
pi.user_time += p.user_time;
|
||||||
msg_printf(NULL, MSG_INFO, "%d %s: boinc %d low %d (%f %f) total (%f %f)",
|
|
||||||
p.id, p.command, p.is_boinc_app, p.is_low_priority, p.kernel_time, p.user_time, pi.kernel_time, pi.user_time
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
msg_printf(NULL, MSG_INFO, "non-boinc: u%f k%f", pi.user_time, pi.kernel_time);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -453,9 +460,9 @@ void ACTIVE_TASK_SET::get_memory_usage() {
|
||||||
// so they're not useful for detecting paging/thrashing.
|
// so they're not useful for detecting paging/thrashing.
|
||||||
//
|
//
|
||||||
PROCINFO pi;
|
PROCINFO pi;
|
||||||
//procinfo_show(pi, pm);
|
|
||||||
procinfo_non_boinc(pi, pm);
|
procinfo_non_boinc(pi, pm);
|
||||||
if (log_flags.mem_usage_debug) {
|
if (log_flags.mem_usage_debug) {
|
||||||
|
//procinfo_show(pm);
|
||||||
msg_printf(NULL, MSG_INFO,
|
msg_printf(NULL, MSG_INFO,
|
||||||
"[mem_usage] All others: WS %.2fMB, swap %.2fMB, user %.3fs, kernel %.3fs",
|
"[mem_usage] All others: WS %.2fMB, swap %.2fMB, user %.3fs, kernel %.3fs",
|
||||||
pi.working_set_size/MEGA, pi.swap_size/MEGA,
|
pi.working_set_size/MEGA, pi.swap_size/MEGA,
|
||||||
|
|
Loading…
Reference in New Issue