--- projects/cms/source/server/db/empty.sql 2000/11/28 12:16:33 1.2 +++ projects/cms/source/server/db/empty.sql 2000/12/05 10:51:07 1.5 @@ -1,88 +1,84 @@ # # This is the full definition of our (initially empty) -# SQL database for i-scream logging. +# SQL database for i-scream logging. This includes +# test tables which (unsuprisingly) are for testing! # +# $Author: pjm2 $ +# $Id: empty.sql,v 1.5 2000/12/05 10:51:07 pjm2 Exp $ - # -# Please note that as most records logged are stored -# over more than one table, it will be ESSENTIAL to -# place a write lock on all affected tables, removing -# it when done. +# This reflects our revised design for the structure +# of the database. # -# # Host: localhost Database : co600_10_db -# # -------------------------------------------------------- # -# Table structure for table 'cpu' +# Table structure for table 'packet' # -CREATE TABLE cpu ( - id bigint(20) DEFAULT '0' NOT NULL, - cpu_no tinyint(4) DEFAULT '0' NOT NULL, - cpu_load float(10,2) DEFAULT '0.00' NOT NULL, +CREATE TABLE packet ( + id bigint(20) DEFAULT '0' NOT NULL auto_increment, + ip varchar(15) NOT NULL, + machine_name varchar(31) NOT NULL, + seq_no bigint(20) DEFAULT '0' NOT NULL, + sent_date bigint(20) DEFAULT '0' NOT NULL, + receipt_date bigint(20) DEFAULT '0' NOT NULL, + PRIMARY KEY (id), KEY id (id), - KEY id_2 (id), - KEY id_3 (id) + UNIQUE id_2 (id) ); -# -# Dumping data for table 'cpu' -# - # -------------------------------------------------------- # -# Table structure for table 'disk' +# Table structure for table 'packet_test' # -CREATE TABLE disk ( - id bigint(20) DEFAULT '0' NOT NULL, - p tinyint(4) DEFAULT '0' NOT NULL, - disk_free bigint(20) DEFAULT '0', - disk_total bigint(20) DEFAULT '0', - mount varchar(31), - label varchar(31), - KEY id (id) +CREATE TABLE packet_test ( + id bigint(20) DEFAULT '0' NOT NULL auto_increment, + ip varchar(15) NOT NULL, + machine_name varchar(31) NOT NULL, + seq_no bigint(20) DEFAULT '0' NOT NULL, + sent_date bigint(20) DEFAULT '0' NOT NULL, + receipt_date bigint(20) DEFAULT '0' NOT NULL, + PRIMARY KEY (id), + KEY id (id), + UNIQUE id_2 (id) ); + +# -------------------------------------------------------- # -# Dumping data for table 'disk' +# Table structure for table 'parameter' # +CREATE TABLE parameter ( + id bigint(20) DEFAULT '0' NOT NULL auto_increment, + packet_id bigint(20) DEFAULT '0' NOT NULL, + name varchar(63) NOT NULL, + value varchar(63) NOT NULL, + PRIMARY KEY (id), + KEY id (id), + UNIQUE id_2 (id) +); + # -------------------------------------------------------- # -# Table structure for table 'packet' +# Table structure for table 'parameter_test' # -CREATE TABLE packet ( +CREATE TABLE parameter_test ( id bigint(20) DEFAULT '0' NOT NULL auto_increment, - ip varchar(15) NOT NULL, - seq_no bigint(20) DEFAULT '0' NOT NULL, - date bigint(20) DEFAULT '0' NOT NULL, - machine_name varchar(31) NOT NULL, - mac_address varchar(31), - os_name varchar(63), - os_version varchar(31), - load1 float(10,2), - load2 float(10,2), - load3 float(10,2), - mem_free bigint(20), - mem_total bigint(20), - swap_free bigint(20), - swap_total bigint(20), - users varchar(255), - full_xml text, + packet_id bigint(20) DEFAULT '0' NOT NULL, + name varchar(63) NOT NULL, + value varchar(63) NOT NULL, PRIMARY KEY (id), KEY id (id), UNIQUE id_2 (id) ); -# -# Dumping data for table 'packet' -# +# end!