updated redis import to add ttls

This commit is contained in:
2017-11-27 17:39:20 +01:00
parent 55da18115a
commit fdf54ae7e0
7 changed files with 40 additions and 5 deletions

View File

@@ -9,7 +9,7 @@
#
# Starting the required redis instances can be done via:
# for i in /somedir/*_local_*.conf; do sudo -u someuser redis-server "$i"; done
#
#
# Adjust somedir and someuser to your local setup
#
# ATTENTION:
@@ -22,3 +22,6 @@
gcc r-4-felix.c -lhiredis -L~/src/hiredis -I~/src -o r-4-felix
# with gz
gcc r-4-felix.c -lhiredis -lz -o r-4-felix-gz

View File

@@ -0,0 +1,28 @@
# Redis configuration file example
################################## INCLUDES ###################################
include redis_local.conf
# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
# default. You can specify a custom pid file location here.
pidfile /home/felix/redis/redis/redis-server_t.pid
# Accept connections on the specified port, default is 6379.
# If port 0 is specified Redis will not listen on a TCP socket.
port 2345
# Specify the path for the unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
# on a unix socket when not specified.
# yields better performance than loopback
unixsocket /home/felix/redis/redis/redis_local_t.sock
unixsocketperm 755
# Specify the log file name. Also the empty string can be used to force
# Redis to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
logfile /home/felix/redis/redis/redis-server_t.log
# The filename where to dump the DB
dbfilename dump_t.rdb

View File

@@ -4,5 +4,5 @@ read -p "Really delete all redis data? " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
for i in `seq 2337 2344`; do redis-cli -p "$i" flushall; done
for i in `seq 2337 2345`; do redis-cli -p "$i" flushall; done
fi

View File

@@ -0,0 +1,3 @@
#!/bin/bash
for i in `seq 2337 2344`; do echo "redis instance $i"; redis-cli -p "$i" scan 0 count 100 match \*; done

View File

@@ -1,3 +1,3 @@
#!/bin/bash
for i in `seq 2337 2344`; do redis-cli -p "$i" keys \*; done
for i in `seq 2337 2345`; do redis-cli -p "$i" keys \*; done

View File

@@ -1,3 +1,3 @@
#!/bin/bash
for i in `seq 2337 2344`; do redis-cli -p "$i" bgsave & sleep 4m; done
for i in `seq 2337 2345`; do redis-cli -p "$i" bgsave & sleep 4m; done

View File

@@ -1,4 +1,5 @@
#!/bin/bash
find /run/media/felix/disk/pDNS -iname 'pdns_capture.pcap-*-2017-09-0[1-7]*.csv' | sort -t- -k3 | xargs -P10 -n1 ./r-4-felix
#find /run/media/felix/disk/pDNS -iname 'pdns_capture.pcap-*-2017-09-0[1-7]*.csv.gz' | sort -t- -k3 | xargs -P10 -n1 ./r-4-felix
find /home/felix/pdns -iname 'pdns_capture.pcap-*-2017-09-0[1-7]*.csv.gz' | sort -t- -k3 | xargs -P10 -n1 ./r-4-felix-gz