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?
[SOLVED] 'zmprov ma' returns null
[SOLVED] 'zmprov ma' returns null
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
Just a thought!
Cheers,
Dusty
-
- Posts: 4
- Joined: Sat Sep 13, 2014 12:25 am
[SOLVED] 'zmprov ma' returns null
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.
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.
[SOLVED] 'zmprov ma' returns null
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.
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.
-
- Posts: 4
- Joined: Sat Sep 13, 2014 12:25 am
[SOLVED] 'zmprov ma' returns null
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.
Though this still leaves a lot of scope for improvement. May be custom soap scripts will help.
Thanks n Cheers,
Nishant.