How can I script and schedule tasks with Unity UEMCLI?
Hello Everyone,
I am looking for help with creating a few scripts with Unity uemcli, that should be kicked off by a third party scheduler.
A script that would start and pause a sync job for an asynchronous replication session.
A script that would Pause/Resume Host I/O Limits policies, that are applied to the LUNs. Not sure if this is even doable, as I did not find any commands for that in Unity 4.5 CLI guide.
I am not proficient with this kind of scripting, so if anyone can share any sample scripts, or ideas, or detailed documentation, that will be greatly appreciated.
I/O Limit Policies are set using /stor/config/iolimit
uemcli -d [mgmt-ip] /stor/config/iolimit/config -id [value] set -paused [yes|no]
You can save the username and password locally on the host where uemcli is installed so you don't have to include the password in cleartext in every command in your script:
The integrated help is also good. Just type -h after the command (e.g. uemcli -d [mgmt-ip] /prot/rep/session -h) and it will show you all the commands you can use for replication sessions in that example. For a complete tree of commands try uemcli -d [mgmt-ip] / -h
I am pretty familiar with UEMCLI commands, however I do not know how to automate them with the script. Do you have any UEMCLI sample scripts that do that: .bat, .cmd, .ps1? Not sure which ones could be used and how.
SteveK821
2 Intern
•
153 Posts
5668
1
Posted April 12th, 2019 04:00
Hi,
there are such commands.
For pausing/resuming replication sessions:
uemcli -d [mgmt-ip] /prot/rep/session -name [session-name] pause
uemcli -d [mgmt-ip] /prot/rep/session -name [session-name] resume
I/O Limit Policies are set using /stor/config/iolimit
uemcli -d [mgmt-ip] /stor/config/iolimit/config -id [value] set -paused [yes|no]
You can save the username and password locally on the host where uemcli is installed so you don't have to include the password in cleartext in every command in your script:
uemcli -d [mgmt-ip] -u [username] -securePassword -saveUser
Then type the password and it will be saved (encrypted) locally on the host.
The User Guide for CLI is here: https://support.emc.com/docu69330_Dell-EMC-Unity-Unisphere-CLI-User-Guide.pdf?language=en_US
The integrated help is also good. Just type -h after the command (e.g. uemcli -d [mgmt-ip] /prot/rep/session -h) and it will show you all the commands you can use for replication sessions in that example. For a complete tree of commands try uemcli -d [mgmt-ip] / -h