Utility: ddn_cmd
I wrote this command so that I could execute commands against a DataDirect Networks disk controller from inside a script. I needed to automate several tasks and this allowed me to do it efficiently. The only drawback to this utility is that you can not use it for commands that will prompt you for additional input. It is not an interactive shell, just a simple batch utility. This command has been tested on the 8500, 8000, 6000 and 3000 controllers. For additional information on this script, contact Chad Kerner
Download the latest version here.
Here are some examples of the usage of this script:
[ckerner@ckerner ckerner]$ ddn_cmd
Usage: ddn_cmd -c controller1,controller2,..
-u userid -p password -a -d -h -v
-i -o outfile -f command file command
Options:
-c Comma seperated list of controllers
-u Userid to connect with(admin by default)
-p Password of the account being used
-i Prompt for the password for each controller
-o File to hold the command output
-a Append the logfile instead of replacing it.
-h Display the help screen you are currently looking at.
-v Display the utility version information.
-d Execute in debug mode, producing ddn_cmd.debug log file.
-f File containing a list of commands to run on the controllers
Command to execute
[ckerner@ckerner ckerner]$
[ckerner@ckerner ckerner]$ ddn_cmd -c ctrlr-1 -u admin -p 'bogus_password' tier
### Controller: ctrlr-1 Command: tier
tier
Tier Status
Space
Capacity Available Disk
Tier Owner (Mbytes) (Mbytes) Status LUN List
------------------------------------------------------------------------------
1 1 1914926 433770 ABCDEFGHPS 0 12 100 101 102
2 2 1914926 59022 ABCDEFGHPS 6 17 32 41
3 1 1914926 433770 ABCDEFGHP 1 13 100 101 102
4 2 1914926 59022 ABCDEFGHP 7 18 32 41
5 1 1914926 433770 ABCDEFGHP 2 14 100 101 102
6 2 1914926 59022 ABCDEFGHP 8 19 32 41
11 1 1914926 656202 ABCDEFGHP 3 40 100 101 102
12 2 1914926 59022 ABCDEFGHP 9 20 33 41
13 1 1914926 177770 ABCDEFGHP 4 15 40 100 101 102
14 2 1914926 259022 ABCDEFGHP 10 21 33
15 1 1914926 433770 ABCDEFGHPS 5 16 100 101 102
16 2 1914926 737454 ABCDEFGHP 11 33
All disks are healthy.
Automatic disk rebuilding: Enabled
System rebuild extent: 32 Mbytes
System rebuild delay: 30
System Capacity 22979112 Mbytes, 3801616 Mbytes available.
[ckerner@ckerner ckerner]$