|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
Recreating SDR cache before reading sensors informationHi,
I am working on a monitoring application that needs to get sensor information via IPMI every 10 seconds. I have skimmed through the source code for ipmi-sensors to learn how to use freeipmi. My question is: If I am using the same IPMI session to get sensor data, do I need to recreate the SDR cache every time before reading the data? Best regards Thanh _______________________________________________ Freeipmi-devel mailing list Freeipmi-devel@... https://lists.gnu.org/mailman/listinfo/freeipmi-devel |
|
|
Re: Recreating SDR cache before reading sensors information2012/2/24 Dinh Khac Thanh <thanhdk@...>:
> Hi, > > I am working on a monitoring application that needs to get sensor > information via IPMI every 10 seconds. I have skimmed through the source > code for ipmi-sensors to learn how to use freeipmi. > > My question is: If I am using the same IPMI session to get sensor data, do I > need to recreate the SDR cache every time before reading the data? I believe not. The cache is checked before real ipmi traffic, and it's a noop when the cache exists and is up to date. There is one sdr cache per ipmi node, which defaults to ~/.freeipmi/sdr-cache/sdr-cache-<localhost>.<ipminode> The logic resides in common code path defined in common/toolsdr/tool-sdr-cache-common.c:sdr_cache_create_and_load(), which is called by run_cmd_args(), which in turn called by _ipmi_sensors(). You can find _ipmi_sensors as callback in main function. All of them are in ipmi-sensors/ipmi-sensors.c, in the trunk(revision 8603). > > Best regards > Thanh > > _______________________________________________ > Freeipmi-devel mailing list > Freeipmi-devel@... > https://lists.gnu.org/mailman/listinfo/freeipmi-devel > Thanks, Kaiwang _______________________________________________ Freeipmi-devel mailing list Freeipmi-devel@... https://lists.gnu.org/mailman/listinfo/freeipmi-devel |
|
|
Re: Recreating SDR cache before reading sensors informationHi Dinh,
Sorry that the information is hidden a bit deep in the manpages (there's a lot of stuff in IPMI), but ... ---- This tool requires access to the sensor data repository (SDR) cache for general operation. By default, SDR data will be downloaded and cached on the local machine. The following options apply to the SDR cache. ---- Al On Fri, 2012-02-24 at 05:12 -0800, Kaiwang Chen wrote: > 2012/2/24 Dinh Khac Thanh <thanhdk@...>: > > Hi, > > > > I am working on a monitoring application that needs to get sensor > > information via IPMI every 10 seconds. I have skimmed through the source > > code for ipmi-sensors to learn how to use freeipmi. > > > > My question is: If I am using the same IPMI session to get sensor data, do I > > need to recreate the SDR cache every time before reading the data? > > I believe not. The cache is checked before real ipmi traffic, and it's > a noop when the cache exists and is up to date. There is one sdr cache > per ipmi node, which defaults to > ~/.freeipmi/sdr-cache/sdr-cache-<localhost>.<ipminode> > > The logic resides in common code path defined in > common/toolsdr/tool-sdr-cache-common.c:sdr_cache_create_and_load(), > which is called by run_cmd_args(), which in turn called by > _ipmi_sensors(). You can find _ipmi_sensors as callback in main > function. All of them are in ipmi-sensors/ipmi-sensors.c, in the > trunk(revision 8603). > > > > > > Best regards > > Thanh > > > > _______________________________________________ > > Freeipmi-devel mailing list > > Freeipmi-devel@... > > https://lists.gnu.org/mailman/listinfo/freeipmi-devel > > > > Thanks, > Kaiwang > > _______________________________________________ > Freeipmi-devel mailing list > Freeipmi-devel@... > https://lists.gnu.org/mailman/listinfo/freeipmi-devel Albert Chu chu11@... Computer Scientist High Performance Systems Division Lawrence Livermore National Laboratory _______________________________________________ Freeipmi-devel mailing list Freeipmi-devel@... https://lists.gnu.org/mailman/listinfo/freeipmi-devel |
|
|
Re: Recreating SDR cache before reading sensors informationHi Kaiwang,
Thanks for your reply. I tested with/without recreating the cache before getting the sensor data. It works fine when the cache is recreated, e.g: CPU1 Temp 46 C nominal CPU2 Temp N/A unavailable ... Fan11 N/A unavailable Intrusion N/A unavailable PS Status N/A unavailable but not when the cache is reused: PS Status N/A unavailable PS Status N/A unavailable PS Status N/A unavailable ... PS Status N/A unavailable The number of records in both cases are 30. The code is based on ipmi-sensors.c Best regards Thanh On Fri, Feb 24, 2012 at 9:12 PM, Kaiwang Chen <kaiwang.chen@...> wrote: 2012/2/24 Dinh Khac Thanh <thanhdk@...>: -- Dinh Khac Thanh You can do anything, but not everything You miss 100 percent of the shots you never take _______________________________________________ Freeipmi-devel mailing list Freeipmi-devel@... https://lists.gnu.org/mailman/listinfo/freeipmi-devel |
|
|
Re: Recreating SDR cache before reading sensors informationHi Kaiwang,
I found out that It works if I reopen the cache before getting the sensor data. Thanks anyway. Best regards Thanh On Mon, Feb 27, 2012 at 12:04 PM, Dinh Khac Thanh <thanhdk@...> wrote: Hi Kaiwang, -- Dinh Khac Thanh You can do anything, but not everything You miss 100 percent of the shots you never take _______________________________________________ Freeipmi-devel mailing list Freeipmi-devel@... https://lists.gnu.org/mailman/listinfo/freeipmi-devel |
|
|
Re: Recreating SDR cache before reading sensors informationThanh, are you using libfreeipmi instead of the ipmi-sensors
executable? I am not quite sure about your senario, anyway good news is it works as you expect. Thanks, Kaiwang 2012/2/27 Dinh Khac Thanh <thanhdk@...>: > Hi Kaiwang, > > I found out that It works if I reopen the cache before getting the sensor > data. Thanks anyway. > > Best regards > Thanh > > > On Mon, Feb 27, 2012 at 12:04 PM, Dinh Khac Thanh <thanhdk@...> wrote: >> >> Hi Kaiwang, >> >> Thanks for your reply. I tested with/without recreating the cache before >> getting the sensor data. It works fine when the cache is recreated, e.g: >> CPU1 Temp 46 C nominal >> CPU2 Temp N/A unavailable >> ... >> Fan11 N/A unavailable >> Intrusion N/A unavailable >> PS Status N/A unavailable >> >> but not when the cache is reused: >> >> PS Status N/A unavailable >> PS Status N/A unavailable >> PS Status N/A unavailable >> ... >> PS Status N/A unavailable >> >> The number of records in both cases are 30. >> The code is based on ipmi-sensors.c >> >> Best regards >> Thanh >> >> >> On Fri, Feb 24, 2012 at 9:12 PM, Kaiwang Chen <kaiwang.chen@...> >> wrote: >>> >>> 2012/2/24 Dinh Khac Thanh <thanhdk@...>: >>> > Hi, >>> > >>> > I am working on a monitoring application that needs to get sensor >>> > information via IPMI every 10 seconds. I have skimmed through the >>> > source >>> > code for ipmi-sensors to learn how to use freeipmi. >>> > >>> > My question is: If I am using the same IPMI session to get sensor data, >>> > do I >>> > need to recreate the SDR cache every time before reading the data? >>> >>> I believe not. The cache is checked before real ipmi traffic, and it's >>> a noop when the cache exists and is up to date. There is one sdr cache >>> per ipmi node, which defaults to >>> ~/.freeipmi/sdr-cache/sdr-cache-<localhost>.<ipminode> >>> >>> The logic resides in common code path defined in >>> common/toolsdr/tool-sdr-cache-common.c:sdr_cache_create_and_load(), >>> which is called by run_cmd_args(), which in turn called by >>> _ipmi_sensors(). You can find _ipmi_sensors as callback in main >>> function. All of them are in ipmi-sensors/ipmi-sensors.c, in the >>> trunk(revision 8603). >>> >>> >>> > >>> > Best regards >>> > Thanh >>> > >>> > _______________________________________________ >>> > Freeipmi-devel mailing list >>> > Freeipmi-devel@... >>> > https://lists.gnu.org/mailman/listinfo/freeipmi-devel >>> > >>> >>> Thanks, >>> Kaiwang >> >> >> >> >> -- >> Dinh Khac Thanh >> You can do anything, but not everything >> You miss 100 percent of the shots you never take > > > > > -- > Dinh Khac Thanh > You can do anything, but not everything > You miss 100 percent of the shots you never take _______________________________________________ Freeipmi-devel mailing list Freeipmi-devel@... https://lists.gnu.org/mailman/listinfo/freeipmi-devel |
|
|
Re: Recreating SDR cache before reading sensors informationHi,
Yes, I am using libfreeipmi instead of ipmi-sensors executable. Best regards, Thanh On Mon, Feb 27, 2012 at 1:31 PM, Kaiwang Chen <kaiwang.chen@...> wrote: Thanh, are you using libfreeipmi instead of the ipmi-sensors -- Dinh Khac Thanh You can do anything, but not everything You miss 100 percent of the shots you never take _______________________________________________ Freeipmi-devel mailing list Freeipmi-devel@... https://lists.gnu.org/mailman/listinfo/freeipmi-devel |
|
|
Re: Recreating SDR cache before reading sensors informationHi,
BTW, this is unlikely, but is there any more efficient way to get sensor data for one particular sensor rather than getting all sensors' data? I just need confirmation. Thanks in advance. Best regards Thanh On Mon, Feb 27, 2012 at 1:49 PM, Dinh Khac Thanh <thanhdk@...> wrote: Hi, -- Dinh Khac Thanh You can do anything, but not everything You miss 100 percent of the shots you never take _______________________________________________ Freeipmi-devel mailing list Freeipmi-devel@... https://lists.gnu.org/mailman/listinfo/freeipmi-devel |
|
|
Re: Recreating SDR cache before reading sensors informationYou can pick specific sensors via the record-ID associated with the SDR
entry. I'm not 100% sure what you're trying to program, but you may want to consider looking at the libipmimonitoring library, which is a wrapper that hides a lot of the sensor details. There is an example on the FreeIPMI webpage too. Al On Mon, 2012-02-27 at 01:50 -0800, Dinh Khac Thanh wrote: > Hi, > > BTW, this is unlikely, but is there any more efficient way to get > sensor data for one particular sensor rather than getting all sensors' > data? > I just need confirmation. Thanks in advance. > > Best regards > Thanh > > On Mon, Feb 27, 2012 at 1:49 PM, Dinh Khac Thanh <thanhdk@...> > wrote: > Hi, > > Yes, I am using libfreeipmi instead of ipmi-sensors > executable. > > Best regards, > Thanh > > > On Mon, Feb 27, 2012 at 1:31 PM, Kaiwang Chen > <kaiwang.chen@...> wrote: > Thanh, are you using libfreeipmi instead of the > ipmi-sensors > executable? I am not quite sure about your senario, > anyway good news > is it works as you expect. > > Thanks, > Kaiwang > > 2012/2/27 Dinh Khac Thanh <thanhdk@...>: > > Hi Kaiwang, > > > > I found out that It works if I reopen the cache > before getting the sensor > > data. Thanks anyway. > > > > Best regards > > Thanh > > > > > > On Mon, Feb 27, 2012 at 12:04 PM, Dinh Khac Thanh > <thanhdk@...> wrote: > >> > >> Hi Kaiwang, > >> > >> Thanks for your reply. I tested with/without > recreating the cache before > >> getting the sensor data. It works fine when the > cache is recreated, e.g: > >> CPU1 Temp 46 C nominal > >> CPU2 Temp N/A unavailable > >> ... > >> Fan11 N/A unavailable > >> Intrusion N/A unavailable > >> PS Status N/A unavailable > >> > >> but not when the cache is reused: > >> > >> PS Status N/A unavailable > >> PS Status N/A unavailable > >> PS Status N/A unavailable > >> ... > >> PS Status N/A unavailable > >> > >> The number of records in both cases are 30. > >> The code is based on ipmi-sensors.c > >> > >> Best regards > >> Thanh > >> > >> > >> On Fri, Feb 24, 2012 at 9:12 PM, Kaiwang Chen > <kaiwang.chen@...> > >> wrote: > >>> > >>> 2012/2/24 Dinh Khac Thanh <thanhdk@...>: > >>> > Hi, > >>> > > >>> > I am working on a monitoring application that > needs to get sensor > >>> > information via IPMI every 10 seconds. I have > skimmed through the > >>> > source > >>> > code for ipmi-sensors to learn how to use > freeipmi. > >>> > > >>> > My question is: If I am using the same IPMI > session to get sensor data, > >>> > do I > >>> > need to recreate the SDR cache every time before > reading the data? > >>> > >>> I believe not. The cache is checked before real > ipmi traffic, and it's > >>> a noop when the cache exists and is up to date. > There is one sdr cache > >>> per ipmi node, which defaults to > >>> > ~/.freeipmi/sdr-cache/sdr-cache-<localhost>.<ipminode> > >>> > >>> The logic resides in common code path defined in > >>> > common/toolsdr/tool-sdr-cache-common.c:sdr_cache_create_and_load(), > >>> which is called by run_cmd_args(), which in turn > called by > >>> _ipmi_sensors(). You can find _ipmi_sensors as > callback in main > >>> function. All of them are in > ipmi-sensors/ipmi-sensors.c, in the > >>> trunk(revision 8603). > >>> > >>> > >>> > > >>> > Best regards > >>> > Thanh > >>> > > >>> > _______________________________________________ > >>> > Freeipmi-devel mailing list > >>> > Freeipmi-devel@... > >>> > > https://lists.gnu.org/mailman/listinfo/freeipmi-devel > >>> > > >>> > >>> Thanks, > >>> Kaiwang > >> > >> > >> > >> > >> -- > >> Dinh Khac Thanh > >> You can do anything, but not everything > >> You miss 100 percent of the shots you never take > > > > > > > > > > -- > > Dinh Khac Thanh > > You can do anything, but not everything > > You miss 100 percent of the shots you never take > > > > > -- > Dinh Khac Thanh > You can do anything, but not everything > You miss 100 percent of the shots you never take > > > > > -- > Dinh Khac Thanh > You can do anything, but not everything > You miss 100 percent of the shots you never take Albert Chu chu11@... Computer Scientist High Performance Systems Division Lawrence Livermore National Laboratory _______________________________________________ Freeipmi-devel mailing list Freeipmi-devel@... https://lists.gnu.org/mailman/listinfo/freeipmi-devel |
| Free embeddable forum powered by Nabble | Forum Help |