메뉴 닫기

파일 데이타 베이스 sqlite3

RRD replace to sqlite3

let round=$(date +%s)%86400/3600

let round=$(date -d now+9hour +%s)%86400/3600

rrd.db

apt-get install sqlite3

 

데이타베이스는 

sqlite3 app.db

 

cat <<EOF | sqlite3 app.db 
create table tbl_foo(
seq int primary key ,
timestamp_bash int,
if_in int,

if_out int,
reg_datetime  datetime );
EOF

cat <<EOF | sqlite3 app.db | awk -F ‘|’ ‘{print $2’}
insert into tbl_foo values ( 1, ‘foo’ , datetime(‘now’, ‘localtime’) );

select * from tbl_foo ;

delete from tbl_foo;

select * from 

EOF

 

 

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x