swh-lister/bin/status
2015-04-26 16:24:32 +02:00

14 lines
459 B
Bash
Executable file

#!/bin/bash
# Copyright (C) 2015 Stefano Zacchiroli <zack@upsilon.cc>
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
# intended usage: watch -n 60 bin/status
DBNAME="github"
echo "SELECT COUNT(*), MAX(id) FROM repos" | psql "$DBNAME"
echo "\\l+ ${DBNAME}" | psql "$DBNAME"
du -sh cache/
zgrep -i --color=auto "'X-RateLimit-Remaining'" cache/$(ls -t cache/ | head -n 4 | tail -n 1)