Valdez
Valdez

Reputation: 86

Finding the Temperature of Mellanox card and other computer components in C++

I want to log the performance of my system on very intensive network loads (Sending over 100gbps). At some point after running my network at continous >100 Gbps loads (using my own C++ implementation via winsock2) my transfer rates start dropping, more UDP packages start becomming lost, and eventually my Mellanox drivers are no longer detectable in task manager. I suspect that temperature is the culprit here, and as such I would like to collect the data of my mellanox's temperature during the execution of my application. While I am able to get the temperature of the mellanox card using the firmware tools via the command line, this is not something I can use (to my knowledge) from C++ to add it directly to my log. Does anyone know if there's a mellanox API that allows you to inquire this information from C++? I would rather not have to do system() calls and pipe data over to random files if possible.

Additionally, I would also like to see if temperature is being an issue in my CPUs, and I would like to also log this data as well. Similar to the mellanox card, an API that would allow me to find this info in C++ would be appreciated. Note that I am using windows 11 as my OS and I am not able to use Linux for this project (I'm sure that a trivial solution for it already exists in Linux).

For additional information here are the two setups:

PC 1: AMD, 128GBs DDR4 memory, Mellanox connectx-5 adapter, CPU: threadripper 3960x, Brand: Self built

PC 2: Intel, 16 GBs DDR4 memory, Mellanox connectx-5 adapter, CPU: Core i-7 11th gen, Brand: Aurora R12 Alienware

Currently I use the system() call to call the mellanox firmware tools and get the temperature, however this prints out the resulting temp to the console and it is not something that I can easily capture as most threads I've seen talk about Creating child pipes and capturing the stdouts of those. I would like to avoid this if possible.

Upvotes: 0

Views: 702

Answers (0)

Related Questions