User Reports
From Zimbra :: Wiki
| |
|
Article Information |
|---|
| This article applies to the following ZCS versions. |
| |
Zimbra doesn't seem to have good ways of counting users by COS or domains. I've written a couple of scripts to make that easier. Be warned that these can take a long time to run if you have a lot of users
The following script will generate a report of total users in each COS. This may be useful for Zimbra customers who are billed based on accounts with different feature levels:
#!/bin/sh
tmpfile=`mktemp`
account_list=`zmprov gaa`
for cos_name in `zmprov gac` ; do
cos_id=`zmprov gc $cos_name | grep zimbraId | cut -f2 -d\ `
cos_count=0
for account in $account_list ; do
account_cos_id=`zmprov ga $account | grep $cos_id | cut -f2 -d\ `
if [ "$account_cos_id" = "$cos_id" ] ; then
let cos_count=cos_count+1
fi
done
echo "$cos_name has $cos_count accounts." >> $tmpfile
done
cat $tmpfile
rm -f $tmpfile
| Verified Against: ZCS 4.5 | Date Created: 12/8/2006 |
| Article ID: http://wiki.zimbra.com/index.php?title=User_Reports | Date Modified: 4/16/2010 |
