Difference between revisions of "User Reports"

 
(Adding Templates: 4.5, Unsupported, Article Footer, and Category:Administration)
Line 1: Line 1:
 +
{{4.5}}
 +
{{Unsupported}}
 +
 
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.  
 
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
 
Be warned that these can take a long time to run if you have a lot of users
Line 26: Line 29:
 
rm -f $tmpfile
 
rm -f $tmpfile
 
</pre>
 
</pre>
 +
 +
{{Article Footer|ZCS 4.5|12/8/2006}}
 +
 +
[[Category:Administration]]

Revision as of 20:58, 7 July 2008

ZCS 4.5 Article ZCS 4.5


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: https://wiki.zimbra.com/index.php?title=User_Reports Date Modified: 2008-07-07



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search