Jump to content


Photo

Cpu Usage Dll V2.0


  • Please log in to reply
37 replies to this topic

#1 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 16 January 2007 - 02:22 PM

This DLL retrieves the number of processors and the usage of each processor.

Screenshot:
(link removed)

(link removed)

Edited by h0bbel, 19 September 2013 - 06:53 PM.

  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#2 BrainWare

BrainWare

    Adrenaline

  • GMC Member
  • 791 posts

Posted 16 January 2007 - 02:43 PM

Hurra!
It seems that it does not support dual/quad core pc's tho...

Cheers
  • 0

#3 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 16 January 2007 - 03:38 PM

Hurra!
It seems that it does not support dual/quad core pc's tho...

Cheers

<{POST_SNAPBACK}>


What kinda error do you get ?
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#4 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 16 January 2007 - 05:02 PM

only reads the usage of one core rather than both
  • 0

Chris Matthews, Co-Leader of Digital X

#5 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 16 January 2007 - 05:53 PM

Hm,

Its the damnedest thing i just have a Athlon 2600+ :D
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#6 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 16 January 2007 - 06:16 PM

try enumerating all processors installed on the users pc and then do the usage function for each one and add the total :D
  • 0

Chris Matthews, Co-Leader of Digital X

#7 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 16 January 2007 - 06:36 PM

try enumerating all processors installed on the users pc and then do the usage function for each one and add the total ;)

<{POST_SNAPBACK}>


Do multi core processors have separated usage monitoring ? :D
Sorry, I've never used a multi core PC. :)

Edited by h0bbel, 16 January 2007 - 06:39 PM.

  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#8 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 16 January 2007 - 06:47 PM

I'm not too sure but its worth a try :D
  • 0

Chris Matthews, Co-Leader of Digital X

#9 coolsmile

coolsmile

    Programmer

  • New Member
  • 1346 posts

Posted 16 January 2007 - 08:12 PM

I have a dual core laptop :D, it sometimes shows nothing, and depending on the processor, it will show nothing or something :)
  • 0

#10 BrainWare

BrainWare

    Adrenaline

  • GMC Member
  • 791 posts

Posted 16 January 2007 - 08:23 PM

try enumerating all processors installed on the users pc and then do the usage function for each one and add the total ;)

<{POST_SNAPBACK}>


Do multi core processors have separated usage monitoring ? :D
Sorry, I've never used a multi core PC. :)

<{POST_SNAPBACK}>


Yeah, it does monitor the cpu's seperatly

[img]
http://img107.imageshack.us/img107/6847/asdfws5.png
[/img]
(It's in dutch tough, I started an inf-loop with gamemaker to let the usage skyrocket ;) )

I think you can figure it out ^.^ .

Cheers

Edited by BrainWare, 16 January 2007 - 08:25 PM.

  • 0

#11 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 16 January 2007 - 09:34 PM

try enumerating all processors installed on the users pc and then do the usage function for each one and add the total :lol:

<{POST_SNAPBACK}>


Do multi core processors have separated usage monitoring ? :D
Sorry, I've never used a multi core PC. :)

<{POST_SNAPBACK}>


Yeah, it does monitor the cpu's seperatly

[ img ]
(It's in dutch tough, I started an inf-loop with gamemaker to let the usage skyrocket ;) )

I think you can figure it out ^.^ .

Cheers

<{POST_SNAPBACK}>


I'm dutch so it wasn't brain cracking to figure it out :D
But thanks for making that screen shot ;)
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#12 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 16 January 2007 - 10:09 PM

Finally a good cpu usage dll. I started thinking it wasn't going to be done.:D
Could i ask what winAPI function does it use? No need for the details.
Regards,
  • 0

#13 tangibleLime

tangibleLime

    Lunatic

  • GMC Elder
  • 2520 posts
  • Version:GM:HTML5

Posted 16 January 2007 - 10:32 PM

If he used the way I am thinking he did, check out my response to another topic that was asking for a DLL that does the same thing this one does: http://forums.gamema...dpost&p=1874036

If you're too lazy to click the link, I'll just copy and paste it here.

There really is no straightforward API command to get the CPU usage. There is however, a DLL that comes with Windows. It's called ntdll.dll, and inside is that magic: the NtQuerySystemInformation command.

Be warned that this command may change with future operating systems. Microsoft even issued a warning on the page that includes this command.

View the documentation of the NtQuerySystemInformation command here:
http://msdn2.microso...y/ms724509.aspx

There are also explanations for further ways to find information without using this function listed on the page that I provided.

Edited by Roach, 16 January 2007 - 10:35 PM.

  • 0
Posted ImagePosted Image

#14 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 16 January 2007 - 10:41 PM

Thanks roach ur always that helpfull.
  • 0

#15 [SJB]Dude7

[SJB]Dude7

    GMC Member

  • New Member
  • 289 posts

Posted 16 January 2007 - 10:51 PM

Nice script Hobbel,... like all of them. Keep making them! :)

And yeah, I have never used a dual core PC :D
  • 0

#16 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 17 January 2007 - 06:47 AM

I got -1%, which I assume means there was a problem.
  • 0

#17 zedman1000

zedman1000

    GMC Member

  • New Member
  • 715 posts

Posted 17 January 2007 - 10:10 AM

you bluddy legend... lol.
  • 0

#18 mme

mme

    MME

  • GMC Member
  • 1012 posts

Posted 17 January 2007 - 08:18 PM

