1 |
pjm2 |
1.1 |
|
2 |
|
|
# |
3 |
|
|
# This is the full definition of our (initially empty) |
4 |
|
|
# SQL database for i-scream logging. |
5 |
|
|
# |
6 |
|
|
|
7 |
|
|
|
8 |
|
|
# |
9 |
|
|
# Please note that as most records logged are stored |
10 |
|
|
# over more than one table, it will be ESSENTIAL to |
11 |
|
|
# place a write lock on all affected tables, removing |
12 |
|
|
# it when done. |
13 |
|
|
# |
14 |
|
|
|
15 |
|
|
|
16 |
|
|
# Host: localhost Database : co600_10_db |
17 |
|
|
|
18 |
|
|
|
19 |
|
|
# -------------------------------------------------------- |
20 |
|
|
# |
21 |
|
|
# Table structure for table 'cpu' |
22 |
|
|
# |
23 |
|
|
|
24 |
|
|
CREATE TABLE cpu ( |
25 |
|
|
id bigint(20) DEFAULT '0' NOT NULL, |
26 |
|
|
cpu_no tinyint(4) DEFAULT '0' NOT NULL, |
27 |
|
|
cpu_load float(10,2) DEFAULT '0.00' NOT NULL, |
28 |
|
|
KEY id (id), |
29 |
|
|
KEY id_2 (id), |
30 |
|
|
KEY id_3 (id) |
31 |
|
|
); |
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
# -------------------------------------------------------- |
36 |
|
|
# |
37 |
|
|
# Table structure for table 'disk' |
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' NOT NULL, |
44 |
|
|
disk_total bigint(20) DEFAULT '0' NOT NULL, |
45 |
|
|
KEY id (id) |
46 |
|
|
); |
47 |
|
|
|
48 |
|
|
|
49 |
|
|
# -------------------------------------------------------- |
50 |
|
|
# |
51 |
|
|
# Table structure for table 'packet' |
52 |
|
|
# |
53 |
|
|
|
54 |
|
|
CREATE TABLE packet ( |
55 |
|
|
id bigint(20) DEFAULT '0' NOT NULL auto_increment, |
56 |
|
|
ip varchar(15) NOT NULL, |
57 |
|
|
seq_no bigint(20) DEFAULT '0' NOT NULL, |
58 |
|
|
date bigint(20) DEFAULT '0' NOT NULL, |
59 |
|
|
machine_name varchar(31) NOT NULL, |
60 |
|
|
mac_address varchar(31), |
61 |
|
|
os_name varchar(63), |
62 |
|
|
os_version varchar(31), |
63 |
|
|
load1 float(10,2), |
64 |
|
|
load2 float(10,2), |
65 |
|
|
load3 float(10,2), |
66 |
|
|
mem_free bigint(20), |
67 |
|
|
mem_total bigint(20), |
68 |
|
|
swap_free bigint(20), |
69 |
|
|
swap_total bigint(20), |
70 |
|
|
users varchar(255), |
71 |
|
|
full_xml text, |
72 |
|
|
PRIMARY KEY (id), |
73 |
|
|
KEY id (id), |
74 |
|
|
UNIQUE id_2 (id) |
75 |
|
|
); |