Pascal Volk suggested this, and it was pretty quick to implement for Dovecot v2.0. Ideas welcome how to improve it, or if it's already perfect :)
The first line is written to stderr, so |sort can be used:
# doveadm who|sort username # (ips) (pids) timo 1 (127.0.0.1) (2457) tss 2 (127.0.0.1) (617 1345) tss2 2 (127.0.0.2 127.0.0.1) (2392 2799)
# doveadm who|sort -k2 -nr username # (ips) (pids) tss2 2 (127.0.0.2 127.0.0.1) (2392 2799) tss 2 (127.0.0.1) (617 1345) timo 1 (127.0.0.1) (2457)
You can filter connections:
# doveadm who 127.0.0.2 username # (ips) (pids) tss2 2 (127.0.0.2 127.0.0.1) (2392 2799)
# doveadm who 127.0.0.0/24 username # (ips) (pids) tss2 2 (127.0.0.2 127.0.0.1) (2392 2799) timo 1 (127.0.0.1) (2457) tss 2 (127.0.0.1) (617 1345)
# doveadm who tss username # (ips) (pids) tss2 2 (127.0.0.2 127.0.0.1) (2392 2799) tss 2 (127.0.0.1) (617 1345)
# doveadm who tss 127.0.0.1 username # (ips) (pids) tss2 2 (127.0.0.2 127.0.0.1) (2392 2799) tss 2 (127.0.0.1) (617 1345)
participants (1)
-
Timo Sirainen