koopa-admin-log/benchmarks/amount-ladder/sample-load-inside.sh
2026-07-10 11:33:09 +02:00

26 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
# Sample host + three-container CPU/RSS from koopa (run as hernani via ssh).
# Usage (local): ssh hernani@koopa 'bash -s' < sample-load-inside.sh
# Or: ./sample-load-inside.sh # if executed ON koopa as hernani
set -eu
tag="${1:-manual}"
echo "=== sample_load tag=$tag $(date -u +%FT%TZ) ==="
echo "=== loadavg ==="
cat /proc/loadavg
echo "=== mem ==="
free -h 2>/dev/null || true
echo "=== top host cpu ==="
ps -eo pid,pcpu,pmem,rss,etime,comm --sort=-pcpu 2>/dev/null | head -15
echo "=== exchange (taler-exchange-hacktivism) ==="
podman exec taler-exchange-hacktivism \
ps -eo pid,pcpu,pmem,rss,etime,args 2>/dev/null \
| grep -E 'taler-exchange|postgres -D|PID' | head -25 || true
echo "=== merchant (taler-hacktivism) ==="
podman exec taler-hacktivism \
ps -eo pid,pcpu,pmem,rss,etime,args 2>/dev/null \
| grep -E 'taler-merchant|nginx|postgres -D' | head -25 || true
echo "=== bank (taler-bank-hacktivism) ==="
podman exec taler-bank-hacktivism \
ps -eo pid,pcpu,pmem,rss,etime,args 2>/dev/null \
| grep -E 'java|libeufin|postgres -D' | head -15 || true
echo "=== sample_load done ==="