To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit ef262df7 authored by Reto Da Forno's avatar Reto Da Forno

minor adjustments

git-svn-id: svn://svn.ee.ethz.ch/flocklab/trunk/shared@3343 613144d5-4475-0410-9df3-888732ad2c88
parent d91aaf7f
# FLOCKLAB CRON JOBS (TEMPLATE):
* * * * * /home/flocklab/flocklab_bin/testmanagementserver/flocklab_scheduler.py --debug >> /dev/null 2>&1
*/10 * * * * /home/flocklab/flocklab_bin/testmanagementserver/flocklab_cleaner.py --debug >> /dev/null 2>&1
0 5 * * * /home/flocklab/flocklab_bin/testmanagementserver/flocklab_retention_cleaner.py --debug >> /dev/null 2>&1
0 0 * * * /usr/sbin/logrotate --state /home/flocklab/flocklab_bin/testmanagementserver/logrotate/status /home/flocklab/flocklab_bin/testmanagementserver/logrotate/flocklab
0 0 * * * /usr/sbin/logrotate --state /home/flocklab/testmanagement/logrotate/status /home/flocklab/testmanagement/logrotate/flocklab
1 0 1 * * /home/flocklab/flocklab_bin/testmanagementserver/mmc_check/flocklab_mmccheck.py --debug >> /dev/null 2>&1
Metadata-Version: 1.0
Name: FlockLab Powerprofiling Resultfetcher
Version: 2.0
Summary: Converts powerprofiling results for FlockLab and writes a CSV file out of them.
Home-page: UNKNOWN
Author: Christoph Walser, ETH Zurich
Author-email: walserc@tik.ee.ethz.ch
License: GPL
Description: UNKNOWN
Platform: Linux Ubuntu
......@@ -176,7 +176,9 @@ def main(argv):
testresultsdir = "%s/%d" %(config.get('fetcher', 'testresults_dir'), testid)
if ((not os.path.exists(testresultsdir)) or (not os.path.isdir(testresultsdir))):
msg = "The path %s does either not exist or is not a directory. Aborting..."%(testresultsdir)
flocklab.error_logandexit(msg, errno.EINVAL, name, logger, config)
#flocklab.error_logandexit(msg, errno.EINVAL, name, logger, config)
# don't log this message, just exit
sys.exit(SUCCESS) # nothing to be done
else:
logger.debug("Directory %s is already existing."%(testresultsdir))
# sort tar file, powerprofiling at the end
......
......@@ -108,9 +108,9 @@ class StopTestThread(threading.Thread):
logger.error(msg)
else:
msg = "Test-stop script on observer ID %s failed with error code %s and error message %s" %(str(self._obsdict_key[self._obskey][1]), str(errno.errorcode[rs]), str(out))
errors.append((msg, rs, self._obsdict_key[self._obskey][1]))
logger.error(msg)
logger.error("Tried to execute %s"%str(cmd))
#errors.append((msg, rs, self._obsdict_key[self._obskey][1]))
#logger.error(msg)
#logger.error("Tried to execute %s"%str(cmd))
except Error:
# Main thread requested abort.
# Close a possibly still running subprocess:
......@@ -155,7 +155,7 @@ class StartTestThread(threading.Thread):
try:
logger.debug("Start StartTestThread for observer ID %d, FlockDAQ=%s" % (self._obsdict_key[self._obskey][1], str(self._FlockDAQ)))
# First test if the observer is online and if the SD card is mounted:
cmd = ['ssh', '-qq', 'root@%s'%(self._obsdict_key[self._obskey][2]), "ls mmc/ && mkdir %s" % testconfigfolder]
cmd = ['ssh', '-qq', 'root@%s'%(self._obsdict_key[self._obskey][2]), "ls ~/mmc/ && mkdir %s" % testconfigfolder]
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
while p.returncode == None:
self._abortEvent.wait(1.0)
......
......@@ -177,6 +177,7 @@ def main(argv):
threadlist = []
searchtime = None
maxretries = None
force = False
# Set timezone to UTC:
os.environ['TZ'] = 'UTC'
......@@ -187,7 +188,7 @@ def main(argv):
# Get command line parameters.
try:
opts, args = getopt.getopt(argv, "hvds:m:", ["help", "version", "debug", "searchtime=", "maxretries="])
opts, args = getopt.getopt(argv, "hvds:m:", ["help", "version", "debug", "searchtime=", "maxretries=", "force"])
except getopt.GetoptError, err:
print str(err)
logger.warn(str(err))
......@@ -214,6 +215,8 @@ def main(argv):
logger.warn("Wrong API usage: %s" %str(arg))
usage()
sys.exit(errno.EINVAL)
elif opt in ("-f", "--force"):
force = True
elif opt in ("-m", "--maxretries"):
try:
maxretries = int(arg)
......@@ -241,7 +244,8 @@ def main(argv):
except:
logger.error("Could not connect to database")
raise
if flocklab.is_test_running(cur):
if flocklab.is_test_running(cur) and not force:
print "test is running!";
logger.debug("A test is running, thus exit...")
cur.close()
cn.close()
......
......@@ -11,6 +11,7 @@
?>
<?php
require_once('include/config.php');
require_once('include/logging.php');
/*
##############################################################################
......@@ -727,13 +728,13 @@ function resource_multiplexer($duration, $targetnodes, $xmlconfig) {
foreach($targetnodes as $tn) {
if (! in_array($tn['obsid'], $ignoreObs)) {
// NOTE: for now, just reserve mux for whole duration of test, until a single observer can properly handle parallel tests
// if ($duration > ($CONFIG['tests']['guard_starttime'] + $CONFIG['tests']['guard_stoptime']) * 60) {
// array_push($resources, Array('time_start'=>0, 'time_end'=>($CONFIG['tests']['setuptime'] + $CONFIG['tests']['guard_starttime'])*60, 'obsid'=>$tn['obsid'], 'restype'=>'mux'));
// array_push($resources, Array('time_start'=>($CONFIG['tests']['setuptime'] - $CONFIG['tests']['guard_stoptime']) * 60 + $duration, 'time_end'=>$duration + ($CONFIG['tests']['setuptime'] + $CONFIG['tests']['cleanuptime'])*60, 'obsid'=>$tn['obsid'], 'restype'=>'mux'));
// }
// else {
if ($duration > ($CONFIG['tests']['guard_starttime'] + $CONFIG['tests']['guard_stoptime']) * 60) {
array_push($resources, Array('time_start'=>0, 'time_end'=>($CONFIG['tests']['setuptime'] + $CONFIG['tests']['guard_starttime'])*60, 'obsid'=>$tn['obsid'], 'restype'=>'mux'));
array_push($resources, Array('time_start'=>($CONFIG['tests']['setuptime'] - $CONFIG['tests']['guard_stoptime']) * 60 + $duration, 'time_end'=>$duration + ($CONFIG['tests']['setuptime'] + $CONFIG['tests']['cleanuptime'])*60, 'obsid'=>$tn['obsid'], 'restype'=>'mux'));
}
else {
array_push($resources, Array('time_start'=>0, 'time_end'=>$duration + ($CONFIG['tests']['setuptime'] + $CONFIG['tests']['cleanuptime'])*60, 'obsid'=>$tn['obsid'], 'restype'=>'mux'));
// }
}
}
}
return $resources;
......@@ -787,8 +788,8 @@ function schedule_test($testconfig, $resources, $exclude_test = NULL) {
global $CONFIG;
$db = db_connect();
$guard_setup_min = $CONFIG['tests']['setuptime'];
$allow_parallel_tests = $CONFIG['tests']['allowparalleltests'];
$guard_cleanup_min = $CONFIG['tests']['cleanuptime'];
$allow_parallel_tests = $CONFIG['tests']['allowparalleltests']; # added by rdaforno
$isAsap = isset($testconfig->generalConf->scheduleAsap);
$now = new DateTime ();
$now->setTimeZone(new DateTimeZone("UTC"));
......@@ -868,7 +869,7 @@ function schedule_test($testconfig, $resources, $exclude_test = NULL) {
}
} else {
# for every ret, check for collisions
if (isset($resourcesdict[$row['observer_fk']]) && isset($resourcesdict[$row['observer_fk']][$row['resource_type']]))
if (isset($resourcesdict[$row['observer_fk']]) && isset($resourcesdict[$row['observer_fk']][$row['resource_type']])) {
foreach($resourcesdict[$row['observer_fk']][$row['resource_type']] as $r) {
// echo "<!--";print_r($row);echo "-->";
if($row['utime_start'] <= $r['time_end'] + $testShift and $row['utime_end'] >= $r['time_start'] + $testShift) {
......@@ -881,6 +882,7 @@ function schedule_test($testconfig, $resources, $exclude_test = NULL) {
}
}
}
}
}
}
}
......@@ -1066,6 +1068,7 @@ function update_add_test($xml_config, &$errors, $existing_test_id = NULL, $abort
# 1c. multiplexer
$resources = array_merge($resources, resource_multiplexer($duration,$targetnodes, $testconfig));
}
flocklab_log('Try to schedule test. Needed resources are: '. print_r($resources, $return = True));
# fetch observer keys
$db = db_connect();
$obskeys=Array();
......@@ -1178,6 +1181,7 @@ function update_add_test($xml_config, &$errors, $existing_test_id = NULL, $abort
}
}
release_db_lock('resource_allocation');
flocklab_log('Schedule for test id '.$testId.' is: '. print_r($r, $return = True));
$time_elapsed_secs = microtime(true) - $locktime;
echo "<!-- db lock time was ".$time_elapsed_secs." s -->";
// Ask the FlockLab scheduler to check for work:
......
......@@ -11,7 +11,7 @@
?>
<?php
require_once('include/libflocklab.php'); include_once('include/auth.php');
debug();
//debug();
// Set timezone to UTC:
date_default_timezone_set('UTC');
......
<HTML>
<BODY>
<H2>FlockLab is currently down for maintenance. <A HREF="https://groups.google.com/d/topic/flocklab-users/udzs2OHNIH0/discussion">More information here</A></H2>
<H2>FlockLab is currently down for maintenance.</H2>
</BODY>
</HTML>
......@@ -3,10 +3,10 @@
* __author__ = "Christoph Walser <walser@tik.ee.ethz.ch>"
* __copyright__ = "Copyright 2010, ETH Zurich, Switzerland, Christoph Walser"
* __license__ = "GPL"
* __version__ = "$Revision$"
* __date__ = "$Date$"
* __id__ = "$Id$"
* __source__ = "$URL$"
* __version__ = "$Revision: 2888 $"
* __date__ = "$Date: 2014-08-22 10:01:11 +0200 (Fri, 22 Aug 2014) $"
* __id__ = "$Id: index.php.normal 2888 2014-08-22 08:01:11Z rlim $"
* __source__ = "$URL: svn://svn.ee.ethz.ch/flocklab/trunk/server/webserver/user/index.php.normal $"
*/
?>
<?php require_once('include/layout.php');require_once('include/presets.php'); ?>
......@@ -147,6 +147,7 @@
});
</script>
<?php
//echo '<br />Notice: Due to maintenance work in our building, some of the observers will be sporadically unavailable from ... to ... .<br /><br />';
echo '<h1>Manage Tests for '.$_SESSION['firstname'] . ' ' . $_SESSION['lastname']. '</h1>';
/* Get all test of the current user from the database and display them in the table. */
$db = db_connect();
......
[general]
last_update = 1524513066
paper_citations =
[users]
registered = 274
active = 126
num_countries = 28
country = "a:12:{s:11:'Switzerland';i:78;s:7:'Germany';i:39;s:13:'United States';i:39;s:6:'others';i:27;s:5:'China';i:21;s:6:'Sweden';i:17;s:5:'India';i:16;s:9:'Singapore';i:9;s:14:'United Kingdom';i:9;s:7:'Ireland';i:7;s:25:'Iran, Islamic Republic Of';i:6;s:6:'Brazil';i:6;}"
num_institutions = 115
institution = "a:9:{s:6:'others';i:132;s:10:'ETH Zurich';i:71;s:39:'Purdue University at Indianapolis IUPUI';i:27;s:12:'TU Darmstadt';i:12;s:10:'TU Dresden';i:11;s:33:'Chalmers University of Technology';i:7;s:32:'Nanyang Technological University';i:6;s:28:'Cork Institute of Technology';i:4;s:32:'National University of Singapore';i:4;}"
users_per_year = "a:7:{i:2012;s:1:'6';i:2013;s:2:'19';i:2014;s:2:'55';i:2015;s:2:'65';i:2016;s:2:'65';i:2017;s:2:'78';i:2018;s:2:'42';}"
[tests]
num_tests = 44268
tests_per_year = "a:7:{i:2012;s:3:'156';i:2013;s:4:'4020';i:2014;s:4:'6714';i:2015;s:4:'8525';i:2016;s:4:'8863';i:2017;s:5:'12116';i:2018;s:4:'3874';}"
tests_per_mote = "a:10:{s:5:'Tmote';i:31040;s:5:'CC430';i:3875;s:4:'ACM2';i:2381;s:3:'dpp';i:2276;s:4:'Opal';i:1967;s:8:'TinyNode';i:1498;s:8:'OpenMote';i:511;s:7:'Wismote';i:291;s:5:'Mica2';i:191;s:4:'Iris';i:179;}"
avg_setup_time = 93
avg_cleanup_time = 86
avg_runtime = 1286
runtime_cdf = "a:20:{i:3;d:15;i:6;d:31;i:9;d:46;i:12;d:61;i:15;d:65;i:19;d:69;i:22;d:74;i:25;d:76;i:28;d:77;i:31;d:77;i:34;d:85;i:37;d:86;i:40;d:86;i:43;d:87;i:46;d:87;i:49;d:88;i:52;d:88;i:56;d:88;i:59;d:88;i:62;d:94;}"
utilization_per_year = "a:7:{i:2012;d:4;i:2013;d:24;i:2014;d:41;i:2015;d:45;i:2016;d:45;i:2017;d:57;i:2018;d:61;}"
utilization_per_week = "a:57:{s:12:'2017 week 13';d:13;s:12:'2017 week 14';d:82;s:12:'2017 week 15';d:39;s:12:'2017 week 16';d:41;s:12:'2017 week 17';d:24;s:12:'2017 week 18';d:38;s:12:'2017 week 19';d:51;s:12:'2017 week 20';d:37;s:12:'2017 week 21';d:51;s:12:'2017 week 22';d:64;s:12:'2017 week 23';d:88;s:12:'2017 week 24';d:85;s:12:'2017 week 25';d:90;s:12:'2017 week 26';d:53;s:12:'2017 week 27';d:32;s:12:'2017 week 28';d:74;s:12:'2017 week 29';d:70;s:12:'2017 week 30';d:50;s:12:'2017 week 31';d:71;s:12:'2017 week 32';d:52;s:12:'2017 week 33';d:53;s:12:'2017 week 34';d:86;s:12:'2017 week 35';d:80;s:12:'2017 week 36';d:76;s:12:'2017 week 37';d:101;s:12:'2017 week 38';d:107;s:12:'2017 week 39';d:66;s:12:'2017 week 40';d:41;s:12:'2017 week 41';d:23;s:12:'2017 week 42';d:30;s:12:'2017 week 43';d:29;s:12:'2017 week 44';d:30;s:12:'2017 week 45';d:37;s:12:'2017 week 46';d:39;s:12:'2017 week 47';d:53;s:12:'2017 week 48';d:49;s:12:'2017 week 49';d:82;s:12:'2017 week 50';d:101;s:12:'2017 week 51';d:45;s:12:'2017 week 52';d:49;s:11:'2018 week 1';d:41;s:11:'2018 week 2';d:36;s:11:'2018 week 3';d:37;s:11:'2018 week 4';d:38;s:11:'2018 week 5';d:44;s:11:'2018 week 6';d:38;s:11:'2018 week 7';d:67;s:11:'2018 week 8';d:78;s:11:'2018 week 9';d:92;s:12:'2018 week 10';d:93;s:12:'2018 week 11';d:80;s:12:'2018 week 12';d:91;s:12:'2018 week 13';d:61;s:12:'2018 week 14';d:72;s:12:'2018 week 15';d:46;s:12:'2018 week 16';d:47;s:12:'2018 week 17';d:7;}"
[motes]
tmote_tests = 31040
tmote_per_year = "a:7:{i:2012;d:85;i:2013;d:63;i:2014;d:61;i:2015;d:61;i:2016;d:70;i:2017;d:79;i:2018;d:86;}"
tmoteusers_per_year = "a:7:{i:2012;d:67;i:2013;d:89;i:2014;d:96;i:2015;d:95;i:2016;d:98;i:2017;d:90;i:2018;d:95;}"
cc430_tests = 3875
cc430_per_year = "a:7:{i:2012;i:0;i:2013;i:0;i:2014;d:17;i:2015;d:11;i:2016;d:15;i:2017;d:4;i:2018;d:2;}"
cc430users_per_year = "a:7:{i:2012;i:0;i:2013;i:0;i:2014;d:11;i:2015;d:8;i:2016;d:11;i:2017;d:14;i:2018;d:19;}"
opal_tests = 1967
opal_per_year = "a:7:{i:2012;i:0;i:2013;d:9;i:2014;d:6;i:2015;d:4;i:2016;d:4;i:2017;d:3;i:2018;d:3;}"
opalusers_per_year = "a:7:{i:2012;i:0;i:2013;d:16;i:2014;d:4;i:2015;d:2;i:2016;d:3;i:2017;d:1;i:2018;d:2;}"
tinynode_tests = 1498
tinynode_per_year = "a:7:{i:2012;d:13;i:2013;d:13;i:2014;d:3;i:2015;d:2;i:2016;d:2;i:2017;d:2;i:2018;d:5;}"
tinynodeusers_per_year = "a:7:{i:2012;i:0;i:2013;i:0;i:2014;i:0;i:2015;i:0;i:2016;i:0;i:2017;i:0;i:2018;i:0;}"
openmote_tests = 511
openmote_per_year = "a:7:{i:2012;i:0;i:2013;i:0;i:2014;i:0;i:2015;d:4;i:2016;d:0;i:2017;d:2;i:2018;i:0;}"
openmoteusers_per_year = "a:7:{i:2012;i:0;i:2013;i:0;i:2014;i:0;i:2015;d:8;i:2016;d:2;i:2017;d:4;i:2018;i:0;}"
dpp_tests = 2276
dpp_per_year = "a:7:{i:2012;i:0;i:2013;i:0;i:2014;i:0;i:2015;i:0;i:2016;d:8;i:2017;d:12;i:2018;d:4;}"
dppusers_per_year = "a:7:{i:2012;i:0;i:2013;i:0;i:2014;i:0;i:2015;i:0;i:2016;d:8;i:2017;d:10;i:2018;d:7;}"
[services]
serial_tests = 43323
serial_per_year = "a:7:{i:2012;d:63;i:2013;d:98;i:2014;d:93;i:2015;d:98;i:2016;d:99;i:2017;d:99;i:2018;d:99;}"
serialusers_per_year = "a:7:{i:2012;d:100;i:2013;d:100;i:2014;d:98;i:2015;d:98;i:2016;d:100;i:2017;d:99;i:2018;d:98;}"
gpiotracing_tests = 19422
gpiotracing_per_year = "a:7:{i:2012;d:80;i:2013;d:33;i:2014;d:43;i:2015;d:35;i:2016;d:45;i:2017;d:42;i:2018;d:76;}"
gpiotracingusers_per_year = "a:7:{i:2012;d:50;i:2013;d:74;i:2014;d:62;i:2015;d:52;i:2016;d:49;i:2017;d:67;i:2018;d:64;}"
gpioactuation_tests = 12403
gpioactuation_per_year = "a:7:{i:2012;d:1;i:2013;d:27;i:2014;d:21;i:2015;d:37;i:2016;d:19;i:2017;d:31;i:2018;d:34;}"
gpioactuationusers_per_year = "a:7:{i:2012;d:33;i:2013;d:37;i:2014;d:20;i:2015;d:22;i:2016;d:20;i:2017;d:35;i:2018;d:38;}"
powerprof_tests = 12968
powerprof_per_year = "a:7:{i:2012;d:24;i:2013;d:8;i:2014;d:24;i:2015;d:30;i:2016;d:21;i:2017;d:32;i:2018;d:68;}"
powerprofusers_per_year = "a:7:{i:2012;d:33;i:2013;d:42;i:2014;d:62;i:2015;d:52;i:2016;d:38;i:2017;d:58;i:2018;d:57;}"
......@@ -19,7 +19,7 @@
// autorefresh stats after a certain amount of time
include('update_stats.php');
if (!file_exists($statsfilename) || (time() - $stats['last_update']) > (3600*24*30)) { // update once a month
if (!file_exists($statsfilename) || (time() - $stats['last_update']) > (3600*24*14)) { // update once a fortnight
collect_stats($statsfilename);
}
......
......@@ -341,7 +341,7 @@
<xs:simpleType name="obsIdType">
<xs:restriction base="xs:integer">
<xs:pattern value="001|002|003|004|006|007|008|010|011|013|014|015|016|017|018|019|020|022|023|024|025|026|027|028|029|031|032|033|200|201|202|204"/>
<xs:pattern value="001|002|003|004|006|007|008|010|011|013|014|015|016|017|018|019|020|022|023|024|025|026|027|028|031|032|033|200|201|202|204"/>
</xs:restriction>
</xs:simpleType>
......
......@@ -24,7 +24,7 @@
<relativeTime>
<offsetSecs>0</offsetSecs>
</relativeTime>
<samplingDivider>288</samplingDivider>
<samplingDivider>128</samplingDivider>
</profConf>
</powerProfilingConf>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment