Results 1 to 5 of 5

Thread: Slow CLI scripts

  1. #1
    Join Date
    Aug 2006
    Rep Power

    Default Slow CLI scripts


    I wrote a perl script for managing our zimbra accounts, which means periodical syncronisation based on exports form our staff management software (add/remove users, change address book entries, change distribution list membership, verify certain user-editable fields, ...).

    I realized that calls to the CLI are very slow:

    "zmprov ga" (~2s)
    "zmprov gaa" (~3s)
    "zmprov gaa -v" (~3s)

    What you see above is that the actual call needs a lot of time, it's not really important how much information you try to get: all user information (with -v) or just the account names (~200 accounts) or just one single account. For this special case I'm glad the "-v" option exists.
    But for distribution list management there is no "-v" option so I've got to get all distribution lists (gadl), then iterate through all the lists and get the members by calling zmprov for each list which consumes a lot of time.

    Consequence: my script needs a long time to run through all the changes and tests, etc.

    Question: is there a way to speed up these calls? Or how do your scripts look like?


  2. #2
    Join Date
    Dec 2008
    Rep Power


    i had the same problem.. Did u fix that?

  3. #3
    Join Date
    May 2008
    Rep Power


    same to me, i remember system spent almost 1.5 days to finish one of my script (with > 50000 lines command).

    by the way, i was told we should run zimbra command like this :

    zmprov < cmd.file

    and NOT to run zimbra command one by one, e.g.
    zmprov xxxxx
    zmprov xxxxx

  4. #4
    Join Date
    Jan 2009
    Rep Power


    Why does it take too much time?
    Because it must retreat a lot of data.
    if you use:
    zmprov ga displayname
    It'll faster than before

  5. #5
    Join Date
    Jul 2007
    Rep Power


    I think the overhead is just in the way zmprov works i think it might start up java or something I don't know that much. It's been discussed a few times though here is a good thread

    That discusses kind of what tiger2000 is talking about, starting only one instance of zmprov and feeding it commands. Like the forum thread i psasted says though perhaps SOAP is a better way if you need to do stuff efficiently.

Similar Threads

  1. IMAP emails with attachments slow to view
    By meltingrobot in forum Administrators
    Replies: 12
    Last Post: 06-08-2009, 02:15 PM
  2. ZCS NE Backup - Archiving To Tape Is To Slow
    By Chewie71 in forum Administrators
    Replies: 10
    Last Post: 09-19-2008, 04:59 PM
  3. Why is Zimbra SLOW?
    By BarrySDCA in forum Administrators
    Replies: 57
    Last Post: 02-19-2008, 09:57 AM
  4. GUI very slow
    By danielperez in forum Users
    Replies: 11
    Last Post: 09-26-2007, 12:54 PM
  5. Zimbra very slow today
    By rmvg in forum Users
    Replies: 6
    Last Post: 12-15-2005, 08:21 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