ipmi interview questions
Top ipmi frequently asked interview questions
I'm working on IPMI protocol which communicates with a BMC board present in a server. I've got a doubt which basically is that can we get all the server related info(majorily boot options and reseting the system) through IPMI protocol using its commands(including RAW commands) ?
I tried to search it on internet but I didn't get much info (even on oracle's website) !
So if the answer is yes, please redirect me to the resource.
What I want is clear elaboration of the commands so that I can make use of it.
Source: (StackOverflow)
I currently am being tasked to cross-reference ENVSTAT data with IPMITOOL data. I managed to get envstat working well without too much pain, but I have been stuck at configuring iPMITOOL for quite awhile now.
As far as I am aware, the only way to use IPMITOOL is using a valid IP. This shouldn't be a problem, as I could just direct it to either the computers main address or just '127.0.0.1'. I do the following command:
ipmitool -I lanplus -H 127.0.0.1 -U root -P <password> chassis status
as well as
ipmitool -I lanplus -H <IP_ADDRESS> -U root -P <password> chassis status
on two different computers which result in the same output:
Error: UNable to establish IPMI v2 / RMCP+ session
Error: sending Chassis Status command
I am working on a Mac station with NetBSD on a local VM.
My question is twofold:
Can you use ipmitool
to gather local data?
How do you configure ipmitool
and/or the OS to accept ipmitool
commands?
Source: (StackOverflow)
I'm using OpenIMPI library for managing Shelf Manager (Pigeon Point ShMM-500)
After creatinf domain and verifying all connection arguments setup_done_handler returns an error
33554450
I'm using OpenIPMI macroses for decoding error. This error is RMCP+ error, and real error code is
18
That error occures after sending RMCP+ Open Session Request and getting RMCP+ Open Session Response
This error occures not permanent and the multiple rebooting of Shelf Manager can solve this problem, but sometimes I need 10 or 15 reboots before I will be succesfully connected to ShMM.
Does somebody know, what that error means?
Thanks in advance.
Source: (StackOverflow)
What's the schedule class and priority of kipmi0 supposed to be?
I checked some servers and the ps output of kipmi0 was:
STARTED USER PID PPID PGID TT TID %MEM %CPU VSZ CLS NI PRI STAT WCHAN COMMAND
Nov 03 root 52 2 0 ? 52 0.0 0.0 0 TS 19 0 SN ipmi_thread \_ [kipmi0]
Seems the kipmi0 kernel thread should be TS schedule which means SCHED_OTHER.
While for one of my server(Redhat5.x 2.6.18-238.el5), it's RR which means SCHED_RR:
STARTED USER PID PPID PGID TT TID %MEM %CPU VSZ CLS NI PRI STAT WCHAN COMMAND
Dec 04 root 1755 79 1 ? 1755 0.0 0.6 0 RR - 139 SN ? \_ [kipmi0]
Does anyone know any factor which may cause such situation?
Source: (StackOverflow)
I would like to monitoring the consumption of energy of my notebook.
I like of IPMI and installed.
After install, I loaded all modules and run the ipmitool command and show the follow error:
ipmitool -I open chassis power status
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Unable to get Chassis Power Status**
The output dmesg is:
ipmi message handler version 39.2
ipmi device interface
IPMI System Interface driver.
ipmi_si: probing via hardcoded address
ipmi_si: Adding hardcoded-specified kcs state machine<
ipmi_si: Trying hardcoded-specified kcs state machine at i/o address 0xca2, slave address 0x0, irq 0
ipmi_si: Interface detection failed
Anybody can help me?
Thank you!!
Source: (StackOverflow)
I've been having quite a time trying to use IPMI tools (such as OpenIPMI, FreeIPMI, and ipmitool) to discover and monitor a PCI device in my server. Using an IBM server going through IMM over the network using the IPMI tools, I can't seem to be able to get any information on the PCI devices in the server. The IPMI tools only return basic information on the system such as the BMC, chassis, power supplies, fans, etc. No information on the devices plugged into the PCI slots.
I've tried basic commands like "fru list", "sdr elist", etc. and haven't been able to get any information from the PCI slots.
Just hoping someone has had experience using these tools and is able to get information from the devices in the PCI slots.
Specifically, I would like to get the FRU information as well as device ID, I2C slave address, etc. for accessing the device.
Thanks for any information that you can provide...
Source: (StackOverflow)
I see in the ipmitool there is an "add" command in the sel menu. It wants a file, but what format for that file is it expecting?
> ipmitool sel add file.txt
> Invalid Event: 0000f8b601000000
From the doc: http://man.he.net/man1/ipmitool
add
Read event entries from a file and add them to the SEL.
New SEL entries area added onto the SEL after the last
record in the SEL. Record added is of type 2 and is
automatically timestamped.
Source: (StackOverflow)
I'm using ipmiutils to look at a device and I see there is an ID column and an SNUM column. I've scanned the IPMI specification (it's huge -- just scanned) and the ipmiutils docs but can't find exactly what these mean.
Is one or the other stable, meaning (for example) that value 13 would always be the first fan in that particular chassis?
As far as I can tell, the values don't change, but I also don't have hot-swappable devices to plug in which could possibly alter what IPMI can report on.
Source: (StackOverflow)
Is there API for obtaining ipmi fru raw bytes?
I need to work with custom FRU data. I've tried to use freeipmi library - but it seems it has only API to access custom fields and does not expose API to read whole fru buffer.
Source: (StackOverflow)
As given in the below link
http://ipmiutil.sourceforge.net/docs/ipmisw-compare.htm
That there is a library API for IpmiTool called libipmitool.
But I am not able to find any document/link/ or any user/programmer guide for IpmiTool's lib API.
I can only find lib API for openIPMI and FreeIPMI.
Could you please help in getting information on IpmiTool lib API ?
Thanks
S sarath
Source: (StackOverflow)
I try to connect with the IPMI remote connection(KVM) without the use op the webbrowser or IPMIview tool. But so far no luck.
The first think that I did is launching the "jviewer.jnlp" with javaws. This file will be created by the IPMI website if you push the "Remote Connection" button. This solution works until the web session is closed. I try to replace the encrypted argument with the username and password. But somehow there is session id embedded.
jviewer.jnpl file:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="https://192.168.99.201/Java">
<information>
<title>JViewer</title>
<vendor>American Megatrends, Inc.</vendor>
<description kind="one-line">JViewer Console Redirection Application</description>
<description kind="tooltip">JViewer Console Redirection Application</description>
<description kind="short">
JViewer enables a user to view the video display of managed server via KVM.
It also enables the user to redirect his local keyboard, mouse for managing the server remotely.
</description>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.5+"/>
<jar rel='nofollow' href="release/JViewer.jar"/>
</resources>
<resources os="Windows" arch="x86">
<j2se version="1.5+"/>
<nativelib rel='nofollow' href="release/Win32.jar"/>
</resources>
<resources os="Windows" arch="amd64">
<j2se version="1.5+"/>
<nativelib rel='nofollow' href="release/Win64.jar"/>
</resources>
<resources os="Linux" arch="x86">
<j2se version="1.5+"/>
<nativelib rel='nofollow' href="release/Linux_x86_32.jar"/>
</resources>
<resources os="Linux" arch="i386">
<j2se version="1.5+"/>
<nativelib rel='nofollow' href="release/Linux_x86_32.jar"/>
</resources>
<resources os="Linux" arch="x86_64">
<j2se version="1.5+"/>
<nativelib rel='nofollow' href="release/Linux_x86_64.jar"/>
</resources>
<resources os="Linux" arch="amd64">
<j2se version="1.5+"/>
<nativelib rel='nofollow' href="release/Linux_x86_64.jar"/>
</resources>
<resources os="Mac OS X" arch="i386">
<j2se version="1.5+"/>
<nativelib rel='nofollow' href="release/Mac32.jar"/>
</resources>
<application-desc>
<argument>192.168.99.201</argument>
<argument>5901</argument>
<argument>Hnda9A159AwMjwnF</argument>
<argument>0</argument>
<argument>0</argument>
<argument>5120</argument>
<argument>5123</argument>
<argument>511</argument>
<argument>5900</argument>
<argument>1</argument>
<argument>EN</argument>
<argument>HEWKovXQO2Fp7FEMho6LrM4kzTPFHPyB000</argument>
</application-desc>
</jnlp>
The argument username and password replacement will work if the jnlp is named as "launch.jnlp" Some Supermicro IPMI version will use a different structure.
Second I try to connect with the IPMIview tool version 2.9.32. That work so the connection is ok. Know I try the connect by using the jars of the IPMIview. Replace the host with the IPMI IP
java -Djava.library.path=. -jar iKVM.jar host ADMIN ADMIN null 5900 2623 2 0
This will open the remote connection but gives a "Connection failed" error.
java -Djava.library.path=. -jar JViewerX9.jar host ADMIN ADMIN
Also the same result: Connection failed
The connection failed comes with a warning box. On OK is closed the application
Some IPMI info:
# ipmitool mc info
Device ID : 32
Device Revision : 1
Firmware Revision : 2.4
IPMI Version : 2.0
Manufacturer ID : 47488
Manufacturer Name : Unknown (0xB980)
Product ID : 43707 (0xaabb)
Product Name : Unknown (0xAABB)
Device Available : yes
Provides Device SDRs : no
Additional Device Support :
Sensor Device
SDR Repository Device
SEL Device
FRU Inventory Device
IPMB Event Receiver
IPMB Event Generator
Chassis Device
Aux Firmware Rev Info :
0x01
0x00
0x00
0x00
A cold reset "ipmitool mc reset cold" also does not work.
I hope that someone knows what the argument mean for the jnlp file or the someone has a working solution for this problem
Edit:
I try the answer of Maxim Akristiniy and came up with the following code:
package com.thalesgroup.nl.perftools;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.util.List;
import com.gargoylesoftware.htmlunit.BrowserVersion;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.ScriptResult;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.WebResponse;
import com.gargoylesoftware.htmlunit.html.HtmlForm;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.gargoylesoftware.htmlunit.html.HtmlPasswordInput;
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
import com.gargoylesoftware.htmlunit.util.Cookie;
public class IpmiRemoteViewer {
public static void main(String[] args)
throws FailingHttpStatusCodeException, MalformedURLException,
IOException {
String username = "ADMIN";
String password = "ADMIN";
String ip = "192.168.99.150";
final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_17);
webClient.getOptions().setThrowExceptionOnScriptError(false);
webClient.getCookieManager().setCookiesEnabled(true);
webClient.getOptions().setUseInsecureSSL(true);
webClient.getOptions().setJavaScriptEnabled(true);
webClient.getCookieManager().addCookie(
new Cookie(ip, "WEBVAR_USERNAME", username));
webClient.getCookieManager().addCookie(
new Cookie(ip, "WEBVAR_PASSWORD", password));
HtmlPage page1 = webClient.getPage("http://" + ip);
List<HtmlForm> forms = page1.getForms();
if (!forms.isEmpty()) {
HtmlForm form = forms.get(0);
HtmlSubmitInput button = (HtmlSubmitInput) form.getInputsByValue(
"Login").get(0);
// username
HtmlTextInput textField = form.getInputByName("T1");
textField.setValueAttribute(username);
// password
HtmlPasswordInput textField2 = form.getInputByName("T2");
textField2.setValueAttribute(password);
HtmlPage page2 = button.click();
webClient.waitForBackgroundJavaScript(500);
// Do it again
form = page2.getForms().get(0);
// username
textField = form.getInputByName("T1");
textField.setValueAttribute(username);
// password
textField2 = form.getInputByName("T2");
textField2.setValueAttribute(password);
ScriptResult scriptResult = page2.executeJavaScript("DoLogin();");
// Print the index.html page
System.out.println(scriptResult.getNewPage().toString());
// Print the session id
for (Cookie cookie : webClient.getCookieManager().getCookies()) {
if (cookie.getName().equals("SessionCookie")) {
String sessionId = cookie.getValue();
System.out.println("Session id = " + sessionId);
}
}
// Download the jviewer.jnlp file
Page page5 = webClient.getPage("http://" + ip
+ "/Java/jviewer.jnlp?EXTRNIP=" + ip + "&JNLPSTR=JViewer");
WebResponse response = page5.getWebResponse();
InputStream inputStream = response.getContentAsStream();
writeToFile("viewer.jnlp", inputStream);
}
}
protected static void writeToFile(String filename, InputStream inputStream) {
OutputStream outputStream = null;
try {
File file = new File(filename);
// write the inputStream to a FileOutputStream
outputStream = new FileOutputStream(file);
int read = 0;
byte[] bytes = new byte[1024];
while ((read = inputStream.read(bytes)) != -1) {
outputStream.write(bytes, 0, read);
}
} catch (IOException e) {
e.printStackTrace();
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (outputStream != null) {
try {
outputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}
Only now it will write the login page in the viewer.jnlp file. Still no luck. I managed to read the index.html page that is behind the login page. But the session is closing very fast.
Source: (StackOverflow)
I need to test some ipmitool commands. I dont have a server with ILO/IDRAC installed. Is there a simulator which can mimic as the IPMI server?(or) Can I use any virtual box/Qemu/KVM virtual machines to implement the IPMI drivers and test them over LAN? Are there any documentation of such kind?
Please suggest. Thanks.
Source: (StackOverflow)
While reading about serial over LAN, I came across this words.
"This can be used to enable asynchronous serial based OS and pre-OS communication over a connection to the Soc"
In the above sentence what is meant by "asynchronous serial based OS" and "pre-OS communication"
Source: (StackOverflow)
How to get with IPMI enabled on your Dell iDRAC 5/6/7 the disk volumes and raid volumes?
At this moment we only get the status and fan speed.
We couldn't find any documentation about the disk part.
Kind regards
Source: (StackOverflow)
I don't see the option of PASSWORD authentication at my IPMI channel 1 settings output. I even tried factory reset. Can you please let me know how I can enable the password authentication.
$ipmitool lan print 1
Auth Type Support : MD2 MD5 OEM
Auth Type Enable : Callback : MD2 MD5 OEM
: User : MD2 MD5 OEM
: Operator : MD2 MD5 OEM
: Admin : MD2 MD5 OEM
: OEM :
Source: (StackOverflow)