my computer says the game is 0% and the computer keeps switching from 0% to 3%
  • 0
gmc_mdu2.pngrsa_gmc_sig.png

#19 tristiano77

tristiano77

    GMC Member

  • GMC Member
  • 349 posts
  • Version:Unknown

Posted 08 October 2007 - 12:05 AM

great, aside from the simple fact that it doesnt work, but great none the less :)
  • 0

#20 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 08 October 2007 - 03:11 PM

tristiano77 what OS are you using and what processor?
  • 0

Chris Matthews, Co-Leader of Digital X

#21 Licht

Licht

    GMC Member

  • New Member
  • 23 posts

Posted 21 October 2007 - 11:53 PM

Look at my sig. Yeah each core is monitored separately. I have a usage monitor and it is the oddest thing, on my Athlon X2 5200+ the 2nd core is dominant (gets more work) over the 1st core. Figure it would be the other way around.


As for this, please add multicore support with the ability to return the usage of each individual core or the combined total. Thank you.
  • 0

#22 tristiano77

tristiano77

    GMC Member

  • GMC Member
  • 349 posts
  • Version:Unknown

Posted 19 November 2007 - 04:16 AM

tristiano77 what OS are you using and what processor?

vista home premium, intel dual, 6420 2.13GHz,2.13GHz
  • 0

#23 cdm319

cdm319

    C++ Programmer

  • New Member
  • 885 posts

Posted 19 November 2007 - 05:46 PM

doesn't run on vista, that's why it doesn't work for you
  • 0

Chris Matthews, Co-Leader of Digital X

#24 tristiano77

tristiano77

    GMC Member

  • GMC Member
  • 349 posts
  • Version:Unknown

Posted 19 November 2007 - 11:20 PM

hmmmmmmmmm. format c.
  • 0

#25 ChIkEn AtE mY dOnUtS

ChIkEn AtE mY dOnUtS

    Pwner of barcodes

  • GMC Member
  • 2410 posts

Posted 21 November 2007 - 04:27 AM

If you made the support quad/dual, it'd be awesome :(

I have a quad core, if you need any testing
  • 0
I've moved away from GM. If you want to contact me, feel free to email ryanwebdev@gmail.com.

Thanks,
Ryan.

#26 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 21 November 2007 - 08:05 AM

If you made the support quad/dual, it'd be awesome :(

I have a quad core, if you need any testing

<{POST_SNAPBACK}>


Yes, I started with making one.
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#27 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 22 November 2007 - 07:53 AM

OK, I added multi core support.
Please test it for I have only one core.

Edited by h0bbel, 22 November 2007 - 07:53 AM.

  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#28 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 22 November 2007 - 07:57 AM

And, oh yea, it supports vista now, if it didn't already...
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#29 tristiano77

tristiano77

    GMC Member

  • GMC Member
  • 349 posts
  • Version:Unknown

Posted 29 November 2007 - 03:51 AM

oh yay it supports vista! RAmen!
  • 0

#30 theg721

theg721

    G Dawg

  • GMC Member
  • 1959 posts
  • Version:GM8

Posted 15 April 2010 - 04:53 PM

Unfortunatly, the .zip AND the .rar contain... nothing.
  • 0

#31 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 15 April 2010 - 08:00 PM

Works for me, you also bumped an old topic. ;)
  • 0

#32 Artaex Media

Artaex Media

    Artaex Media

  • GMC Member
  • 1531 posts
  • Version:Unknown

Posted 22 May 2010 - 05:13 PM

Awesome dll :)
  • 0

#33 Gamer_X

Gamer_X

    GMC Member

  • New Member
  • 18 posts

Posted 13 July 2010 - 06:51 PM

Can i use this in a future commercial game for free ?
  • 0

#34 Gamer_X

Gamer_X

    GMC Member

  • New Member
  • 18 posts

Posted 15 July 2010 - 12:01 AM

Unfortunatly, the .zip AND the .rar contain... nothing.


Same for me. 0 bytes for version 2 downloads

Edited by Gamer_X, 15 July 2010 - 12:01 AM.

  • 0

#35 h0bbel

h0bbel

    GMC Member

  • New Member
  • 252 posts

Posted 30 July 2010 - 01:51 PM

The downloads should work again.
And use in a commercial game is permitted...
  • 0
The empty archive bug should be fixed on my site.
Please use the "report bug" button on my site to report bugs, makes things clearer.

#36 Gamer_X

Gamer_X

    GMC Member

  • New Member
  • 18 posts

Posted 31 July 2010 - 05:30 AM

The downloads should work again.
And use in a commercial game is permitted...


Thanks ! :)
  • 0

#37 Recreate

Recreate

    Furry

  • GMC Member
  • 2992 posts
  • Version:GM:Studio

Posted 20 May 2012 - 10:26 PM

The link is broken on the site because PHP is sending out data before the file is sent, messing up the header. To get it, wget the url, and just open it up in nano and remove all data before the start of the zip file, and save. (or equivalent process)

Or to make the life of everyone easier: http://recat.pccloud9.me/cpuusage2.zip
  • 0

If the post that you are reading was created prior to 2011. For the safety of the general public, It is not to be regarded under any circumstances.
Please don't ask me to join your group at anything.


#38 ThePC007

ThePC007

    Chickenator

  • GMC Member
  • 1062 posts
  • Version:GM:Studio

Posted 11 November 2012 - 08:44 PM

Thanks :)
  • 0