svn path=/trunk/boinc/; revision=1536
This commit is contained in:
David Anderson 2003-06-18 20:52:17 +00:00
parent 69a0a04726
commit fd316544cd
6 changed files with 51 additions and 5 deletions

View File

@ -4801,3 +4801,31 @@ Tim June 18, 2003
html_user/ html_user/
create_account_action.php create_account_action.php
create_account_form.php create_account_form.php
David June 18 2003
- export user country and create_time in db_dump
- move functions involving BOINC "soft links" to app_ipc.C
(they don't belong in filesys.C)
- move functions to get filesystem total/free to filesys.C
- add doc page for watchdogs
api/
boinc_api.C
client/
hostinfo.h
hostinfo_unix.C
db/
boinc_db.h
doc/
create_project.html
db_dump.html
watchdog.html (new)
lib/
app_ipc.C,h
filesys.C,h
sched/
Makefile.am
db_dump.C
file_upload_handler.C
handle_request.C
server_types.C,h

View File

@ -184,8 +184,8 @@ struct HOST {
char last_ip_addr[256]; char last_ip_addr[256];
int nsame_ip_addr; int nsame_ip_addr;
double on_frac; // Fraction of the time (0-1) that the host is on double on_frac; // Fraction of time (0-1) that BOINC is running
double connected_frac; // Fraction of time that host is connected double connected_frac; // Fraction of time that host is connected to net
double active_frac; // Fraction of time that host is enabled to work double active_frac; // Fraction of time that host is enabled to work
int p_ncpus; // Number of CPUs on host int p_ncpus; // Number of CPUs on host
@ -217,13 +217,17 @@ struct HOST {
// and the fact that BOINC can use only 1 volume // and the fact that BOINC can use only 1 volume
double n_bwup; // Average upload bandwidth, bytes/sec double n_bwup; // Average upload bandwidth, bytes/sec
double n_bwdown; // Average download bandwidth, bytes/sec double n_bwdown; // Average download bandwidth, bytes/sec
// The above are derived from actual
// file upload/download times, and may reflect
// factors other than network bandwidth
// The following is derived (by server) from other fields // The following is derived (by server) from other fields
double credit_per_cpu_sec; double credit_per_cpu_sec;
char venue[256]; // home/work/school char venue[256]; // home/work/school
char projects[MAX_BLOB_SIZE]; char projects[MAX_BLOB_SIZE];
// list of projects this host is attached to (XML) // list of projects this host is attached to,
// and the resource shares (XML)
int parse(FILE*); int parse(FILE*);
int parse_time_stats(FILE*); int parse_time_stats(FILE*);

View File

@ -148,11 +148,15 @@ void write_user(USER& user, FILE* f, bool detail, bool show_team) {
" <id>%d</id>\n" " <id>%d</id>\n"
" <name>%s</name>\n" " <name>%s</name>\n"
" <url>%s</url>\n" " <url>%s</url>\n"
" <country>%s</country>\n"
" <create_time>%d</create_time>\n"
" <total_credit>%f</total_credit>\n" " <total_credit>%f</total_credit>\n"
" <expavg_credit>%f</expavg_credit>\n", " <expavg_credit>%f</expavg_credit>\n",
user.id, user.id,
user.name, user.name,
user.url, user.url,
user.country,
user.create_time,
user.total_credit, user.total_credit,
user.expavg_credit user.expavg_credit
); );

View File

@ -45,6 +45,7 @@ int SCHEDULER_REQUEST::parse(FILE* fin) {
hostid = 0; hostid = 0;
work_req_seconds = 0; work_req_seconds = 0;
strcpy(global_prefs_xml, ""); strcpy(global_prefs_xml, "");
strcpy(projects_xml, "");
strcpy(code_sign_key, ""); strcpy(code_sign_key, "");
fgets(buf, 256, fin); fgets(buf, 256, fin);
@ -66,6 +67,14 @@ int SCHEDULER_REQUEST::parse(FILE* fin) {
} }
safe_strcat(global_prefs_xml, "</global_preferences>\n"); safe_strcat(global_prefs_xml, "</global_preferences>\n");
} }
else if (match_tag(buf, "<projects>")) {
strcpy(projects_xml, "<projects>\n");
while (fgets(buf, 256, fin)) {
if (strstr(buf, "</projects>")) break;
safe_strcat(projects_xml, buf);
}
safe_strcat(projects_xml, "</projects>\n");
}
else if (match_tag(buf, "<host_info>")) { else if (match_tag(buf, "<host_info>")) {
host.parse(fin); host.parse(fin);
continue; continue;

View File

@ -35,6 +35,7 @@ struct SCHEDULER_REQUEST {
int rpc_seqno; int rpc_seqno;
int work_req_seconds; int work_req_seconds;
char global_prefs_xml[MAX_BLOB_SIZE]; char global_prefs_xml[MAX_BLOB_SIZE];
char projects_xml[MAX_BLOB_SIZE];
char code_sign_key[MAX_BLOB_SIZE]; char code_sign_key[MAX_BLOB_SIZE];
HOST host; HOST host;

View File

@ -1,6 +1,6 @@
Mon Jun 16 17:22:36 PDT 2003
<?php <?php
// Generated by db_def_to_php on define("MAX_BLOB_SIZE", 4096); // Generated by db_def_to_php on Tue Jun 17 14:48:40 PDT 2003
define("MAX_BLOB_SIZE", 4096);
define("TEAM_TYPE_CLUB", 1); define("TEAM_TYPE_CLUB", 1);
define("TEAM_TYPE_COMPANY", 2); define("TEAM_TYPE_COMPANY", 2);
define("TEAM_TYPE_PRIMARY", 3); define("TEAM_TYPE_PRIMARY", 3);