Results 1 to 5 of 5

Thread: Slow CLI scripts

  1. #1
    CrypTom is offline Project Contributor
    Join Date
    Aug 2006
    Posts
    33
    Rep Power
    8

    Default Slow CLI scripts

    Hi

    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 user@mydomain.ch" (~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?

    Thanks
    Tom

  2. #2
    sevilla is offline Senior Member
    Join Date
    Dec 2008
    Posts
    68
    Rep Power
    6

    Default

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

  3. #3
    tiger2000 is offline Elite Member
    Join Date
    May 2008
    Location
    Taiwan
    Posts
    296
    Rep Power
    7

    Default

    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
    dalmate is offline Elite Member
    Join Date
    Jan 2009
    Posts
    364
    Rep Power
    6

    Default

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

  5. #5
    bdial's Avatar
    bdial is offline Moderator
    Join Date
    Jul 2007
    Location
    Baltimore
    Posts
    1,649
    Rep Power
    11

    Default

    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

    Scripting zmprov with Ruby (getting stdout/stderr)

    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.

Thread Information

Users Browsing this Thread

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

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, 10: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, 09: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
  •