BladeSystem Management Software

Sample scripts to update the DNS settings and the SNMP trap settings

Trusted Contributor

Sample scripts to update the DNS settings and the SNMP trap settings

Meg had a customer request:




I have a request/issue from a customer…



From my workstation, run a script to connect to 250 chassis, and then run the Command Line Interface (CLI) on the chassis to update the DNS settings and the SNMP trap settings.  I’m not finding any information about using the Onboard Administrator (OA) CLI with telnet and scripting examples.  From what I can tell, I need to telnet into the OA and run a script from the telnet console. I understand the CLI, but I am having difficulties with passing commands from a script to the telnet session to the OA. Is there something I am missing?



I sent them the OA users guide, but they wanted to see sample scripts etc.  I’ve done some preliminary poking around and found some scripts that Steve created.  Not sure if they would be useful for this customer.  I have sent him an email, but if anyone else knows of some script repository or doc, similar to the sample ilo scripts, that would be great.




Some of the gang sent in examples and suggestions:




David's input: 

iLO uses an XML-style “RIB-CL” structure that can be daunting to create by hand from scratch, so the sample scripts are a must.  On the other hand, all you do with OA is feed it line by line the same commands that you would type interactively, like SET [SOMETHING] [PARAMETERS].


OA has a command that IIRC goes like SHOW CONFIG SCRIPT (better double check me on this) which will spit out all of the SET commands that would put an enclosure into exactly the same configuration that this one is in now.  That’s your starting point.  Capture that output to a file and you can edit the stuff out you don’t want to affect, change arguments to commands that you want to be different, and now you’ve got a script that can be played back to an OA to configure those settings.


Taha also replied: 

You can use the OA CLI Guide:


you can create the script and store in in a text file, then pass it as a parameter to tools like putty (putty -l <username> -pw <password> -m <script location> <server IP>)





Hope this helps. Any other suggestions or sample scripts? Let us know.