Unverified Commit 3572ee45 authored by David Hoese's avatar David Hoese
Browse files

Add ceilometer cron scripts

parent 8df0e487
[ct25k]
# settings: 24007E1
#port = /dev/ttyS2
# moxa port 1
port = /dev/ttyr00
# % must be escaped if date formatting is used
filefmt = rig_ceilo-%%Y-%%m-%%d.ascii
outdir = /home/metobs/ceilo/data
[loggers]
keys = root, ceilo
[handlers]
keys = console, file
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console, file
[logger_ceilo]
level = TRACE
handlers =
qualname = metobs.ceilo
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[handler_file]
# Auto-rotates when file inode changes.
# Meant to be used with logrotate, something like:
#/home/metobs/log/ceilo.log {
# compress
# rotate 10
# size 20M
#}
class = handlers.WatchedFileHandler
args = ('/home/metobs/log/ceilo_ingest.log','a')
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s
#!/usr/bin/env bash
# Offset TZ by 1 minute to make sure we get data from 23:59 to 00:00
export TZ="UTC-00:01:00"
LOCK=$HOME/ceilo/$(basename "$0").lock
SRC="$HOME/ceilo/data/rig_ceilo-$(date +%Y-%m-%d).ascii"
(
flock -x -n 200 || exit $?
if [ -e $SRC ]; then
echo "$0($$): $SRC"
#rsync -aux $SRC rsync://tahiti.instrument/incoming/Instrument_Data/METOBS/RIG/Ceilo/raw
rsync -aux $SRC rsync://metobs01.instrument/incoming/aoss-ceilo
fi
) 200>$LOCK
#!/usr/bin/env bash
NAME=ceilo_ingest
SCRN=$(screen -list | grep $NAME | awk '{print $1}')
if [ -n "$SCRN" ]; then
echo Screen already running: $SCRN
else
screen -S $NAME -d -m /home/metobs/env/production/bin/ct25k_ingest -c /home/metobs/ceilo/$NAME.cfg
echo Started in screen $(screen -list | grep $NAME | awk '{print $1}')
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment