03-10-2012 06:37 AM - edited 03-01-2019 10:19 AM
Hi,
I'm trying to automate some CIMC CLI commands to show the inventory of C-Series servers, i.e. show CPU, show hdd, etc. Typically I use Putty to SSH to the CIMC and run each command manually. I'd like to automate this process and save the results to a text file. So I tried using plink.exe to run:
c:\plink.exe -ssh -P 22 192.168.48.176 -l admin -pw password -m cimc_commands.txt >output.txt
But when I do this, i get: "No entry for terminal type "dumb"; using dumb terminal settings." and it just hangs.
If I just use:
c:\plink.exe -ssh -P 22 192.168.48.176 -l admin -pw password
I can log on to the CIMC and manually run commands, so it's got something to do with running the commands from a text file.
Anyone know what I'm doing wrong? Or am I going about this all wrong and there's a better way?
Thanks,
Dave
06-13-2012 08:24 AM
can someone at cisco please reply with some advice to this thread??? I am getting the same replies using both plink and with sshpass. Note that if, when using sshpass, you dont pass in a command, you immediately get to an interactive shell if the command line is omitted. However, my goal is to programmatically run a CIMC command "show chassis detail" to retrieve the server serial number (because it doesnt appear to be visible via snmp).
06-13-2012 09:32 AM
Mike,
goUCS is the best tool to automate tasks. To get more information about XML API support, I would suggest you to post your query here
http://developer.cisco.com/web/unifiedcomputing/forums
UCS Rack-Mount Servers CIMC XML API Programmer’s Guide
http://www.cisco.com/en/US/docs/unified_computing/ucs/c/sw/api/cimc_api_book_chapter1.html
HTH
Padma
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: