A zoomable candlestick chart.
Copyright © 2015, Anil Nair - MIT License
-- show running queries (pre 9.2) | |
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(query_start, clock_timestamp()), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
A zoomable candlestick chart.
Copyright © 2015, Anil Nair - MIT License
#!/bin/bash | |
# Runs Restic backup on a schedule via cron, emails with status | |
# 1. add a cred file with your repo logins to /etc/restic/cred | |
# 2. | |
FROM="restic@$(hostname)" | |
EMAIL="user@company.com" | |
LOG="/var/log/restic.log" | |
RDIR="/etc/restic" |