Results 1 to 2 of 2

Thread: get a random sample of user account growth by month

  1. #1
    anthonyclark is offline Member
    Join Date
    Jul 2008
    Location
    Ann Arbor, MI
    Posts
    10
    Rep Power
    6

    Default get a random sample of user account growth by month

    Here's some perl code that may or may not be useful for someone. It's a script to connect to a ZCS instance, get the number of accounts on that system, randomly select a 99% confidence sample with a 4% margin of error, then output the growth by month of those accounts.

    You will need to put a file called "auth.yaml" in the script directory, the format is in the script:
    Code:
    zimbra_ldap:
     ldaphost: LDAP-HOSTNAME-HERE
     imaphost: IMAP-HOSTNAME-HERE
     binddn: uid=zimbra,cn=admins,cn=zimbra
     bindpass: SOMETHING
     authuser: SOMEONE
     authpass: SOMETHING
    Output looks something like:

    account@example.com, Oct-2008, 1240517
    account@example.com, Nov-2008, 892160
    account@example.com, Dec-2008, 418252
    account@example.com, Jan-2009, 317260
    account@example.com, Feb-2009, 470876
    account@example.com, Mar-2009, 1017728

    To modify the date range, you'll need to edit the script at line 84 and change "( year => 2008, month => 5 )" to whatever you need.

    I like to redirect the output from the script to a .csv file. You can then perform whatever analysis you want

    Dependencies:
    Code:
    use Mail::IMAPClient;
    use Data::Dumper;
    use List::Util qw(sum shuffle);
    use DateTime;
    use Net::LDAP;
    use Config::YAML;
    use MIME::Base64;
    Comments, modifications greatly appreciated
    Attached Files Attached Files

  2. #2
    dalmate is offline Elite Member
    Join Date
    Jan 2009
    Posts
    359
    Rep Power
    6

    Default

    I don't understand, what is this? and what it can does?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Install Problem in Ubuntu 6.06 Server
    By xtimox in forum Installation
    Replies: 16
    Last Post: 03-27-2008, 09:36 AM
  2. Zimbra Install Problem - getDirectContext
    By bsimzer in forum Installation
    Replies: 27
    Last Post: 07-19-2007, 10:12 AM
  3. Getting problems in FC4 while instalation
    By kitty_bhoo in forum Installation
    Replies: 13
    Last Post: 09-12-2006, 10:34 PM
  4. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 07:38 PM
  5. Network edition - strange behavior
    By goetzi in forum Installation
    Replies: 6
    Last Post: 11-16-2005, 03:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •