diff --git a/checkin_notes b/checkin_notes index 670c51b490..378ccaf005 100755 --- a/checkin_notes +++ b/checkin_notes @@ -13589,3 +13589,23 @@ Daniel 15 June 2004 user/ 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) diff --git a/sched/wd.php b/html/ops/watchdogs.php old mode 100755 new mode 100644 similarity index 100% rename from sched/wd.php rename to html/ops/watchdogs.php diff --git a/sched/wd_nresults_changing.php b/html/ops/wd_nresults_changing.php old mode 100755 new mode 100644 similarity index 100% rename from sched/wd_nresults_changing.php rename to html/ops/wd_nresults_changing.php diff --git a/py/Boinc/setup_project.py b/py/Boinc/setup_project.py index 57173f465f..acddfdc9f4 100644 --- a/py/Boinc/setup_project.py +++ b/py/Boinc/setup_project.py @@ -279,10 +279,11 @@ def install_boinc_files(dest_dir): [ 'make_work', 'feeder', 'transitioner', 'validate_test', 'validate_trivial', 'file_deleter', 'assimilator', 'update_stats', 'db_dump' ]) 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)), [ '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: diff --git a/sched/kill_server b/sched/kill_server deleted file mode 100755 index 83e60a1e3b..0000000000 --- a/sched/kill_server +++ /dev/null @@ -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 | }" % 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)', diff --git a/sched/start_servers.C b/sched/start_servers.C deleted file mode 100644 index 8ec95c689e..0000000000 --- a/sched/start_servers.C +++ /dev/null @@ -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 -#include - -#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; -} diff --git a/sched/util.inc b/sched/util.inc deleted file mode 100644 index 3ed81090c6..0000000000 --- a/sched/util.inc +++ /dev/null @@ -1,42 +0,0 @@ -"); - if (!$db_name) return false; - return mysql_select_db($db_name); -} - -?> diff --git a/sched/grep_logs b/tools/grep_logs similarity index 100% rename from sched/grep_logs rename to tools/grep_logs diff --git a/sched/watch_tcp b/tools/watch_tcp old mode 100755 new mode 100644 similarity index 100% rename from sched/watch_tcp rename to tools/watch_tcp