diff --git a/bandwidth.db b/bandwidth.db index 5dedf97..d6b3a32 100644 Binary files a/bandwidth.db and b/bandwidth.db differ diff --git a/bandwidth.sh b/bandwidth.sh index 0d33f5d..3bf86d0 100644 --- a/bandwidth.sh +++ b/bandwidth.sh @@ -1,19 +1,19 @@ #!/bin/bash -function writeSqlite3 () -{ -# now import the csv data in to sqlite db -echo "write data to sqlite3" -sqlite3 -batch bandwidth.db <<"EOF" -.separator "," -.import speedtest.tmp bandwidth -EOF -} +# function writeSqlite3 () +# { +# # now import the csv data in to sqlite db +# echo "write data to sqlite3" +# sqlite3 -batch bandwidth.db <<"EOF" +# .separator "," +# .import speedtest.tmp bandwidth +# EOF +# } function writeMariaDB () { echo "write data to mariadb" - mariadb-import --host server0 --user root -plungretter1 --local --fields-terminated-by=',' bandwidth /home/sascha/speedtest.tmp + mariadb-import --host server0 --user root -plungretter1 --local --fields-terminated-by=',' bandwidth speedtest.tmp } function runTest () @@ -24,7 +24,7 @@ function runTest () bat speedtest.tmp # write output to db - writeSqlite3 + # writeSqlite3 writeMariaDB # write output to csv diff --git a/speedtest.csv b/speedtest.csv new file mode 100644 index 0000000..2ddc2ef --- /dev/null +++ b/speedtest.csv @@ -0,0 +1,2 @@ +35692,Clouvider Ltd,Frankfurt Am Main,2022-08-04T18:17:40.548119Z,221.19864243205473,23.564,246840561.14484474,20721710.579230364,,5.146.68.185 +29320,WiTCOM,Wiesbaden,2022-08-04T18:18:39.392004Z,205.6488933950454,24.203,253694035.70635754,23220505.965713702,,5.146.68.185 diff --git a/speedtest.tmp b/speedtest.tmp new file mode 100644 index 0000000..a5624aa --- /dev/null +++ b/speedtest.tmp @@ -0,0 +1 @@ +29320,WiTCOM,Wiesbaden,2022-08-04T18:18:39.392004Z,205.6488933950454,24.203,253694035.70635754,23220505.965713702,,5.146.68.185