SNMP plugin /extension

User feature requests
Planned features for Core Temp
Post Reply
Kareltje
Registered User
Registered User
Posts: 6
Joined: Tue Aug 31, 2010 7:16 pm

SNMP plugin /extension

Post by Kareltje »

Hi,

I'm working on a SNMP plugin based on the work that has been done for the SpeedFan application.
I'm not such a good coder but I kind of need it and it seems a nice project to work on.
I have got all the examples working an I can register the SNMP extension but when the SNMP extension tries to load the data, either via the DLL or the LIB I run into the following problem:

With the static library load:
Error: Core Temp's shared memory could not be read.
Error number: 183
Error description: The operation completed successfully

With the dynamic load:
Error: Core Temp's shared memory could not be read.
Error number: 183
Error description: The system cannot find the file specified.

As I said if I compile and try the demo program it works fine without any problem.

I know the DLL itself (GetCoreTempInfo.dll) gets loaded since it is in the process explorer and I get a whole different error when it doesn't get loaded.

It fails on

Code: Select all

GetCoreTempInfo = (fnGetCoreTempInfo)GetProcAddress(hCT, "fnGetCoreTempInfo");
or

Code: Select all

bRet = fnGetCoreTempInfoAlt(m_pCoreTempData);
depending on the way you load the library.

I suspect it has something to do with SNMP first loading my program as a DLL and then trying access the function from the GetCoreTempInfo dll and then the dll trying to access the coretemp data.
What I also do not get is the different error messages with the same code and a 183 error for that matter, I would have expected a no function found or something.

I have tried running coretemp as admin and placed the dll on various location but as I said I know it gets loaded since it is in memory.

Does someone have any ideas how to do this or what I'm doing wrong?
I'm compiling 64bit but also tried 32bit and also tried the Alt function.

Kind regards,

Karel

Kareltje
Registered User
Registered User
Posts: 6
Joined: Tue Aug 31, 2010 7:16 pm

Re: SNMP plugin /extension

Post by Kareltje »

Ok a small addition to this story.
I tried a small experiment with starting the SNMP service from the command line and starting the CoreTemp from that same commandline and then it works.
Still some bugs to iron out but at least it responds.

The problem here seems to be that the CoreTemp application is running in a different memory location / authority or something and can't be accessed by the SNMP service.
I have tried running the service as the same user via the "log on as" feature with the service but that didn't help either.

It seems have to do with making data accessible in global memory.
msdn explains
No clue how difficult this would be to do for CoreTemp but it would sure help.

Regards,

Karel

User avatar
The Coolest
Site Admin
Site Admin
Posts: 3379
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel
Contact:

Re: SNMP plugin /extension

Post by The Coolest »

Interesting. Core Temp doesn't use "Global" at this time, I'll what I can do to fix it.
I need to think whether I'll create a new global shared memory block or somehow link the existing block to a new location.
Main rig:
AMD Ryzen 9 5950X (True Spirit 140 Direct) / Mobo: Asrock Fatal1ty X470 / EVO 970 500GB + WD Blue 250GB + HDD / GPU: Dell RX 570 4GB / Mem: 2x16GB DDR4-3200 G.Skill 32GTZKW TridentZ - 32GB total / PSU: Seasonic Prime Ultra Gold 650W
NAS:
Core i7 2600K 3.4GHz @ 4.3GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / 2x Inland Pro 120GB + HDDs / GPU: ATi Mach64 VT2 / Mem: 4x4GB DDR3-1600 G.Skill 8GBXL RipJawsX - 16GB total / PSU: Seasonic S12II 620W.
Secondary rigs:
Core i3 7130U / MiniPC / SanDisk SDSSDP-128G / GPU: Intel HD 620 / Mem: 1x8GB DDR3L-1600
Xeon X3430 2.40GHz @ 3.06GHz or Core i3 540 3.06GHz @ 4.0GHz (Freezer 7 Pro) / Mobo: MSI H55M-ED55 / PNY CS1111 240GB / GPU: ATI FirePro V3800 / Mem: 4x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 8GB total / PSU: Seasonic S12II 620W
AMD Phenom II X4 B93 / Mobo: ASUS M2A-VM / GPU: ATI Radeon Xpress X1250 / Crucial M4 120GB / Mem: 2x2GB DDR2-800 - 4GB total / PSU: Antec 380W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors

Kareltje
Registered User
Registered User
Posts: 6
Joined: Tue Aug 31, 2010 7:16 pm

Re: SNMP plugin /extension

Post by Kareltje »

That would be great!
I'm not sure the "Global" thing is the proper way to do it but it provides a great workaround.
As soon as you have an idea how and if you're going to implement it please let me know.
I will adapt the code and make it available to everyone, in it's current state it is a bit of a hack.
I now have another dll that runs as the user and copies the structure to global memory every second after which the snmp dll picks it up.
This gets the job done but sure isn't pretty.

The SNMP makes a great addition to the program I think and it really works well to monitor my windows server farm via cacti :)



Karel

Kareltje
Registered User
Registered User
Posts: 6
Joined: Tue Aug 31, 2010 7:16 pm

shared memory?

Post by Kareltje »

Hi,

Did you get around to implement a shared memory trick in the new version?


Karel

