1 |
|
|
2 |
|
# |
3 |
|
# This is the full definition of our (initially empty) |
4 |
< |
# SQL database for i-scream logging. |
4 |
> |
# SQL database for i-scream logging. This includes |
5 |
> |
# test tables which (unsuprisingly) are for testing! |
6 |
|
# |
7 |
+ |
# $Author$ |
8 |
+ |
# $Id$ |
9 |
|
|
7 |
– |
|
10 |
|
# |
11 |
< |
# Please note that as most records logged are stored |
12 |
< |
# over more than one table, it will be ESSENTIAL to |
11 |
< |
# place a write lock on all affected tables, removing |
12 |
< |
# it when done. |
11 |
> |
# This reflects our revised design for the structure |
12 |
> |
# of the database. |
13 |
|
# |
14 |
|
|
15 |
– |
# |
15 |
|
# Host: localhost Database : co600_10_db |
17 |
– |
# |
16 |
|
|
17 |
|
# -------------------------------------------------------- |
18 |
|
# |
19 |
< |
# Table structure for table 'cpu' |
19 |
> |
# Table structure for table 'packet' |
20 |
|
# |
21 |
|
|
22 |
< |
CREATE TABLE cpu ( |
23 |
< |
id bigint(20) DEFAULT '0' NOT NULL, |
24 |
< |
cpu_no tinyint(4) DEFAULT '0' NOT NULL, |
25 |
< |
cpu_load float(10,2) DEFAULT '0.00' NOT NULL, |
22 |
> |
CREATE TABLE packet ( |
23 |
> |
id bigint(20) DEFAULT '0' NOT NULL auto_increment, |
24 |
> |
ip varchar(15) NOT NULL, |
25 |
> |
machine_name varchar(31) NOT NULL, |
26 |
> |
seq_no bigint(20) DEFAULT '0' NOT NULL, |
27 |
> |
sent_date bigint(20) DEFAULT '0' NOT NULL, |
28 |
> |
receipt_date bigint(20) DEFAULT '0' NOT NULL, |
29 |
> |
PRIMARY KEY (id), |
30 |
|
KEY id (id), |
31 |
< |
KEY id_2 (id), |
30 |
< |
KEY id_3 (id) |
31 |
> |
UNIQUE id_2 (id) |
32 |
|
); |
33 |
|
|
33 |
– |
# |
34 |
– |
# Dumping data for table 'cpu' |
35 |
– |
# |
34 |
|
|
37 |
– |
|
35 |
|
# -------------------------------------------------------- |
36 |
|
# |
37 |
< |
# Table structure for table 'disk' |
37 |
> |
# Table structure for table 'packet_test' |
38 |
|
# |
39 |
|
|
40 |
< |
CREATE TABLE disk ( |
41 |
< |
id bigint(20) DEFAULT '0' NOT NULL, |
42 |
< |
p tinyint(4) DEFAULT '0' NOT NULL, |
43 |
< |
disk_free bigint(20) DEFAULT '0', |
44 |
< |
disk_total bigint(20) DEFAULT '0', |
45 |
< |
mount varchar(31), |
46 |
< |
label varchar(31), |
47 |
< |
KEY id (id) |
40 |
> |
CREATE TABLE packet_test ( |
41 |
> |
id bigint(20) DEFAULT '0' NOT NULL auto_increment, |
42 |
> |
ip varchar(15) NOT NULL, |
43 |
> |
machine_name varchar(31) NOT NULL, |
44 |
> |
seq_no bigint(20) DEFAULT '0' NOT NULL, |
45 |
> |
sent_date bigint(20) DEFAULT '0' NOT NULL, |
46 |
> |
receipt_date bigint(20) DEFAULT '0' NOT NULL, |
47 |
> |
PRIMARY KEY (id), |
48 |
> |
KEY id (id), |
49 |
> |
UNIQUE id_2 (id) |
50 |
|
); |
51 |
|
|
52 |
+ |
|
53 |
+ |
# -------------------------------------------------------- |
54 |
|
# |
55 |
< |
# Dumping data for table 'disk' |
55 |
> |
# Table structure for table 'parameter' |
56 |
|
# |
57 |
|
|
58 |
+ |
CREATE TABLE parameter ( |
59 |
+ |
id bigint(20) DEFAULT '0' NOT NULL auto_increment, |
60 |
+ |
packet_id bigint(20) DEFAULT '0' NOT NULL, |
61 |
+ |
name varchar(63) NOT NULL, |
62 |
+ |
value varchar(63) NOT NULL, |
63 |
+ |
PRIMARY KEY (id), |
64 |
+ |
KEY id (id), |
65 |
+ |
UNIQUE id_2 (id) |
66 |
+ |
); |
67 |
|
|
68 |
+ |
|
69 |
|
# -------------------------------------------------------- |
70 |
|
# |
71 |
< |
# Table structure for table 'packet' |
71 |
> |
# Table structure for table 'parameter_test' |
72 |
|
# |
73 |
|
|
74 |
< |
CREATE TABLE packet ( |
74 |
> |
CREATE TABLE parameter_test ( |
75 |
|
id bigint(20) DEFAULT '0' NOT NULL auto_increment, |
76 |
< |
ip varchar(15) NOT NULL, |
77 |
< |
seq_no bigint(20) DEFAULT '0' NOT NULL, |
78 |
< |
date bigint(20) DEFAULT '0' NOT NULL, |
68 |
< |
server_data bigint(20) DEFAULT '0' NOT NULL, |
69 |
< |
machine_name varchar(31) NOT NULL, |
70 |
< |
mac_address varchar(31), |
71 |
< |
os_name varchar(63), |
72 |
< |
os_version varchar(31), |
73 |
< |
load1 float(10,2), |
74 |
< |
load2 float(10,2), |
75 |
< |
load3 float(10,2), |
76 |
< |
mem_free bigint(20), |
77 |
< |
mem_total bigint(20), |
78 |
< |
swap_free bigint(20), |
79 |
< |
swap_total bigint(20), |
80 |
< |
users varchar(255), |
81 |
< |
full_xml text, |
76 |
> |
packet_id bigint(20) DEFAULT '0' NOT NULL, |
77 |
> |
name varchar(63) NOT NULL, |
78 |
> |
value varchar(63) NOT NULL, |
79 |
|
PRIMARY KEY (id), |
80 |
|
KEY id (id), |
81 |
|
UNIQUE id_2 (id) |
82 |
|
); |
83 |
|
|
84 |
< |
# |
88 |
< |
# Dumping data for table 'packet' |
89 |
< |
# |
84 |
> |
# end! |