cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4053
Views
0
Helpful
2
Replies

Script CIMC commands over SSH?

davidfafel
Level 1
Level 1

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

2 Replies 2

hollowaymike
Level 1
Level 1

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). 

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

Review Cisco Networking products for a $25 gift card