Server Management - Remote Server Management
1748051 Members
5148 Online
108757 Solutions
New Discussion

Re: Great. I shall test that later on and post the results....

 
silviudc
Occasional Advisor

Re: Great. I shall test that later on and post the results....

Ok quick question, the variable ServerName, can that be the ILO ip (if yes then what is the format) or just the ILO name?

 

I have tried ILO name for your ServerName variable and I get this response:

 

 

"HTTP/1.1 405 Method Not Allowed\r\nContent-Type:text/html\r\n\r\n<HTML><HEAD><TITLE>Remote Insight</TITLE></HEAD><BODY>\r\n<H1>Request Error</H1>\r\nHTTP/1.1 405 Method Not Allowed\r\n</BODY></HTML>\r\n"

 

When sending this text to it:

 

string test = doiLO2Request("<RIBCL VERSION='2.0'>"
                            + "<LOGIN USER_LOGIN='Administrator' PASSWORD='password'>"
                            + "<SERVER_INFO MODE='read'><GET_HOST_DATA /></SERVER_INFO>"
                            + "</LOGIN>"
                            + "</RIBCL>");

 

 The thing is if I run that from the command line with CPQLOCFG, works just fine.

 

Thanks

rmcateer
Occasional Advisor

Re: Great. I shall test that later on and post the results....

ServerName can be the host name or in IPv4 format something like "192.168.0.100". I think you will the <?xml version=\"1.0\"?> part in your command.

silviudc
Occasional Advisor

Re: Great. I shall test that later on and post the results....

Yes you were right, that's what was missing. Seems it is required for ilo2 but not for 3 and 4.

Now if only there was a way to check all versions with the same code, instead of running the same thing twice basically.

 

If I run the ilo 2 pull on ilo 3 and 4 it seems it always gets Login credentials rejected:

 

"<?xml version=\"1.0\"?>\r\n<RIBCL VERSION=\"2.22\"/>\n<RESPONSE\n    STATUS=\"0x0000\"\n    MESSAGE='No error'\n     />\n</RIBCL>\n<?xml version=\"1.0\"?>\r\n<RIBCL VERSION=\"2.22\"/>\n<RESPONSE\n    STATUS=\"0x0000\"\n    MESSAGE='No error'\n     />\n<INFORM>Scripting utility should be updated to the latest version.</INFORM>\n</RIBCL>\n<?xml version=\"1.0\"?>\r\n<RIBCL VERSION=\"2.22\"/>\n<RESPONSE\n    STATUS=\"0x005F\"\n    MESSAGE='Login credentials rejected.'\n     />\n</RIBCL>\n"

 

rmcateer
Occasional Advisor

Re: Great. I shall test that later on and post the results....

I hear you on wanting a nice way to determine which version of ilo is running, but I do the "run the same thing twice" style of detection as well. I do ilo 3 first, assuming that ilo 2 will eventually disappear over time. I have a seperate detection phase where I determine the ilo version for a server. During the detection phase I use a short request.timeout so if the machine actually is ilo 2 I don't hang around for too long, but during other operatioins I use a much longer request.timeout because some of the operations take a long time (IIRC getting the status of the fans can take a long time, or maybe it was the "check health" call).

 

silviudc
Occasional Advisor

Re: Great. I shall test that later on and post the results....

Yes, that's exactly what I'm doing, try ilo3 then revert back to ilo2 depending on the response.

One could just run the get fw version script off all the servers and determine the ilo version that way then run the correct getilo#response but it will be longer to execute due to timeouts etc...

Trying both ilo scripts isn't too bad takes < 10 mins for ~100 servers which can be improved further but still this information would take a few hours to get manually :)

 

What is a good timeout value for getilo3 method, just so that you don't miss any legit servers which might take a bit longer to respond?

Anonymous
Not applicable

Re: Great. I shall test that later on and post the results....

Another way to work out the iLO version is to query the device itself via RIMP URL:

 

http://iLOHostName/xmldata?item=ALL

 

the <PN> XML Tag will give you the data.

 

The iLO PS Library I wrote (http://practicaladmin.wordpress.com/ilo-ps-library/) has a get-iLOInfo function that can return all this information in object form if thats useful.

 

Cheers

rmcateer
Occasional Advisor

Re: Great. I shall test that later on and post the results....

That RIMP stuff is cool, never stumbled on it when I was going RIBCL work... too bad.

 

I use 10 seconds for the TCP timeout when I am doing a iLO 3 detection via httpwebrequest. Just an arbitrary choice.