User avatar
The Coolest
Site Admin
Site Admin
Posts: 3379
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel
Contact:

Re: SNMP plugin /extension

Post by The Coolest »

Not in this version. I'm still trying to think on how to implement this.
I still want to keep compatibility with other addons and applications, this means the current implementation has to stay. I also need to create a new implementation, in which format and structure layout may change for more flexibility.
So I will hopefully have it done by the release of 1.0
Main rig:
AMD Ryzen 9 5950X (True Spirit 140 Direct) / Mobo: Asrock Fatal1ty X470 / EVO 970 500GB + WD Blue 250GB + HDD / GPU: Dell RX 570 4GB / Mem: 2x16GB DDR4-3200 G.Skill 32GTZKW TridentZ - 32GB total / PSU: Seasonic Prime Ultra Gold 650W
NAS:
Core i7 2600K 3.4GHz @ 4.3GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / 2x Inland Pro 120GB + HDDs / GPU: ATi Mach64 VT2 / Mem: 4x4GB DDR3-1600 G.Skill 8GBXL RipJawsX - 16GB total / PSU: Seasonic S12II 620W.
Secondary rigs:
Core i3 7130U / MiniPC / SanDisk SDSSDP-128G / GPU: Intel HD 620 / Mem: 1x8GB DDR3L-1600
Xeon X3430 2.40GHz @ 3.06GHz or Core i3 540 3.06GHz @ 4.0GHz (Freezer 7 Pro) / Mobo: MSI H55M-ED55 / PNY CS1111 240GB / GPU: ATI FirePro V3800 / Mem: 4x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 8GB total / PSU: Seasonic S12II 620W
AMD Phenom II X4 B93 / Mobo: ASUS M2A-VM / GPU: ATI Radeon Xpress X1250 / Crucial M4 120GB / Mem: 2x2GB DDR2-800 - 4GB total / PSU: Antec 380W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors

Kareltje
Registered User
Registered User
Posts: 6
Joined: Tue Aug 31, 2010 7:16 pm

Re: SNMP plugin /extension

Post by Kareltje »

Hi,

Great to hear that you are still considering it as an option to add!
If you need any testing I will be happy to assist :)

Karel

User avatar
The Coolest
Site Admin
Site Admin
Posts: 3379
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel
Contact:

Re: SNMP plugin /extension

Post by The Coolest »

Just thought I'd update this post.
The next version will include an option in the Advanced tab of the settings box to enable global shared memory block in addition to the standard shared memory block.
This option will be disabled by default, so you will have to enable it.
Main rig:
AMD Ryzen 9 5950X (True Spirit 140 Direct) / Mobo: Asrock Fatal1ty X470 / EVO 970 500GB + WD Blue 250GB + HDD / GPU: Dell RX 570 4GB / Mem: 2x16GB DDR4-3200 G.Skill 32GTZKW TridentZ - 32GB total / PSU: Seasonic Prime Ultra Gold 650W
NAS:
Core i7 2600K 3.4GHz @ 4.3GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / 2x Inland Pro 120GB + HDDs / GPU: ATi Mach64 VT2 / Mem: 4x4GB DDR3-1600 G.Skill 8GBXL RipJawsX - 16GB total / PSU: Seasonic S12II 620W.
Secondary rigs:
Core i3 7130U / MiniPC / SanDisk SDSSDP-128G / GPU: Intel HD 620 / Mem: 1x8GB DDR3L-1600
Xeon X3430 2.40GHz @ 3.06GHz or Core i3 540 3.06GHz @ 4.0GHz (Freezer 7 Pro) / Mobo: MSI H55M-ED55 / PNY CS1111 240GB / GPU: ATI FirePro V3800 / Mem: 4x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 8GB total / PSU: Seasonic S12II 620W
AMD Phenom II X4 B93 / Mobo: ASUS M2A-VM / GPU: ATI Radeon Xpress X1250 / Crucial M4 120GB / Mem: 2x2GB DDR2-800 - 4GB total / PSU: Antec 380W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors

Kareltje
Registered User
Registered User
Posts: 6
Joined: Tue Aug 31, 2010 7:16 pm

Re: SNMP plugin /extension

Post by Kareltje »

That is great!

When you do release the update I will try and release the plugin the same week. Depends a bit on my schedule and everything.

Karel

hairlesshobo
New User
Posts: 1
Joined: Wed Jul 03, 2013 8:40 pm

Re: SNMP plugin /extension

Post by hairlesshobo »

I know that this is an extremely old thread, but I have CoreTemp running on all of my HTPC clients and I can monitor everything else with Cacti via SNMP but would love to find a way to throw in the data from CoreTemp as well. Any chance you finished up this plugin?

alcpuGeek
Registered User
Registered User
Posts: 5
Joined: Mon Jan 06, 2014 2:18 pm

Re: SNMP plugin /extension

Post by alcpuGeek »

Any update on this yet?

willpeixoto
New User
Posts: 1
Joined: Thu Feb 27, 2014 2:39 pm

Re: SNMP plugin /extension

Post by willpeixoto »

Kareltje how u do to get this information with SNMP .. im working in some way to monitor my cpus also..
Can u help me with this solution ?
thanks

Post Reply

Return to “Development”