diff --git a/checkin_notes b/checkin_notes index 8bf55d8755..a619c7eb5f 100755 --- a/checkin_notes +++ b/checkin_notes @@ -4727,11 +4727,41 @@ Tim June 17, 2003 scheduler sends "openname_timestamp" as name open_name (if available) is used when creating a slot directory - client\ + client/ app.c - html_user\ + html_user/ project_specific_prefs_ap.inc - sched\ + sched/ handle_request.c server_types.c server_types.h + +David June 17 2003 + - If connect() fails, mark the HTTP_OP as done and in error. + Previously it just hung forever. + - Added DB fields for BOINC disk usage: total, project, and max + TODO: compute these on client and send in sched RPC + - Scheduler RPC request now includes a list of projects + and resource shares for the host. + Stored in the DB. + This lets the web site show other projects + that people participate in. + Also might be used in scheduling estimates. + - added a "Rules and policies" page to the web interface. + Users read this before creating account + - commented out check_max_mem_exceeded() (not ready) + + todo + client/ + app.C + cs_scheduler.C + http.C + db/ + boinc_db.C,h + schema.sql + doc/ + index.html + html_user/ + create_account_form.php + index.php + info.php diff --git a/client/app.C b/client/app.C index 4f6d5c44b5..3fa7335914 100644 --- a/client/app.C +++ b/client/app.C @@ -636,6 +636,7 @@ bool ACTIVE_TASK::check_max_disk_exceeded() { return false; } +#if 0 // if an app has exceeded its maximum allowed memory, abort it // bool ACTIVE_TASK::check_max_mem_exceeded() { @@ -648,6 +649,7 @@ bool ACTIVE_TASK::check_max_mem_exceeded() { } return false; } +#endif // Check if any of the active tasks have exceeded their // resource limits on disk, CPU time or memory @@ -660,7 +662,7 @@ bool ACTIVE_TASK_SET::check_rsc_limits_exceeded() { for (j=0;jcheck_max_cpu_exceeded()) return true; - else if (atp->check_max_mem_exceeded()) return true; + //else if (atp->check_max_mem_exceeded()) return true; else if (time(0)>last_disk_check_time + gstate.global_prefs.disk_interval) { last_disk_check_time = time(0); if (atp->check_max_disk_exceeded()) return true; diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index 3ee5e34939..a7ba5bb1cd 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -146,7 +146,7 @@ PROJECT* CLIENT_STATE::next_project(PROJECT* old) { // void CLIENT_STATE::compute_resource_debts() { unsigned int i, j; - PROJECT* p, *pbest=NULL; + PROJECT* p, *pbest=0; double best; for (i=0; i\n"); + for (i=0; i\n" + " %s\n" + " %f\n" + " \n", + project->master_url, + project->resource_share + ); + } + fprintf(f, "\n"); + retval = time_stats.write(f, true); if (retval) return retval; retval = net_stats.write(f, true); @@ -324,6 +338,7 @@ int CLIENT_STATE::handle_scheduler_reply( int retval; unsigned int i; bool signature_valid; + char buf[256]; nresults = 0; contacted_sched_server = true; @@ -355,7 +370,7 @@ int CLIENT_STATE::handle_scheduler_reply( project->user_create_time = sr.user_create_time; if (strlen(sr.message)) { int prio = (!strcmp(sr.message_priority, "high"))?MSG_ERROR:MSG_INFO; - msg_printf(project, prio, sr.message); + show_message(project, sr.message, prio); } if (sr.request_delay) { @@ -391,7 +406,6 @@ int CLIENT_STATE::handle_scheduler_reply( retval = global_prefs.parse_file(host_venue); if (retval) return retval; install_global_prefs(); - set_nslots(); } // deal with project preferences (should always be there) @@ -490,7 +504,8 @@ int CLIENT_STATE::handle_scheduler_reply( rp->state = RESULT_NEW; nresults++; } else { - msg_printf(project, MSG_ERROR, "Already have result %s\n", sr.results[i].name); + sprintf(buf, "Already have result %s\n", sr.results[i].name); + show_message(project, buf, MSG_ERROR); } } @@ -504,8 +519,10 @@ int CLIENT_STATE::handle_scheduler_reply( if (rp) { rp->server_ack = true; } else { - msg_printf(project, MSG_ERROR, "Got ack for result %s, can't find\n", - sr.result_acks[i].name); + sprintf(buf, "Got ack for result %s, can't find\n", + sr.result_acks[i].name + ); + show_message(project, buf, MSG_ERROR); } } project->sched_rpc_pending = false; diff --git a/client/http.C b/client/http.C index e23554f5ed..3f402c2d8b 100644 --- a/client/http.C +++ b/client/http.C @@ -334,6 +334,11 @@ bool HTTP_OP_SET::poll() { htp = http_ops[i]; switch(htp->http_op_state) { case HTTP_STATE_CONNECTING: + if (htp->error) { + htp->http_op_state = HTTP_STATE_DONE; + htp->http_op_retval = ERR_CONNECT; + break; + } if (htp->is_connected) { htp->http_op_state = HTTP_STATE_REQUEST_HEADER; htp->want_upload = true; diff --git a/db/boinc_db.C b/db/boinc_db.C index 0715287d64..b32b1b9806 100644 --- a/db/boinc_db.C +++ b/db/boinc_db.C @@ -468,9 +468,10 @@ void DB_HOST::db_print(char* buf){ "os_name='%s', os_version='%s', " "m_nbytes=%f, m_cache=%f, m_swap=%f, " "d_total=%f, d_free=%f, " + "d_boinc_used_total=%f, d_boinc_used_project=%f, d_boinc_max=%f, " "n_bwup=%f, n_bwdown=%f, " "credit_per_cpu_sec=%f, " - "venue='%s'", + "venue='%s', projects='%s'", id, create_time, userid, rpc_seqno, rpc_time, total_credit, expavg_credit, expavg_time, @@ -482,9 +483,10 @@ void DB_HOST::db_print(char* buf){ os_name, os_version, m_nbytes, m_cache, m_swap, d_total, d_free, + d_boinc_used_total, d_boinc_used_project, d_boinc_max, n_bwup, n_bwdown, credit_per_cpu_sec, - venue + venue, projects ); unescape_single_quotes(domain_name); unescape_single_quotes(serialnum); @@ -527,10 +529,14 @@ void DB_HOST::db_parse(MYSQL_ROW &r) { m_swap = atof(r[i++]); d_total = atof(r[i++]); d_free = atof(r[i++]); + d_boinc_used_total = atof(r[i++]); + d_boinc_used_project = atof(r[i++]); + d_boinc_max = atof(r[i++]); n_bwup = atof(r[i++]); n_bwdown = atof(r[i++]); credit_per_cpu_sec = atof(r[i++]); strcpy2(venue, r[i++]); + strcpy2(projects, r[i++]); } void DB_WORKUNIT::db_print(char* buf){ diff --git a/db/boinc_db.h b/db/boinc_db.h index 4423395095..668d208e8d 100755 --- a/db/boinc_db.h +++ b/db/boinc_db.h @@ -203,9 +203,18 @@ struct HOST { double m_cache; // Size of CPU cache in bytes (L1 or L2?) double m_swap; // Size of swap space in bytes - double d_total; // Total disk space - double d_free; - + double d_total; // Total disk space on host + // - may include all volumes, + // even if BOINC can use only one of them + // - may include network (shared) storage + double d_free; // Of the total disk space, how much is free + double d_boinc_used_total; + // amount being used for all projects + double d_boinc_used_project; + // amount being used for this project + double d_boinc_max; // max amount that BOINC is allowed to use + // This reflects both user preferences + // and the fact that BOINC can use only 1 volume double n_bwup; // Average upload bandwidth, bytes/sec double n_bwdown; // Average download bandwidth, bytes/sec @@ -213,6 +222,8 @@ struct HOST { double credit_per_cpu_sec; char venue[256]; // home/work/school + char projects[MAX_BLOB_SIZE]; + // list of projects this host is attached to (XML) int parse(FILE*); int parse_time_stats(FILE*); diff --git a/db/schema.sql b/db/schema.sql index 317e0881eb..359542477b 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -121,12 +121,16 @@ create table host ( d_total double not null, d_free double not null, + d_boinc_used_total double not null, + d_boinc_used_project double not null, + d_boinc_max double not null, n_bwup double not null, n_bwdown double not null, credit_per_cpu_sec double not null, venue varchar(254) not null, + projects blob, primary key (id) ); diff --git a/doc/index.html b/doc/index.html index b296146fe2..f3765dda64 100644 --- a/doc/index.html +++ b/doc/index.html @@ -51,6 +51,7 @@ Help debug and enhance the BOINC software.
    Chinese +Estonian French German Russian diff --git a/html/user/create_account_form.php b/html/user/create_account_form.php index 7dfb7c7b97..224314dab4 100644 --- a/html/user/create_account_form.php +++ b/html/user/create_account_form.php @@ -16,8 +16,13 @@ page_head("Create account"); echo "

Create an account with ".PROJECT."

+

+ Read the rules and policies before creating + an account +

"; + start_table(); row2("Name
diff --git a/html/user/index.php b/html/user/index.php index 8e68eef659..a6460d59a1 100644 --- a/html/user/index.php +++ b/html/user/index.php @@ -12,6 +12,7 @@

Join ".PROJECT."

diff --git a/test/boinc_db.inc b/test/boinc_db.inc index 445d283c2e..1c293cdc63 100644 --- a/test/boinc_db.inc +++ b/test/boinc_db.inc @@ -1,6 +1,6 @@ +Mon Jun 16 17:22:36 PDT 2003