File: tablecreate

package info (click to toggle)
trafstats 0.4.20-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 296 kB
  • ctags: 110
  • sloc: cpp: 1,036; sh: 475; perl: 173; makefile: 98
file content (18 lines) | stat: -rw-r--r-- 435 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#
# Run the query below on the postgresql database you give trafstats 
# access to.
#
CREATE TABLE rawtraffic (
	source_ip inet NOT NULL,
	source_port int4 DEFAULT 0,
	dest_ip inet NOT NULL,
	dest_port INT4 DEFAULT 0,
	timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
	amount int8 NOT NULL
);

#
# Replace 'trafstats' with the userID you created for trafstats to use
# the database as.
#
GRANT INSERT ON rawtraffic TO trafstats;