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
0ca81cb1da
|
@ -24,19 +24,121 @@
|
|||
/win_build/installerv2/redist/Windows/src/boinccas/Release95
|
||||
/win_build/installerv2/redist/Windows/src/boinccas/x64
|
||||
|
||||
# Netbeans project files
|
||||
/html/nbproject/
|
||||
|
||||
#
|
||||
*.pfx
|
||||
*.pvk
|
||||
*.spc
|
||||
*.o
|
||||
*.lo
|
||||
*.a
|
||||
*.la
|
||||
*.in
|
||||
/client/Makefile
|
||||
/win_build/*.filters
|
||||
/win_build/boinc.sdf
|
||||
/win_build/boinc.opensdf
|
||||
/win_build/ipch
|
||||
/win_build/installerv2/redist/Windows/src/boinccas/*.filters
|
||||
/win_build/installerv2/redist/Windows/src/boinccas/boinccas.sdf
|
||||
|
||||
## files created by _autosetup (autoreconf):
|
||||
*.in
|
||||
*.in~
|
||||
aclocal.m4
|
||||
autom4te.cache/
|
||||
compile
|
||||
config.guess
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
ltmain.sh
|
||||
m4/libtool.m4
|
||||
m4/ltoptions.m4
|
||||
m4/ltsugar.m4
|
||||
m4/ltversion.m4
|
||||
m4/lt~obsolete.m4
|
||||
missing
|
||||
test-driver
|
||||
|
||||
## files created by configure:
|
||||
Makefile
|
||||
.deps/
|
||||
boinc_path_config.py
|
||||
pkginfo
|
||||
prototype
|
||||
client/scripts/boinc-client
|
||||
config.h
|
||||
config.log
|
||||
config.status
|
||||
libtool
|
||||
py/Boinc/version.py
|
||||
py/setup.py
|
||||
stamp-h1
|
||||
test/version.inc
|
||||
|
||||
## files created by make:
|
||||
*.o
|
||||
*.lo
|
||||
*.a
|
||||
*.la
|
||||
.libs/
|
||||
svn_version.h
|
||||
# list of executables
|
||||
apps/1sec
|
||||
apps/concat
|
||||
apps/upper_case
|
||||
client/boinc
|
||||
client/boinc_client
|
||||
client/boinccmd
|
||||
client/switcher
|
||||
clientgui/boincmgr
|
||||
clientscr/boincscr
|
||||
doc/manpages/appmgr.8
|
||||
doc/manpages/boinc.1
|
||||
doc/manpages/boinccmd.1
|
||||
doc/manpages/boincmgr.1
|
||||
lib/crypt_prog
|
||||
lib/parse_test
|
||||
py/lib.*/
|
||||
sched/adjust_user_priority
|
||||
sched/antique_file_deleter
|
||||
sched/census
|
||||
sched/cgi
|
||||
sched/credit_test
|
||||
sched/db_dump
|
||||
sched/db_purge
|
||||
sched/delete_file
|
||||
sched/fcgi
|
||||
sched/fcgi_file_upload_handler
|
||||
sched/feeder
|
||||
sched/file_deleter
|
||||
sched/file_upload_handler
|
||||
sched/get_file
|
||||
sched/make_work
|
||||
sched/message_handler
|
||||
sched/put_file
|
||||
sched/sample_assimilator
|
||||
sched/sample_bitwise_validator
|
||||
sched/sample_dummy_assimilator
|
||||
sched/sample_substr_validator
|
||||
sched/sample_trivial_validator
|
||||
sched/sample_work_generator
|
||||
sched/sched_driver
|
||||
sched/show_shmem
|
||||
sched/single_job_assimilator
|
||||
sched/size_regulator
|
||||
sched/status
|
||||
sched/stop
|
||||
sched/transitioner
|
||||
sched/trickle_credit
|
||||
sched/trickle_deadline
|
||||
sched/trickle_echo
|
||||
sched/update_stats
|
||||
sched/wu_check
|
||||
tools/cancel_jobs
|
||||
tools/create_work
|
||||
tools/dir_hier_move
|
||||
tools/dir_hier_path
|
||||
tools/remote_submit_test
|
||||
tools/sign_executable
|
||||
vda/ssim
|
||||
vda/vda
|
||||
vda/vdad
|
12
_autosetup
12
_autosetup
|
@ -17,7 +17,7 @@ esac
|
|||
## return 0 if ok, 1 too old or not found (-> shell conventions).
|
||||
## ----------------------------------------------------------------------
|
||||
check_version()
|
||||
{
|
||||
{
|
||||
dir=`pwd`
|
||||
cd /tmp
|
||||
foundit=
|
||||
|
@ -30,7 +30,7 @@ check_version()
|
|||
foundit=yes;
|
||||
fi
|
||||
|
||||
if [ "$foundit" != yes ]; then
|
||||
if [ "$foundit" != yes ]; then
|
||||
echo "Didn't find application";
|
||||
version=0
|
||||
success=no
|
||||
|
@ -63,7 +63,7 @@ check_version()
|
|||
|
||||
|
||||
## --------------------------------------------------------------------------------
|
||||
## 'MAIN' starts here
|
||||
## 'MAIN' starts here
|
||||
## --------------------------------------------------------------------------------
|
||||
echo "Bootstrapping configure script and makefiles:"
|
||||
|
||||
|
@ -93,7 +93,7 @@ check_version()
|
|||
echo >/dev/null
|
||||
elif check_version gm4 1.4; then
|
||||
have_gm4=yes;
|
||||
else
|
||||
else
|
||||
echo "Couldn't find a new-enough version of 'm4', please install one!";
|
||||
echo "If you have a newer version, set the environment variable 'M4' to its path";
|
||||
exit 1;
|
||||
|
@ -134,6 +134,10 @@ check_version()
|
|||
|
||||
## ---------- now run autoreconf
|
||||
cmdline="autoreconf -i";
|
||||
## -- if _autosetup was invoked with -f run autoreconf with -f to force a recreation of all files
|
||||
if [ "x$1" == "x-f" ]; then
|
||||
cmdline="autoreconf -i -f";
|
||||
fi
|
||||
echo "$cmdline"
|
||||
if eval $cmdline; then
|
||||
echo "Done, now run ./configure"
|
||||
|
|
|
@ -8,6 +8,7 @@ define('USER_HOST_TTL', 3600);
|
|||
define('USER_PROFILE_TTL', 3600);
|
||||
define('TOP_PAGES_TTL', 43200);
|
||||
define('INDEX_PAGE_TTL', 3600);
|
||||
define('STATUS_PAGE_TTL', 3600);
|
||||
|
||||
// max allowed cache usage
|
||||
//
|
||||
|
|
|
@ -58,6 +58,10 @@ check_get_args(array("xml"));
|
|||
|
||||
$xml = get_int("xml", true);
|
||||
|
||||
if (!defined('STATUS_PAGE_TTL')) {
|
||||
define('STATUS_PAGE_TTL', 3600);
|
||||
}
|
||||
|
||||
// daemon status outputs: 1 (running) 0 (not running) or -1 (disabled)
|
||||
//
|
||||
function daemon_status($host, $pidname, $progname, $disabled) {
|
||||
|
@ -130,51 +134,51 @@ function show_counts($key, $xmlkey, $value) {
|
|||
}
|
||||
|
||||
function get_mysql_count($table, $query) {
|
||||
$count = unserialize(get_cached_data(3600, "get_mysql_count".$table.$query));
|
||||
$count = unserialize(get_cached_data(STATUS_PAGE_TTL, "get_mysql_count".$table.$query));
|
||||
if ($count == false) {
|
||||
$count = BoincDB::get()->count($table,$query);
|
||||
set_cached_data(3600, serialize($count), "get_mysql_count".$table.$query);
|
||||
$count = BoincDB::get()->count($table, $query);
|
||||
set_cached_data(STATUS_PAGE_TTL, serialize($count), "get_mysql_count".$table.$query);
|
||||
}
|
||||
return $count;
|
||||
}
|
||||
|
||||
function get_mysql_sum($table, $field) {
|
||||
$value = unserialize(get_cached_data(3600, "get_mysql_sum".$table.$field));
|
||||
function get_mysql_sum($table, $field, $clause="") {
|
||||
$value = unserialize(get_cached_data(STATUS_PAGE_TTL, "get_mysql_sum".$table.$field.$clause));
|
||||
if ($value == false) {
|
||||
$value = BoincDB::get()->sum($table, $field);
|
||||
set_cached_data(3600, serialize($value), "get_mysql_sum".$table.$field);
|
||||
$value = BoincDB::get()->sum($table, $field, $clause);
|
||||
set_cached_data(STATUS_PAGE_TTL, serialize($value), "get_mysql_sum".$table.$field.$clause);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
function get_cached_apps() {
|
||||
$apps = unserialize(get_cached_data(3600, "get_cached_apps"));
|
||||
$apps = unserialize(get_cached_data(STATUS_PAGE_TTL, "get_cached_apps"));
|
||||
if ($apps == false) {
|
||||
$apps = BoincApp::enum("deprecated=0");
|
||||
set_cached_data(3600, serialize($apps), "get_cached_apps");
|
||||
set_cached_data(STATUS_PAGE_TTL, serialize($apps), "get_cached_apps");
|
||||
}
|
||||
return $apps;
|
||||
}
|
||||
|
||||
function get_runtime_info($appid) {
|
||||
$info = unserialize(get_cached_data(3600, "get_runtime_info".$appid));
|
||||
$info = unserialize(get_cached_data(STATUS_PAGE_TTL, "get_runtime_info".$appid));
|
||||
if ($info == false) {
|
||||
$info = BoincDB::get()->lookup_fields("result", "stdClass",
|
||||
"ceil(avg(elapsed_time)/3600*100)/100 as avg,
|
||||
ceil(min(elapsed_time)/3600*100)/100 as min,
|
||||
ceil(max(elapsed_time)/3600*100)/100 as max,
|
||||
count(distinct userid) as users",
|
||||
"appid = $appid
|
||||
AND validate_state=1
|
||||
AND received_time > (unix_timestamp()-(3600*24))
|
||||
"appid = $appid
|
||||
AND validate_state=1
|
||||
AND received_time > (unix_timestamp()-(3600*24))
|
||||
"
|
||||
);
|
||||
if (!$info){
|
||||
// No recent jobs sound
|
||||
// No recent jobs found
|
||||
$info = new stdClass;
|
||||
$info->avg = $info->min = $info->max = $info->users = 0;
|
||||
}
|
||||
set_cached_data(3600, serialize($info), "get_runtime_info".$appid);
|
||||
set_cached_data(STATUS_PAGE_TTL, serialize($info), "get_runtime_info".$appid);
|
||||
}
|
||||
return $info;
|
||||
}
|
||||
|
@ -215,10 +219,20 @@ $version = null;
|
|||
if (file_exists("../../local.revision")) {
|
||||
$version = trim(file_get_contents("../../local.revision"));
|
||||
}
|
||||
$now = time();
|
||||
|
||||
// we cache the current time to show via XML or on the page itself
|
||||
// assuming that every cached element on this page is generated at the same time!
|
||||
// To reset this, set STATUS_PAGE_TTL to 0 in project/cache_parameters.inc open
|
||||
// this page in a browser and then set it back to 3600
|
||||
//
|
||||
$last_update = unserialize(get_cached_data(STATUS_PAGE_TTL, "server_status_last_update"));
|
||||
if ($last_update == false) {
|
||||
$last_update = time();
|
||||
set_cached_data(STATUS_PAGE_TTL, serialize($last_update), "server_status_last_update");
|
||||
}
|
||||
|
||||
$xmlstring = "<server_status>
|
||||
<update_time>$now</update_time>
|
||||
<update_time>$last_update</update_time>
|
||||
";
|
||||
if ($version) {
|
||||
$xmlstring .= "<software_version>$version</software_version>\n";
|
||||
|
@ -232,7 +246,7 @@ if ($xml) {
|
|||
if ($version) {
|
||||
echo tra("Server software version: %1", $version) . " / ";
|
||||
}
|
||||
echo time_str(time()), "
|
||||
echo time_str($last_update), "
|
||||
<table width=100%>
|
||||
<tr>
|
||||
<td width=40% valign=top>
|
||||
|
@ -241,7 +255,6 @@ if ($xml) {
|
|||
<tr><th>".tra("Program")."</th><th>".tra("Host")."</th><th>".tra("Status")."</th></tr>
|
||||
";
|
||||
}
|
||||
;
|
||||
// Are the data-driven web sites running? Check for existence of stop_web.
|
||||
// If it is there, set $web_running to -1 for "disabled",
|
||||
// otherwise it will be already set to 1 for "enabled."
|
||||
|
@ -353,7 +366,7 @@ if ($retval) {
|
|||
get_mysql_count("result", "file_delete_state=1")
|
||||
);
|
||||
|
||||
$gap = unserialize(get_cached_data(3600, "transitioner_backlog"));
|
||||
$gap = unserialize(get_cached_data(STATUS_PAGE_TTL, "transitioner_backlog"));
|
||||
if ($gap === false) {
|
||||
$min = BoincDB::get()->lookup_fields("workunit", "stdClass", "MIN(transition_time) as min", "TRUE");
|
||||
//$gap = BoincDB::get()->min("workunit", "transition_time"); $gap = time()-$gap/3600;
|
||||
|
@ -361,7 +374,7 @@ if ($retval) {
|
|||
if (($gap < 0) || ($min->min == 0)) {
|
||||
$gap = 0;
|
||||
}
|
||||
set_cached_data(3600, serialize($gap), "transitioner_backlog");
|
||||
set_cached_data(STATUS_PAGE_TTL, serialize($gap), "transitioner_backlog");
|
||||
}
|
||||
show_counts(
|
||||
tra("Transitioner backlog (hours)"),
|
||||
|
|
Loading…
Reference in New Issue