Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AossTower
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MetObs
AossTower
Commits
e4fdc182
Verified
Commit
e4fdc182
authored
7 years ago
by
David Hoese
Browse files
Options
Downloads
Patches
Plain Diff
Add influxdb ingest script to scripts
parent
54cf52dc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aosstower/level_00/influxdb.py
+1
-1
1 addition, 1 deletion
aosstower/level_00/influxdb.py
scripts/start_tower_influxdb_ingest.sh
+21
-0
21 additions, 0 deletions
scripts/start_tower_influxdb_ingest.sh
with
22 additions
and
1 deletion
aosstower/level_00/influxdb.py
+
1
−
1
View file @
e4fdc182
...
@@ -57,7 +57,7 @@ def main():
...
@@ -57,7 +57,7 @@ def main():
'
of the file and insert any new data added after starting
'
))
'
of the file and insert any new data added after starting
'
))
parser
.
add_argument
(
'
--ldmp
'
,
action
=
'
store_true
'
,
parser
.
add_argument
(
'
--ldmp
'
,
action
=
'
store_true
'
,
help
=
'
Treat `src` file as a station name and read records from LoggerNet LDMP server (port: 1024)
'
)
help
=
'
Treat `src` file as a station name and read records from LoggerNet LDMP server (port: 1024)
'
)
parser
.
add_argument
(
'
--tables
'
,
nargs
=
'
*
'
,
default
=
[
'
RIGTower
'
],
parser
.
add_argument
(
'
--tables
'
,
nargs
=
'
*
'
,
default
=
[
'
1
'
],
help
=
"
LoggerNet LDMP tables to read in
"
)
help
=
"
LoggerNet LDMP tables to read in
"
)
parser
.
add_argument
(
"
--host
"
,
default
=
influxdb
.
DB_HOST
,
parser
.
add_argument
(
"
--host
"
,
default
=
influxdb
.
DB_HOST
,
help
=
"
Hostname of database connection
"
)
help
=
"
Hostname of database connection
"
)
...
...
This diff is collapsed.
Click to expand it.
scripts/start_tower_influxdb_ingest.sh
0 → 100644
+
21
−
0
View file @
e4fdc182
#!/usr/bin/env bash
#
# Runs the tower ingest in a screen session named 'tower_influxdb_ingest'.
#
# If a screen session is already running with that name, exit, otherwise start
# a new detached screen session named 'tower_influxdb_ingest'.
#
NAME
=
tower_influxdb_ingest
PYENV
=
/opt/metobs/aoss_tower
#SRC=/mnt/data/ingest/rig_tower/rig_tower.dat
# LOGFN=$HOME/log/tower_db_ingest.log
# TODO: Add proper logging
SCRN
=
$(
screen
-list
|
grep
$NAME
|
awk
'{print $1}'
)
if
[
-n
"
$SCRN
"
]
;
then
echo
Screen already running:
$SCRN
else
screen
-S
$NAME
-d
-m
$PYENV
/bin/python
-m
aosstower.l00.influxdb
--host
metobs01.ssec.wisc.edu
-vvv
--ldmp
RIGTower
#screen -S $NAME -d -m "$PYENV/bin/python -m aosstower.l00.influxdb --host metobs01.ssec.wisc.edu -vvv -t $SRC > /home/metobs/log/${NAME}.log"
echo
Started
in
screen
$(
screen
-list
|
grep
$NAME
|
awk
'{print $1}'
)
fi
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment