Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-20-2009, 02:00 AM
New Member
 
Posts: 4
Default [SOLVED] 'zmprov ma' returns null

Hi,
I want to capture the output of the 'zmprov ma' command from CLI. But the problem is that the command returns null when, for example I try to change the account status to 'active' when the account is already 'active' which is the same when the account was previously in 'locked' state.

I need to differentiate between the two actions by the command's return value. Can u help me to work around this little problem?
Reply With Quote
  #2 (permalink)  
Old 05-20-2009, 04:49 AM
Partner (VAR/HSP)
 
Posts: 67
Default

I'm guessing the only way to accommodate this would be to run a 'zmprov ga' and check for your value, run the 'zmprov ma', and then run the 'zmprov ga' to see if it changed. I understand that this running 2 extra commands, but I believe returning (null) is standard for success in a *NIX environment.

Just a thought!

Cheers,
Dusty
__________________
CoSentry - www.cosentry.com - Co-Location & Business Resiliency Solutions
Reply With Quote
  #3 (permalink)  
Old 05-20-2009, 05:09 AM
New Member
 
Posts: 4
Default Nice thought ;)

Hi Dusty,
The problem is when i have to run the command for multiple users(like 1000 or more). In that case those 2 extra commands would be quite an overhead...

Any other workarounds?

Cheers,
Nishant.
Reply With Quote
  #4 (permalink)  
Old 05-20-2009, 05:30 AM
Moderator
 
Posts: 1,554
Default

if you're concerned about performance you should probably look at doing a custom soap script, the startup/teardown overhead associated with zmprov is pretty great thats why it takes a few seconds to execute any commands.

you could try running zmprov with the -v (verbose) or -d (debug) options and see if that produces any output that could be helpful for you but I doubt it will because when you do a zmprov ma you're just changing the value of a field and it really does not care what the existing value was.
Reply With Quote
  #5 (permalink)  
Old 05-20-2009, 06:50 AM
New Member
 
Posts: 4
Default

Running zmprov with -d(debug) does help. Now i can run grep on the output. This is much lighter with very low overhead.
Though this still leaves a lot of scope for improvement. May be custom soap scripts will help.

Thanks n Cheers,
Nishant.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.