mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3580
This commit is contained in:
parent
b87634c90f
commit
09709bff77
|
@ -13589,3 +13589,23 @@ Daniel 15 June 2004
|
||||||
user/
|
user/
|
||||||
project.inc.sample
|
project.inc.sample
|
||||||
|
|
||||||
|
Rom 15 June 2004
|
||||||
|
- Move shell scripts that were in the sched folder to the tools folder
|
||||||
|
- remove start_servers.C and kill_server
|
||||||
|
- Move watchdog scripts to ops folder
|
||||||
|
|
||||||
|
html/ops/
|
||||||
|
watchdogs.php (added)
|
||||||
|
wd_nresults_changing.php (added)
|
||||||
|
py/boinc/
|
||||||
|
setup_project.py
|
||||||
|
sched/
|
||||||
|
kill_server (removed)
|
||||||
|
start_servers.C (removed)
|
||||||
|
wd.php (removed)
|
||||||
|
wd_nresults_changing.php (removed)
|
||||||
|
watch_tcp (removed)
|
||||||
|
grep_logs (removed)
|
||||||
|
tools/
|
||||||
|
watch_tcp (added)
|
||||||
|
grep_logs (added)
|
||||||
|
|
|
@ -279,10 +279,11 @@ def install_boinc_files(dest_dir):
|
||||||
[ 'make_work', 'feeder', 'transitioner', 'validate_test', 'validate_trivial',
|
[ 'make_work', 'feeder', 'transitioner', 'validate_test', 'validate_trivial',
|
||||||
'file_deleter', 'assimilator', 'update_stats', 'db_dump' ])
|
'file_deleter', 'assimilator', 'update_stats', 'db_dump' ])
|
||||||
map(lambda (s): install(srcdir('sched',s), dir('bin',s)),
|
map(lambda (s): install(srcdir('sched',s), dir('bin',s)),
|
||||||
[ 'start', 'stop', 'status', 'grep_logs' ])
|
[ 'start', 'stop', 'status' ])
|
||||||
map(lambda (s): install(srcdir('tools',s), dir('bin',s)),
|
map(lambda (s): install(srcdir('tools',s), dir('bin',s)),
|
||||||
[ 'boinc_path_config.py', 'create_work', 'add', 'xadd', 'dbcheck_files_exist',
|
[ 'boinc_path_config.py', 'create_work', 'add', 'xadd', 'dbcheck_files_exist',
|
||||||
'update_versions', 'upgrade', 'parse_config', 'db_query' ])
|
'update_versions', 'upgrade', 'parse_config', 'grep_logs', 'db_query',
|
||||||
|
'watch_tcp' ])
|
||||||
|
|
||||||
|
|
||||||
class Project:
|
class Project:
|
||||||
|
|
|
@ -1,85 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
echo 'this file is no longer used; cvs remove when ready'
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
## $Id$
|
|
||||||
|
|
||||||
## stop_server stop specified server(s)
|
|
||||||
|
|
||||||
import sys, os, getopt
|
|
||||||
|
|
||||||
daemons = [ 'assimilator',
|
|
||||||
'db_dump',
|
|
||||||
'feeder',
|
|
||||||
'file_deleter',
|
|
||||||
'make_work',
|
|
||||||
'timeout_check',
|
|
||||||
'update_stats',
|
|
||||||
'validate' ]
|
|
||||||
|
|
||||||
def help():
|
|
||||||
print >>sys.stderr, "Syntax: %s [-q] [-v] { ALL | <daemons...> }" % sys.argv[0]
|
|
||||||
print >>sys.stderr, """ Stops running BOINC daemon(s).
|
|
||||||
-q : don't warn when kill fails
|
|
||||||
-v : print names of the daemons killed
|
|
||||||
Valid daemons are:"""
|
|
||||||
for daemon in daemons:
|
|
||||||
print >>sys.stderr, " ", daemon
|
|
||||||
print >>sys.stderr, " ALL : all of the above; implies -q"
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
|
|
||||||
quiet = False
|
|
||||||
verbose = False
|
|
||||||
try:
|
|
||||||
opts, args = getopt.getopt(sys.argv[1:], 'qvh')
|
|
||||||
except Exception, e:
|
|
||||||
print >>sys.stderr, e
|
|
||||||
print >>sys.stderr, "Use '%s -h' for help" % sys.argv[0]
|
|
||||||
sys.exit(1)
|
|
||||||
for opt,v in opts:
|
|
||||||
if opt == '-q': quiet = True
|
|
||||||
elif opt == '-v': verbose = True
|
|
||||||
elif opt == '-h': help()
|
|
||||||
else: assert(False)
|
|
||||||
if not args:
|
|
||||||
print >>sys.stderr, "No daemons specified"
|
|
||||||
print >>sys.stderr, "Use '%s -h' for help" % sys.argv[0]
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
if 'ALL' in args:
|
|
||||||
args = daemons
|
|
||||||
quiet = True
|
|
||||||
|
|
||||||
killed = 0
|
|
||||||
|
|
||||||
for arg in args:
|
|
||||||
if not arg in daemons:
|
|
||||||
print >>sys.stderr, 'Warning: "%s" is not a valid BOINC daemon' % arg
|
|
||||||
pidfilename = arg + '.pid'
|
|
||||||
try:
|
|
||||||
pidfile = open(pidfilename)
|
|
||||||
except IOError, e:
|
|
||||||
if not quiet:
|
|
||||||
print >>sys.stderr, "Error stopping %s: couldn't open pidfile %s\n %s" % (arg, pidfilename, e)
|
|
||||||
continue
|
|
||||||
try:
|
|
||||||
pid = int(pidfile.readline())
|
|
||||||
except:
|
|
||||||
print >>sys.stderr, "Error stopping %s: couldn't read pid from pidfile %s" % (arg, pidfilename)
|
|
||||||
continue
|
|
||||||
try:
|
|
||||||
os.kill(pid, 2)
|
|
||||||
if verbose:
|
|
||||||
print arg,
|
|
||||||
killed += 1
|
|
||||||
except OSError, e:
|
|
||||||
if not quiet:
|
|
||||||
print >>sys.stderr, "Error stopping %s: couldn't kill %d\n %s" % (arg, pid, e)
|
|
||||||
|
|
||||||
if verbose and not killed:
|
|
||||||
print '(none killed)',
|
|
|
@ -1,53 +0,0 @@
|
||||||
#error 'this file is no longer used; cvs remove when ready'
|
|
||||||
|
|
||||||
// The contents of this file are subject to the BOINC Public License
|
|
||||||
// Version 1.0 (the "License"); you may not use this file except in
|
|
||||||
// compliance with the License. You may obtain a copy of the License at
|
|
||||||
// http://boinc.berkeley.edu/license_1.0.txt
|
|
||||||
//
|
|
||||||
// Software distributed under the License is distributed on an "AS IS"
|
|
||||||
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
|
||||||
// License for the specific language governing rights and limitations
|
|
||||||
// under the License.
|
|
||||||
//
|
|
||||||
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
|
||||||
//
|
|
||||||
// The Initial Developer of the Original Code is the SETI@home project.
|
|
||||||
// Portions created by the SETI@home project are Copyright (C) 2002
|
|
||||||
// University of California at Berkeley. All Rights Reserved.
|
|
||||||
//
|
|
||||||
// Contributor(s):
|
|
||||||
//
|
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cstdlib>
|
|
||||||
|
|
||||||
#include "sched_config.h"
|
|
||||||
#include "sched_util.h"
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
SCHED_CONFIG config;
|
|
||||||
int i, retval;
|
|
||||||
char* p;
|
|
||||||
|
|
||||||
log_messages.set_debug_level(3);
|
|
||||||
log_messages.printf(SCHED_MSG_LOG::NORMAL, "Starting servers.\n");
|
|
||||||
++log_messages;
|
|
||||||
|
|
||||||
retval = config.parse_file();
|
|
||||||
if (retval) {
|
|
||||||
log_messages.printf(SCHED_MSG_LOG::CRITICAL, "Can't read config\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i=0; i<20; i++) {
|
|
||||||
p = config.start_commands[i];
|
|
||||||
if (!p) break;
|
|
||||||
log_messages.printf(SCHED_MSG_LOG::NORMAL, "Executing: %s\n", p);
|
|
||||||
system(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
--log_messages;
|
|
||||||
log_messages.printf(SCHED_MSG_LOG::NORMAL, "Done.\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
// look for an element in some XML text
|
|
||||||
//
|
|
||||||
function parse_element($xml, $tag) {
|
|
||||||
$element = null;
|
|
||||||
$x = strstr($xml, $tag);
|
|
||||||
if ($x) {
|
|
||||||
$y = substr($x, strlen($tag));
|
|
||||||
$n = strpos($y, "<");
|
|
||||||
if ($n) {
|
|
||||||
$element = substr($y, 0, $n);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $element;
|
|
||||||
}
|
|
||||||
|
|
||||||
// look for a particular element in the config.xml file
|
|
||||||
//
|
|
||||||
function parse_config($tag) {
|
|
||||||
$element = null;
|
|
||||||
$fp = fopen("config.xml", "r");
|
|
||||||
if (!$fp) return false;
|
|
||||||
while (1) {
|
|
||||||
$buf = fgets($fp, 1024);
|
|
||||||
if ($buf == null) break;
|
|
||||||
$element = parse_element($buf, $tag);
|
|
||||||
if ($element) break;
|
|
||||||
}
|
|
||||||
fclose($fp);
|
|
||||||
return $element;
|
|
||||||
}
|
|
||||||
|
|
||||||
function db_init() {
|
|
||||||
$retval = mysql_pconnect();
|
|
||||||
if (!$retval) return false;
|
|
||||||
$db_name = parse_config("<db_name>");
|
|
||||||
if (!$db_name) return false;
|
|
||||||
return mysql_select_db($db_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
Loading…
Reference in New Issue