Add raws generation to zmap script
This commit is contained in:
parent
b06a53c6c6
commit
27edd7d58f
6
zmap.sh
6
zmap.sh
|
@ -6,7 +6,8 @@ REMOTE_USER=root
|
|||
REMOTE_HOST=localhost
|
||||
REMOTE_KEY=~/.ssh/id_rsa
|
||||
REMOTE_DATA_PATH=/data
|
||||
REMOTE_TILES_PATH=/tiles
|
||||
REMOTE_TILES_PATH=/public/assets/tiles
|
||||
REMOTE_RAWS_PATH=/raws
|
||||
REMOTE_COORDS_PATH=/coords.bin
|
||||
REMOTE_IPMAP_PATH=/scripts/ipmap.py
|
||||
COLORMAPS=jet,fake_parula,viridis,plasma,thermal,batlow
|
||||
|
@ -27,6 +28,7 @@ REMOTE_CSV_PATH="$CURRENT_REMOTE_DATA_PATH/$CSV_FILENAME"
|
|||
REMOTE_BIN_PATH="$CURRENT_REMOTE_DATA_PATH/$BIN_FILENAME"
|
||||
REMOTE_JSON_PATH="$REMOTE_TILES_PATH/$JSON_FILENAME"
|
||||
CURRENT_REMOTE_TILES_PATH="$REMOTE_TILES_PATH/$DATE"
|
||||
CURRENT_REMOTE_RAWS_PATH="$REMOTE_RAWS_PATH/$DATE"
|
||||
|
||||
mkdir -p "$CURRENT_LOCAL_DATA_PATH" &&
|
||||
zmap -B '100M' -M icmp_echo_time '0.0.0.0/0' -f 'saddr_raw,rtt_us,success' -o "$LOCAL_CSV_PATH" &&
|
||||
|
@ -37,7 +39,7 @@ ssh -i "$REMOTE_KEY" "$REMOTE" "
|
|||
'$REMOTE_IPMAP_PATH' convert '$REMOTE_CSV_PATH' '$REMOTE_BIN_PATH' &&
|
||||
rm '$REMOTE_CSV_PATH' &&
|
||||
mkdir -p '$CURRENT_REMOTE_TILES_PATH' &&
|
||||
'$REMOTE_IPMAP_PATH' mktiles -a -c '$COLORMAPS' -v '$VARIANTS' -j '$REMOTE_JSON_PATH' '$REMOTE_COORDS_PATH' '$REMOTE_BIN_PATH' '$CURRENT_REMOTE_TILES_PATH'
|
||||
'$REMOTE_IPMAP_PATH' mktiles -a -c '$COLORMAPS' -v '$VARIANTS' -j '$REMOTE_JSON_PATH' -r '$CURRENT_REMOTE_RAWS_PATH' '$REMOTE_COORDS_PATH' '$REMOTE_BIN_PATH' '$CURRENT_REMOTE_TILES_PATH'
|
||||
cd '$REMOTE_DATA_PATH' && for f in *; do (( \$f < $KEEP_DATE )) && rm -r \"\$f\"; done
|
||||
cd '$REMOTE_TILES_PATH' && for f in *; do (( \$f < $KEEP_DATE )) && '$REMOTE_IPMAP_PATH' rmtiles -j '$REMOTE_JSON_PATH' \"\$f\"; done
|
||||
"
|
||||
|
|
Loading…
Reference in New Issue