Commit 43ec5e04 authored by Dan Reading's avatar Dan Reading
Browse files

more work for saving testbed formated info

parent 8ccd40db
......@@ -50,17 +50,20 @@ if (!$ARGV[0]) {
# truncate file at boot time
if ($action eq "boot") {
system("echo 'Start boot_time_node_check' > /var/emulab/logs/nodecheck.log");
system("cp /dev/null /var/emulab/logs/nodecheck.log.tb");
}
foreach my $i (@checkscripts) {
system("bash /usr/local/etc/emulab/${i}check /var/emulab/logs/nodecheck.log");
}
if ($action eq "boot") {
system("echo '-- Finish boot_time_node_check --' >> /var/emulab/logs/nodecheck.log");
if ( -e "/var/emulab/logs/nodecheck.log.tb" ) {
system("cp /var/emulab/logs/nodecheck.log.tb /proj/emulab-ops/nodecheck/$host");
}
system("echo 'Start boot_time_node_check' > /var/emulab/logs/nodecheck.log");
system("cp /dev/null /tmp/nodecheck.log.tb");
foreach my $i (@checkscripts) {
system("bash /usr/local/etc/emulab/${i}check /var/emulab/logs/nodecheck.log");
}
system("echo '-- Finish boot_time_node_check --' >> /var/emulab/logs/nodecheck.log");
if ( -e "/tmp/nodecheck.log.tb" ) {
system("cp /tmp/nodecheck.log.tb /proj/emulab-ops/nodecheck/$host");
}
} else {
system("rm -f /tmp/nodecheck.log.tb");
foreach my $i (@checkscripts) {
system("bash /usr/local/etc/emulab/${i}check /var/emulab/logs/nodecheck.log");
}
}
system("echo 'Done with nodechecks'");
......
......@@ -29,18 +29,21 @@ echo "Running nodechecks"
# truncate file at boot time
if [ "$1" = "boot" ] ; then
$(echo "-- Start boot_time_node_check --" > /var/emulab/logs/nodecheck.log)
$(cp /dev/null /var/emulab/logs/nodecheck.log.tb)
fi
for i in $checks
do
/usr/local/bin/bash /usr/local/etc/emulab/${i}check /var/emulab/logs/nodecheck.log /var/emulab/logs/nodecheck.log.tb
done
if [ "$1" = "boot" ] ; then
$(cp /dev/null /tmp/nodecheck.log.tb)
for i in $checks
do
/usr/local/bin/bash /usr/local/etc/emulab/${i}check /var/emulab/logs/nodecheck.log /tmp/nodecheck.log.tb
done
$(echo "-- Finish boot_time_node_check --" >> /var/emulab/logs/nodecheck.log)
if [ -e /var/emulab/logs/nodecheck.log.tb ] ; then
cp /var/emulab/logs/nodecheck.log.tb /proj/emulab-ops/nodecheck/$host
if [ -e /tmp/nodecheck.log.tb ] ; then
cp /tmp/nodecheck.log.tb /proj/emulab-ops/nodecheck/$host
fi
else
$(rm -f /tmp/nodecheck.log.tb)
for i in $checks
do
/usr/local/bin/bash /usr/local/etc/emulab/${i}check /var/emulab/logs/nodecheck.log
done
fi
echo "Done with nodechecks"
......
Supports Markdown
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