Commit 846badf8 authored by Kevin Atkinson's avatar Kevin Atkinson

*** empty log message ***

parent 096f72d5
......@@ -54,7 +54,8 @@ LIB_STUFF = libtbsetup.pm exitonwarn.pm libtestbed.pm snmpit_intel.pm \
snmpit_foundry.pm snmpit_stack.pm snmpit_remote.pm \
snmpit_nortel.pm \
libaudit.pm libreboot.pm libosload.pm libtestbed.py \
power_mail.pm power_whol.pm
power_mail.pm power_whol.pm \
libtblog.pm
#
# Force dependencies on the scripts so that they will be rerun through
......
......@@ -112,6 +112,7 @@ use libdb;
use libtestbed;
use Node;
use libadminctrl;
use libtblog;
#
# assign_wrapper Settings
......@@ -189,8 +190,7 @@ sub fatal ($)
{
my($message) = @_;
print STDERR "*** $0:\n".
" $message\n";
tberror $message;
# We next go to the END block below.
exit($WRAPPER_FAILED);
......@@ -211,8 +211,7 @@ END {
}
if ($warnings > 0) {
print STDERR "*** $0:\n".
" $warnings warnings.\n";
tbwarn "$warnings.\n";
$exitcode |= $WRAPPER_FAILED;
}
......@@ -889,8 +888,7 @@ sub RunAssign ()
#
POSIX::setsid();
exec("nice $cmd $cmdargs > assign.log");
die("*** $0:\n".
" Could not start assign!\n");
die "Could not start assign!\n";
}
# Check cancel flag before continuing.
......@@ -4260,18 +4258,16 @@ sub CreateTopFile()
# If the user had explicitly asked for these, we
# print a warning
if (virtlanemulated($lan)) {
print STDERR "*** WARNING: $0: ".
"tb-set-multiplexed not supported on ".
"$lan since one of the nodes in $lan is ".
"not running the standard FreeBSD image ".
"(FBSD-STD)\n";
tbwarn "tb-set-multiplexed not supported on ".
"$lan since one of the nodes in $lan is ".
"not running the standard FreeBSD image ".
"(FBSD-STD)";
}
if (virtlanuseveth($lan)) {
print STDERR "*** WARNING: $0: ".
"tb-set-useveth not supported on ".
"$lan since one of the nodes in $lan is ".
"not running the standard FreeBSD image ".
"(FBSD-STD)\n";
tbwarn "tb-set-useveth not supported on ".
"$lan since one of the nodes in $lan is ".
"not running the standard FreeBSD image ".
"(FBSD-STD)";
}
$emulated = 0;
$virt_lans{$lan}->{"EMULATED"} = 0;
......
......@@ -82,6 +82,7 @@ my $CONTROL = "@USERNODE@";
use lib "@prefix@/lib";
use libdb;
use libtestbed;
use libtblog;
my $parser = "$TB/libexec/parse-ns";
my $mkexpdir = "$TB/libexec/mkexpdir";
......@@ -367,6 +368,11 @@ if (! DBQueryWarn("unlock tables")) {
#
$justexit = 0;
#
# Set error reporting info
#
tblog_set_info($pid,$eid,$UID);
#
# Create a directory structure for the experiment.
#
......@@ -1017,6 +1023,8 @@ END {
}
my $saved_exitcode = $?;
tblog_find_error() if $?;
if ($cleaning) {
#
# We are screwed; a recursive error. Someone will have to clean
......
......@@ -62,6 +62,7 @@ if ($EUID != 0) {
use lib "@prefix@/lib";
use libdb;
use libtestbed;
use libtblog;
#
# Turn off line buffering on output
......
This diff is collapsed.
-- MYSQL TABLES used for logging subsystem
CREATE TABLE log (
seq int unsigned NOT NULL auto_increment,
stamp int unsigned NOT NULL,
pidx int NOT NULL, -- unique project id
uid int default NULL, -- numeric user id
session int unsigned NOT NULL, -- session id (1)
invocation int unsigned NOT NULL, -- invocation id - unique id for a
-- particular execution of a script (1)
parent int unsigned NOT NULL, -- invocation id of the parent script
script smallint(3) NOT NULL, -- numeric id for the script name
level smallint(2) NOT NULL , -- depth of the script in the call chain
priority smallint(3) NOT NULL, -- syslog priority
inferred tinyint(1) NOT NULL, -- 0 - log created with tblog
-- 1 - log created by catching a die or warn
-- 2 - log created with a normal print and
-- given the non-default priority
-- 3 - log created with a normal print and
-- given the default priority
cause varchar(32) NOT NULL, -- string identifying the "cause" of the error
type enum('normal','entering','exiting','thecause')
NOT NULL default 'normal',-- type of error:
-- normal: normal error generated by tblog
-- entering: auto gen when a script starts
-- exiting: auto gen when a script exists (2)
-- thecause: created by tblog_find_error
relevant tinyint(1) NOT NULL, -- if the error was considered relevent
-- by tblog_find_error
mesg text NOT NULL, -- the text of the message
PRIMARY KEY (seq),
KEY (session)
);
-- (1) These ids are equal to the sequence number of the "entering" log
-- message
-- (2) Due to a number of factors every "exiting" message in not
-- garanteed to have a 1-1 relation with the "entering" message.
-- The two major ones are
-- (1) A Fork not followed by a "exec" will most likely to cause
-- multiple exiting messages. (2) If "exec" is used the script
-- will not have an exiting message.
-- NOTE: It may be beneficial to split this table into three:
-- session pidx uid
-- invocation session parent script level
-- seq stamp [session] invocation priority inferred cause type relevant mesg
-- ...
CREATE TABLE scripts (
script smallint(3) NOT NULL auto_increment,
name varchar(24) NOT NULL default '',
PRIMARY KEY (script),
UNIQUE KEY id (name)
);
CREATE TABLE priorities (
priority smallint(3) NOT NULL,
name varchar(8) NOT NULL,
primary key (priority),
unique key (name)
);
insert into priorities values (000, 'EMERG');
insert into priorities values (100, 'ALERT');
insert into priorities values (200, 'CRIT');
insert into priorities values (300, 'ERR');
insert into priorities values (400, 'WARNING');
insert into priorities values (500, 'NOTICE');
insert into priorities values (600, 'INFO');
insert into priorities values (700, 'DEBUG');
......@@ -59,6 +59,7 @@ use libdb;
use libreboot;
use libosload;
use libtestbed;
use libtblog;
TBDebugTimeStampsOn();
......
......@@ -24,6 +24,7 @@ use lib '@prefix@/lib';
use libdb;
use snmpit_lib;
use libtblog;
use English;
use Getopt::Long;
......
......@@ -66,6 +66,9 @@ my $TBROOT = "@prefix@";
use lib '@prefix@/lib';
require exitonwarn;
use libdb;
use libtblog;
tblog_stop_capture('stdout');
my $TRACK_INTERSWITCH_BANDWIDTH = "@TRACK_INTERSWITCH_BANDWIDTH@";
......
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