List currently logged on users

Michel Blanc mblanc at erasme.org
Fri Sep 12 11:02:35 EDT 2014


On 12/09/2014 16:04, Michael Neumann wrote:
> Hello,
> 
> i am looking for a command that outputs the currently logged on users of
> cyrus imapd, is there something available?
> 
> Best regards
> 

Hello,

I use the following handy one liner :


lsof  -p `pidof imapd|tr ' ' ','` | \
grep '/var/lib/cyrus/user/.*\.seen$' | \
awk '{ print $9 }' | sort | uniq | \
cut -f7 -d'/' | cut -f1 -d'.'

with cyrus 2.2 under ubuntu server, YMMV !

Cheers,

M
-- 
Michel Blanc - Systèmes / Réseaux Erasme
Erasme - Département du Rhône - Saint Clément les Places/FR69930
  Email  : mblanc at erasme.org - Tel: +33-474706840
  GitHub : @leucos - GPG: 0X24B35C22


More information about the Info-cyrus mailing list