Commit b3f4e8bd authored by Kevin Atkinson's avatar Kevin Atkinson

Fix dumperrorlog so it can run on other sites. The ops errorlog

database is only used for Utah's emulab.  In the process many other
changes where made to dumperrorlog to fix bugs and make it more
correct/robust.  I also avoided the need to explicitly lock any tables.
parent 71fe299d
......@@ -1452,6 +1452,7 @@ done
#
......@@ -1486,6 +1487,7 @@ done
#
# Defaults for for above variables.
#
TBERRORLOGDBNAME="errorlog"
TBADMINGROUP="flux"
CLIENT_ETCDIR="/etc/emulab"
CLIENT_BINDIR="/usr/local/etc/emulab"
......@@ -1602,6 +1604,10 @@ cat >> confdefs.h <<EOF
#define TBDBNAME "$TBDBNAME"
EOF
cat >> confdefs.h <<EOF
#define TBERRORLOGDBNAME "$TBERRORLOGDBNAME"
EOF
cat >> confdefs.h <<EOF
#define TBADMINGROUP "$TBADMINGROUP"
EOF
......@@ -2128,17 +2134,17 @@ for ac_hdr in ulxmlrpcpp/ulxr_config.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2132: checking for $ac_hdr" >&5
echo "configure:2138: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2137 "configure"
#line 2143 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2177,17 +2183,17 @@ for ac_hdr in linux/videodev.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2181: checking for $ac_hdr" >&5
echo "configure:2187: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2186 "configure"
#line 2192 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2220,7 +2226,7 @@ done
# Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2224: checking for $ac_word" >&5
echo "configure:2230: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -2299,7 +2305,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:2303: checking for a BSD compatible install" >&5
echo "configure:2309: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -2360,7 +2366,7 @@ esac
# Extract the first word of "rsync", so it can be a program name with args.
set dummy rsync; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2364: checking for $ac_word" >&5
echo "configure:2370: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RSYNC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -2767,6 +2773,7 @@ s%@SUDO@%$SUDO%g
s%@SSH@%$SSH%g
s%@optional_subdirs@%$optional_subdirs%g
s%@TBDBNAME@%$TBDBNAME%g
s%@TBERRORLOGDBNAME@%$TBERRORLOGDBNAME%g
s%@TBADMINGROUP@%$TBADMINGROUP%g
s%@DELAYCAPACITY@%$DELAYCAPACITY%g
s%@IPBASE@%$IPBASE%g
......
......@@ -102,6 +102,7 @@ AC_SUBST(optional_subdirs)
# to appear in config.h.
#
AC_SUBST(TBDBNAME)
AC_SUBST(TBERRORLOGDBNAME)
AC_SUBST(TBADMINGROUP)
AC_SUBST(DELAYCAPACITY)
AC_SUBST(IPBASE)
......@@ -239,6 +240,7 @@ AC_SUBST(TBERRORSEMAIL_NOSLASH)
#
# Defaults for for above variables.
#
TBERRORLOGDBNAME="errorlog"
TBADMINGROUP="flux"
CLIENT_ETCDIR="/etc/emulab"
CLIENT_BINDIR="/usr/local/etc/emulab"
......@@ -342,6 +344,7 @@ else
AC_DEFINE_UNQUOTED(TBROOT, "$prefix")
fi
AC_DEFINE_UNQUOTED(TBDBNAME, "$TBDBNAME")
AC_DEFINE_UNQUOTED(TBERRORLOGDBNAME, "$TBERRORLOGDBNAME")
AC_DEFINE_UNQUOTED(TBADMINGROUP, "$TBADMINGROUP")
AC_DEFINE_UNQUOTED(IPBASE, "$IPBASE")
AC_DEFINE_UNQUOTED(JAILIPBASE, "$JAILIPBASE")
......
......@@ -27,13 +27,14 @@ my $max_rows = 300000;
#
# Configure variables
#
my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@";
my $ISMAINSITE = @TBMAINSITE@;
my $USERNODE = "@USERNODE@";
my $PROXY = "$TB/sbin/dumperrorlog.proxy";
my $SCP = "/usr/bin/scp";
my $SSHTB = "$TB/bin/sshtb";
my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@";
my $ISUTAHEMULAB = "@OURDOMAIN@" eq 'emulab.net';
my $USERNODE = "@USERNODE@";
my $PROXY = "$TB/sbin/dumperrorlog.proxy";
my $SCP = "/usr/bin/scp";
my $SSHTB = "$TB/bin/sshtb";
my $ERRORLOGDB = "@TBERRORLOGDBNAME@";
# un-taint path
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin:/usr/site/bin';
......@@ -106,18 +107,13 @@ if (! $debug) {
my $query_result =
DBQueryFatal("select idx from emulab_indicies ".
"where name='lastlog_seqnum'");
my ($lastseq) = $query_result->fetchrow_array();
if (!defined($lastseq)) {
my ($minseq) = $query_result->fetchrow_array();
if (!defined($minseq)) {
DBQueryFatal("insert into emulab_indicies (name, idx) ".
"values ('lastlog_seqnum', 0)");
$lastseq = 0;
$minseq = 0;
}
#
# Limit number of rows to keep from locking the log table too long
#
my $maxseq = $lastseq + $max_rows;
#
# And the last experiment index we sent over.
#
......@@ -149,25 +145,30 @@ if (!defined($NOTICE)) {
fatal("No priority named 'NOTICE' in the priorities table!");
}
print "Copying log entries ($lastseq,$maxseq]\n";
#
# Now get the largest log index to copy
#
$query_result =
DBQueryFatal("select MAX(seq) from log ".
"where seq > $minseq " .
" and seq <= $minseq + $max_rows ");
my $maxseq = $query_result->fetchrow_array();
$maxseq = $minseq unless defined $maxseq;
print "Copying log entries ($minseq,$maxseq]\n";
print "Exptidx ($exptidx_min, $exptidx_max]\n";
#
# Only the main site does this archiving stuff.
#
if ($ISMAINSITE) {
#
# Must lock the table of course
#
DBQueryFatal("lock tables log write");
# Might not be any new entries ...
#
if ($minseq != $maxseq) {
#
# Backup old outfile
#
if (-e "${tempfile}.log") {
unlink("${tempfile}.log.save")
if (-e "${tempfile}.log.save");
system("/bin/mv -f ${tempfile}.log ${tempfile}.log.save");
}
......@@ -175,35 +176,16 @@ if ($ISMAINSITE) {
# Grab all of the new entries and store to the file
#
DBQueryFatal("select * from log ".
"where seq > $lastseq " .
"where seq > $minseq " .
"and seq <= $maxseq " .
"into outfile '${tempfile}.log' ");
#
# Now we need to find out what the last index really was.
#
my $firstseq = $lastseq;
$query_result =
DBQueryFatal("select seq from log ".
"where seq > $lastseq " .
" and seq <= $maxseq ".
"order by seq desc limit 1");
# Save for later.
($lastseq) = $query_result->fetchrow_array();
DBQueryFatal("unlock tables");
#
# Might not be any new entries ...
#
if (defined($lastseq)) {
system("echo \"load data infile '${tempfile}.log' replace into table log\" ".
" | mysql errorlog");
fatal("Could not load into archive DB!")
if ($?);
system("echo \"load data infile '${tempfile}.log' replace into table log\" ".
" | mysql $ERRORLOGDB");
fatal("Could not load into archive DB!")
if ($?);
#
if ($ISUTAHEMULAB) {
# XXX This awful hack will go away when Kevin is happy with
# the error logging code.
#
......@@ -212,74 +194,77 @@ if ($ISMAINSITE) {
# Copy the file over to ops and load it into the DB over there.
#
system("$SCP -p ${tempfile}.log ".
" ${USERNODE}:/var/db/mysql/errorlog") == 0
or fatal("Could not copy $tempfile to $USERNODE!");
" ${USERNODE}:/var/db/mysql/$ERRORLOGDB") == 0
or fatal("Could not copy $tempfile to $USERNODE!");
system("$SSHTB -host $USERNODE $PROXY log") == 0
or fatal("Could not load log entries into ops DB!");
}
}
#
# Now the other tables Kevin needs
#
foreach my $tablename ("scripts", "priorities", "causes", "session_info",
"errors", "users", "experiments",
"report_error", "report_context",
"report_assign_violation") {
unlink("${tempfile}.${tablename}") if -e "${tempfile}.${tablename}";
if (($tablename eq "errors" ||
$tablename eq "session_info") && !$force) {
DBQueryFatal("select * from $tablename where session>=$firstseq and session<=$lastseq ".
"into outfile '${tempfile}.${tablename}' ");
}
elsif ($tablename eq "report_error" ||
$tablename eq "report_context" ||
$tablename eq "report_assign_violation") {
DBQueryFatal("select * from $tablename where seq>=$firstseq and seq<=$lastseq ".
"into outfile '${tempfile}.${tablename}' ");
}
elsif ($tablename eq "users") {
DBQueryFatal("select uid,unix_uid from $tablename ".
"into outfile '${tempfile}.${tablename}' ");
}
elsif ($tablename eq "experiments") {
next if
($exptidx_max == $exptidx_min);
DBQueryFatal("select exptidx,pid,eid from experiment_stats ".
"where exptidx > $exptidx_min and ".
" exptidx <= $exptidx_max ".
"into outfile '${tempfile}.${tablename}' ");
}
else {
DBQueryFatal("select * from $tablename ".
"into outfile '${tempfile}.${tablename}' ");
}
system("echo \"load data infile '${tempfile}.${tablename}' ".
" replace into table $tablename\" | mysql errorlog");
fatal("Could not load $tablename into archive DB!")
if ($?);
#
# Now the other tables Kevin needs
#
foreach my $tablename ("scripts", "priorities", "causes", "session_info",
"errors", "users", "experiments",
"report_error", "report_context",
"report_assign_violation") {
unlink("${tempfile}.${tablename}") if -e "${tempfile}.${tablename}";
if (($tablename eq "errors" ||
$tablename eq "session_info") && !$force) {
DBQueryFatal("select * from $tablename where session>=$minseq and session<=$maxseq ".
"into outfile '${tempfile}.${tablename}' ");
}
elsif ($tablename eq "report_error" ||
$tablename eq "report_context" ||
$tablename eq "report_assign_violation") {
DBQueryFatal("select * from $tablename where seq>=$minseq and seq<=$maxseq ".
"into outfile '${tempfile}.${tablename}' ");
}
elsif ($tablename eq "users") {
DBQueryFatal("select uid,unix_uid from $tablename ".
"into outfile '${tempfile}.${tablename}' ");
}
elsif ($tablename eq "experiments") {
next if
($exptidx_max == $exptidx_min);
DBQueryFatal("select exptidx,pid,eid from experiment_stats ".
"where exptidx > $exptidx_min and ".
" exptidx <= $exptidx_max ".
"into outfile '${tempfile}.${tablename}' ");
}
else {
DBQueryFatal("select * from $tablename ".
"into outfile '${tempfile}.${tablename}' ");
}
system("echo \"load data infile '${tempfile}.${tablename}' ".
" replace into table $tablename\" | mysql $ERRORLOGDB");
fatal("Could not load $tablename into archive DB!")
if ($?);
if ($ISUTAHEMULAB) {
#
# Copy the file over to ops and load it into the DB over there.
#
system("$SCP -p ${tempfile}.${tablename} ".
" ${USERNODE}:/var/db/mysql/errorlog") == 0
or fatal("Could not copy ${tempfile}.${tablename} to $USERNODE!");
" ${USERNODE}:/var/db/mysql/$ERRORLOGDB") == 0
or fatal("Could not copy ${tempfile}.${tablename} to $USERNODE!");
system("$SSHTB -host $USERNODE $PROXY $tablename") == 0
or fatal("Could not load $tablename entries into ops DB!");
unlink("${tempfile}.${tablename}");
}
}
# Okay, now that we have really archived them away, update the
# seq number.
DBQueryFatal("update emulab_indicies set idx='$lastseq' ".
DBQueryFatal("update emulab_indicies set idx='$maxseq' ".
"where name='lastlog_seqnum'");
# Okay, now that we have really sent over the experiment_stats stuff.
......@@ -320,3 +305,4 @@ sub fatal($)
die("*** $0:\n".
" $msg\n");
}
......@@ -6,6 +6,7 @@
# If you add a variable, be sure to go and update configure.in.
#
TBDBNAME=tbdb
TBERRORLOGDBNAME=errorlog
TBADMINGROUP=flux
TBOPSEMAIL=testbed-ops@flux.utah.edu
TBLOGSEMAIL=testbed-logs@flux.utah.edu
......
......@@ -18,6 +18,27 @@ Note that some instructions may have steps that need to occur at a few
different points in the install process - these are marked with the
earliest time one of the steps needs to occur.
20080905: After install
In order to reduce the size of the main database data in the
"log" table is now moved to the errorlog database and old
entries are removed.
First off create the errorlog database:
mysqladmin create errorlog
mysql errorlog < sql/database-create-errorlog.sql
Than install a crontab entry to run dumperrorlog every hour
by adding the following line to /etc/crontab, be sure to
preserve the embedded tabs:
12 * * * * root /usr/testbed/sbin/dumperrorlog
dumperrorlog will only move 300,000 rows at a time in order
to avoid locking the log table for too long. Thus it will
take a while for it to get caught up.
20080805: Optional, After install.
As a result of moving the documentation to the WIKI there
......
......@@ -23,6 +23,7 @@ my $PREFIX = '@prefix@';
my $SRCDIR = '@srcdir@';
my $TOP_SRCDIR = '@top_srcdir@';
my $DBNAME = "@TBDBNAME@";
my $ERRORLOG_DBNAME = "@TBERRORLOGDBNAME@";
my $ELABINELAB = @ELABINELAB@;
my $WINSUPPORT = @WINSUPPORT@;
my $MAILMANSUPPORT = @MAILMANSUPPORT@;
......@@ -882,6 +883,21 @@ Phase "database", "Setting up database", sub {
ExecQuietFatal("$MYSQL $DBNAME < ".
"$TOP_SRCDIR/sql/knowlbase-create.sql");
};
Phase "$ERRORLOG_DBNAME", "Creating $ERRORLOG_DBNAME", sub {
if (!ExecQuiet("$MYSQLSHOW $ERRORLOG_DBNAME")) {
PhaseSkip("$ERRORLOG_DBNAME already exists");
}
ExecQuietFatal("$MYSQLADMIN create $ERRORLOG_DBNAME");
};
Phase "tables", "Creating tables in $ERRORLOG_DBNAME", sub {
if (!ExecQuiet("$MYSQLDUMP -d $ERRORLOG_DBNAME users")) {
PhaseSkip("Tables have already been created");
}
if ($FBSD_MAJOR == 4) {
ExecQuietFatal("cp $TOP_SRCDIR/sql/database-create-old-errorlog.sql $TOP_SRCDIR/sql/database-create-errorlog.sql")
}
ExecQuietFatal("$MYSQL $ERRORLOG_DBNAME < $TOP_SRCDIR/sql/database-create-errorlog.sql");
};
};
Phase "rc.conf", "Adding testbed content to $RCCONF", sub {
......@@ -1014,6 +1030,7 @@ Phase "cron", "Adding cron jobs", sub {
DoneIfEdited($CRONTAB);
AppendToFileFatal($CRONTAB,
"0 \t6\t*\t*\t*\troot\t$PREFIX/sbin/audit",
"12 \t*\t*\t*\t*\troot\t$PREFIX/sbin/dumperrorlog",
"0 \t1\t*\t*\t*\troot\t$PREFIX/sbin/dbcheck",
"45 \t1\t*\t*\t*\troot\t$PREFIX/sbin/backup",
"*/5\t*\t*\t*\t*\troot\t$PREFIX/sbin/node_status",
......
......@@ -14,7 +14,7 @@
# The easy way: do 'gmake all'
# You can also run the individual targets too.
all: db-create db-fill sitevars old-db-create
all: db-create db-create-errorlog db-fill sitevars old-db-create old-db-create-errorlog
db-create:
@rm -f ./.tmp-db-create.sql ./.tmp-create-diff
......@@ -28,6 +28,18 @@ db-create:
fi
@rm -f ./.tmp-create-diff ./.tmp-db-create.sql
db-create-errorlog:
@rm -f ./.tmp-db-create-errorlog.sql ./.tmp-create-diff-errorlog
@mysqldump -d errorlog > ./.tmp-db-create-errorlog.sql
@-diff ./database-create-errorlog.sql ./.tmp-db-create-errorlog.sql > ./.tmp-create-diff-errorlog
@if test -s ./.tmp-create-diff-errorlog; \
then \
cat ./.tmp-create-diff-errorlog; \
echo "NOTE: Don't forget to update database-migrate.txt!"; \
mv ./.tmp-db-create-errorlog.sql ./database-create-errorlog.sql; \
fi
@rm -f ./.tmp-create-diff-errorlog ./.tmp-db-create-errorlog.sql
old-db-create:
cp ./database-create.sql ./.tmp-db-create.sql
sed -i '' -e 's/ENGINE=MyISAM DEFAULT CHARSET=latin1/TYPE=MyISAM/' ./.tmp-db-create.sql
......@@ -35,6 +47,13 @@ old-db-create:
mv ./.tmp-db-create.sql ./database-create-old.sql
@rm -f ./.tmp-db-create.sql
old-db-create-errorlog:
cp ./database-create-errorlog.sql ./.tmp-db-create-errorlog.sql
sed -i '' -e 's/ENGINE=MyISAM DEFAULT CHARSET=latin1/TYPE=MyISAM/' ./.tmp-db-create-errorlog.sql
sed -i '' -e 's/ default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP//' ./.tmp-db-create-errorlog.sql
mv ./.tmp-db-create-errorlog.sql ./database-create-old-errorlog.sql
@rm -f ./.tmp-db-create-errorlog.sql
db-fill:
@/usr/testbed/sbin/wap /usr/testbed/sbin/export_tables \
> database-fill.sql
......@@ -53,3 +72,4 @@ fwrules:
@echo "*** Use 'gmake insertrules' in the firewall subdir to do this"
dist: db-fill-dist
-- MySQL dump 10.10
--
-- Host: localhost Database: errorlog
-- ------------------------------------------------------
-- Server version 5.0.20-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `causes`
--
DROP TABLE IF EXISTS `causes`;
CREATE TABLE `causes` (
`cause` varchar(16) NOT NULL default '',
`cause_desc` varchar(32) NOT NULL default '',
PRIMARY KEY (`cause`),
UNIQUE KEY `cause_desc` (`cause_desc`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `errors`
--
DROP TABLE IF EXISTS `errors`;
CREATE TABLE `errors` (
`session` int(10) unsigned NOT NULL default '0',
`rank` tinyint(1) NOT NULL default '0',
`stamp` int(10) unsigned NOT NULL default '0',
`exptidx` int(11) NOT NULL default '0',
`script` smallint(3) NOT NULL default '0',
`cause` varchar(16) NOT NULL default '',
`confidence` float NOT NULL default '0',
`inferred` tinyint(1) default NULL,
`need_more_info` tinyint(1) default NULL,
`mesg` text NOT NULL,
`tblog_revision` varchar(8) NOT NULL,
PRIMARY KEY (`session`,`rank`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `experiments`
--
DROP TABLE IF EXISTS `experiments`;
CREATE TABLE `experiments` (
`idx` int(10) unsigned NOT NULL default '0',
`pid` varchar(12) NOT NULL default '',
`eid` varchar(32) NOT NULL default '',
PRIMARY KEY (`idx`),
KEY `eid` (`eid`,`pid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `log`
--
DROP TABLE IF EXISTS `log`;
CREATE TABLE `log` (
`seq` int(10) unsigned NOT NULL default '0',
`stamp` int(10) unsigned NOT NULL default '0',
`session` int(10) unsigned NOT NULL default '0',
`attempt` tinyint(1) NOT NULL default '0',
`cleanup` tinyint(1) NOT NULL default '0',
`invocation` int(10) unsigned NOT NULL default '0',
`parent` int(10) unsigned NOT NULL default '0',
`script` smallint(3) NOT NULL default '0',
`level` tinyint(2) NOT NULL default '0',
`sublevel` tinyint(2) NOT NULL default '0',
`priority` smallint(3) NOT NULL default '0',
`inferred` tinyint(1) NOT NULL default '0',
`cause` varchar(16) NOT NULL default '',
`type` enum('normal','entering','exiting','thecause','extra','summary','primary','secondary') default 'normal',
`relevant` tinyint(1) NOT NULL default '0',
`mesg` text NOT NULL,
PRIMARY KEY (`seq`),
KEY `session` (`session`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `priorities`
--
DROP TABLE IF EXISTS `priorities`;
CREATE TABLE `priorities` (
`priority` smallint(3) NOT NULL default '0',
`priority_name` varchar(8) NOT NULL default '',
PRIMARY KEY (`priority`),
UNIQUE KEY `name` (`priority_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `report_assign_violation`
--
DROP TABLE IF EXISTS `report_assign_violation`;
CREATE TABLE `report_assign_violation` (
`seq` int(10) unsigned NOT NULL,
`unassigned` int(11) default NULL,
`pnode_load` int(11) default NULL,
`no_connect` int(11) default NULL,
`link_users` int(11) default NULL,
`bandwidth` int(11) default NULL,
`desires` int(11) default NULL,
`vclass` int(11) default NULL,
`delay` int(11) default NULL,
`trivial_mix` int(11) default NULL,
`subnodes` int(11) default NULL,
`max_types` int(11) default NULL,
`endpoints` int(11) default NULL,
PRIMARY KEY (`seq`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `report_context`
--
DROP TABLE IF EXISTS `report_context`;
CREATE TABLE `report_context` (
`seq` int(10) unsigned NOT NULL,
`i0` int(11) default NULL,
`i1` int(11) default NULL,
`i2` int(11) default NULL,
`vc0` varchar(255) default NULL,
`vc1` varchar(255) default NULL,
`vc2` varchar(255) default NULL,
PRIMARY KEY (`seq`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `report_error`
--
DROP TABLE IF EXISTS `report_error`;
CREATE TABLE `report_error` (
`seq` int(10) unsigned NOT NULL,
`stamp` int(10) unsigned NOT NULL,
`session` int(10) unsigned NOT NULL,
`invocation` int(10) unsigned NOT NULL,
`attempt` tinyint(1) NOT NULL,
`severity` smallint(3) NOT NULL,
`script` smallint(3) NOT NULL,
`error_type` varchar(255) NOT NULL,
PRIMARY KEY (`seq`),
KEY `session` (`session`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `scripts`
--
DROP TABLE IF EXISTS `scripts`;
CREATE TABLE `scripts` (
`script` smallint(3) NOT NULL auto_increment,
`script_name` varchar(24) NOT NULL default '',
PRIMARY KEY (`script`),
UNIQUE KEY `id` (`script_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `session_info`
--
DROP TABLE IF EXISTS `session_info`;
CREATE TABLE `session_info` (
`session` int(11) NOT NULL default '0',
`uid` int(11) NOT NULL default '0',
`exptidx` int(11) NOT NULL default '0',
PRIMARY KEY (`session`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`uid` varchar(8) NOT NULL default '',
`unix_uid` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`uid`),
KEY `unix_uid` (`unix_uid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
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