#statistik
6 Einzeiler mit diesem Stichwort.
Alle Einzeiler mit Tag statistik
Anfragen pro Minute im Access-Log zählen
#awk '{print substr($4, 2, 17)}' /var/www/vhosts/system/example.com/logs/access_ssl_log | sort | uniq -c | sort -rn | head -20
Durchschnitt, Minimum und Maximum einer Spalte berechnen
$awk -v c=2 'NR == 1 {min = max = $c} {s += $c; if ($c < min) min = $c; if ($c > max) max = $c} END {if (NR) printf "n=%d avg=%.2f min=%s max=%s\n", NR, s/NR, min, max}' messwerte.txt
Memcached-Statistik per netcat abfragen
$printf 'stats\nquit\n' | nc 127.0.0.1 11211 | grep -E 'STAT (curr_items|bytes|limit_maxbytes|get_hits|get_misses|evictions|curr_connections) '
Traffic- und Fehlerstatistik einer Netzwerkschnittstelle
$ip -s link show eth0
Trefferquote des Redis-Caches anzeigen
$redis-cli INFO stats | grep -E '^(keyspace_hits|keyspace_misses|evicted_keys|expired_keys):'
WordPress-Beiträge nach Status zählen
$wp post list --post_type=post --post_status=any --field=post_status --path=/var/www/vhosts/example.com/httpdocs | sort | uniq -c