This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NAMESPACE="Traccar" | |
| INTERVAL=600 | |
| REGION="us-east-1" | |
| while true; do | |
| date; | |
| total=$(ss -tanH | wc -l); | |
| echo "Total connections: $total"; | |
| aws cloudwatch put-metric-data --namespace "$NAMESPACE" --metric-name "Connections" --value "$total" --unit "Count" --region "$REGION"; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| DB="traccar" | |
| USER="neondb_owner" | |
| HOST="ep-late-cherry-a460jx6n.us-east-1.aws.neon.tech" | |
| export PGOPTIONS='-c idle_in_transaction_session_timeout=0' | |
| pg_repack -h $HOST -U $USER -d $DB --table=tc_positions -k -e |
OlderNewer