Login | Register

SNMP plugin /extension

User feature requests
Planned features for Core Temp
  • Author
    Message

SNMP plugin /extension

Postby Kareltje » Tue Aug 31, 2010 7:38 pm

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

Postby Kareltje » Tue Aug 31, 2010 8:35 pm

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
Kareltje
Registered User
Registered User
 
Posts: 6
Joined: Tue Aug 31, 2010 7:16 pm

Re: SNMP plugin /extension

Postby The Coolest » Sat Sep 04, 2010 1:41 pm

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.
Member of our O/C Folding @ Home team
"<The_Coolest> you can't unwaste wasted CPU cycles" - Start FOLDing now!
Main rig:
Core i7 2600K 3.4GHz @ 4.5GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / SSD: Crucial M4 128GB (+ HDDs) / GPU: HD5450 / Mem: 4x4GB DDR3-1600 G.Skill 4GBXL RipJaws X - 16GB total / PSU: Seasonic S12II 620W.
Secondary rig:
Core i3 540 3.06GHz @ Stock / Mobo: MSI H55M-ED55 / GPU: Integrated / Mem: 2x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 4GB total / PSU: FSP ATX350-PNR 350W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors
User avatar
The Coolest
Site Admin
Site Admin
 
Posts: 2961
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel

Re: SNMP plugin /extension

Postby Kareltje » Sat Sep 04, 2010 7:24 pm

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?

Postby Kareltje » Mon Oct 04, 2010 12:11 pm

Hi,

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


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

Re: SNMP plugin /extension

Postby The Coolest » Mon Oct 04, 2010 12:20 pm

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
Member of our O/C Folding @ Home team
"<The_Coolest> you can't unwaste wasted CPU cycles" - Start FOLDing now!
Main rig:
Core i7 2600K 3.4GHz @ 4.5GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / SSD: Crucial M4 128GB (+ HDDs) / GPU: HD5450 / Mem: 4x4GB DDR3-1600 G.Skill 4GBXL RipJaws X - 16GB total / PSU: Seasonic S12II 620W.
Secondary rig:
Core i3 540 3.06GHz @ Stock / Mobo: MSI H55M-ED55 / GPU: Integrated / Mem: 2x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 4GB total / PSU: FSP ATX350-PNR 350W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors
User avatar
The Coolest
Site Admin
Site Admin
 
Posts: 2961
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel

Re: SNMP plugin /extension

Postby Kareltje » Tue Oct 05, 2010 1:28 pm

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
Kareltje
Registered User
Registered User
 
Posts: 6
Joined: Tue Aug 31, 2010 7:16 pm

Re: SNMP plugin /extension

Postby The Coolest » Thu Oct 14, 2010 6:19 pm

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.
Member of our O/C Folding @ Home team
"<The_Coolest> you can't unwaste wasted CPU cycles" - Start FOLDing now!
Main rig:
Core i7 2600K 3.4GHz @ 4.5GHz (Scythe Mugen2) / Mobo: Biostar TP67XE / SSD: Crucial M4 128GB (+ HDDs) / GPU: HD5450 / Mem: 4x4GB DDR3-1600 G.Skill 4GBXL RipJaws X - 16GB total / PSU: Seasonic S12II 620W.
Secondary rig:
Core i3 540 3.06GHz @ Stock / Mobo: MSI H55M-ED55 / GPU: Integrated / Mem: 2x2GB DDR3-1600 G.Skill 4GBRL RipJaws - 4GB total / PSU: FSP ATX350-PNR 350W.

Core Temp - Accurate temperature monitor for Intel's Core/Core 2 and AMD64 processors
User avatar
The Coolest
Site Admin
Site Admin
 
Posts: 2961
Joined: Tue Feb 18, 2003 7:48 pm
Location: Tel Aviv, Israel

Re: SNMP plugin /extension

Postby Kareltje » Sun Oct 17, 2010 1:28 pm

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
Kareltje
Registered User
Registered User
 
Posts: 6
Joined: Tue Aug 31, 2010 7:16 pm

Re: SNMP plugin /extension

Postby hairlesshobo » Wed Jul 03, 2013 8:55 pm

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?
hairlesshobo
New User
 
Posts: 1
Joined: Wed Jul 03, 2013 8:40 pm

Re: SNMP plugin /extension

Postby alcpuGeek » Mon Jan 06, 2014 5:22 pm

Any update on this yet?
alcpuGeek
Registered User
Registered User
 
Posts: 5
Joined: Mon Jan 06, 2014 2:18 pm

Re: SNMP plugin /extension

Postby willpeixoto » Thu Feb 27, 2014 2:46 pm

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
willpeixoto
New User
 
Posts: 1
Joined: Thu Feb 27, 2014 2:39 pm

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron