Request for a technical opinion about a plugin project...

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Stewie87
Posts: 34
Joined: Thu Apr 03, 2008 8:16 am

Request for a technical opinion about a plugin project...

Post by Stewie87 »

Hi to all, I have a question: is there any function that allows me to get the CPU usage percentage (or however CPU usage value)?
Because I gave a quick research to pspsdk but I didn't find it :(
Or, in alternative, exists a simple way to "calculate" it?

Thanks to all for attention and sorry for my bad english ;)


EDIT: function found, now:
Oki, I post here to avoid another topic :)

I have an idea but I'm not very "technical" about CPU frequency and use... so I would appreciate your opinion ^^
My idea is to make a plugin that "take" the CPU usage and set CPU frequency depending it! A CPU setting "on demand" xD

For example: CPU is on 222Mhz and the CPU usage is under 50%... so plugin set CPU frequency on 111Mhz. If CPU usage goes above 80 or 90% plugin set CPU frequency on 222Mhz back. And so on...

Well, this is my idea (in few words) :)
I ask you if this idea has sense (so if this is possible...) but especially if this method is dangerous for CPU (and PSP) life...

Thanks to all ^_^
Last edited by Stewie87 on Sun Jun 15, 2008 10:21 am, edited 2 times in total.
Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Post by Pirata Nervo »

Image
Upgrade your PSP
whistler
Posts: 39
Joined: Tue Mar 04, 2008 7:08 am

Post by whistler »

grep is your friend:)

grep Cpu /usr/local/pspdev/psp/sdk/include/*.h

that should list all the functions with cpu in the name. as for getting a usage percentage, i'm not sure there's a function for that
Stewie87
Posts: 34
Joined: Thu Apr 03, 2008 8:16 am

Post by Stewie87 »

I know those functions, but I ask for a function that gives me the CPU usage and not the frequency...
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Stewie87
Posts: 34
Joined: Thu Apr 03, 2008 8:16 am

Post by Stewie87 »

Insert_witty_name wrote:Search.

http://forums.ps2dev.org/viewtopic.php?t=9912
Lol, I searched for "CPU usage" and so that topic did not appear :P
Thank you very very much ^__^
Stewie87
Posts: 34
Joined: Thu Apr 03, 2008 8:16 am

Post by Stewie87 »

Oki, I post here to avoid another topic :)

I have an idea but I'm not very "technical" about CPU frequency and use... so I would appreciate your opinion ^^
My idea is to make a plugin that "take" the CPU usage and set CPU frequency depending it! A CPU setting "on demand" xD

For example: CPU is on 222Mhz and the CPU usage is under 50%... so plugin set CPU frequency on 111Mhz. If CPU usage goes above 80 or 90% plugin set CPU frequency on 222Mhz back. And so on...

Well, this is my idea (in few words) :)
I ask you if this idea has sense (so if this is possible...) but especially if this method is dangerous for CPU (and PSP) life...

Thanks to all ^_^
Pirata Nervo
Posts: 409
Joined: Tue Oct 09, 2007 4:22 am

Post by Pirata Nervo »

@Stewie oh I misunderstood then, I see you edited your post explaining exactly what you want :p
Image
Upgrade your PSP
whistler
Posts: 39
Joined: Tue Mar 04, 2008 7:08 am

Post by whistler »

Stewie87 wrote:Oki, I post here to avoid another topic :)

I have an idea but I'm not very "technical" about CPU frequency and use... so I would appreciate your opinion ^^
My idea is to make a plugin that "take" the CPU usage and set CPU frequency depending it! A CPU setting "on demand" xD

For example: CPU is on 222Mhz and the CPU usage is under 50%... so plugin set CPU frequency on 111Mhz. If CPU usage goes above 80 or 90% plugin set CPU frequency on 222Mhz back. And so on...

Well, this is my idea (in few words) :)
I ask you if this idea has sense (so if this is possible...) but especially if this method is dangerous for CPU (and PSP) life...

Thanks to all ^_^
its a good idea but its already been done. in cwcheat set the cpu frequency to -1 and the plugin will dynamically adjust the cpu frequency in relation to the cpu load
Stewie87
Posts: 34
Joined: Thu Apr 03, 2008 8:16 am

Post by Stewie87 »

whistler wrote:
Stewie87 wrote:Oki, I post here to avoid another topic :)

I have an idea but I'm not very "technical" about CPU frequency and use... so I would appreciate your opinion ^^
My idea is to make a plugin that "take" the CPU usage and set CPU frequency depending it! A CPU setting "on demand" xD

For example: CPU is on 222Mhz and the CPU usage is under 50%... so plugin set CPU frequency on 111Mhz. If CPU usage goes above 80 or 90% plugin set CPU frequency on 222Mhz back. And so on...

Well, this is my idea (in few words) :)
I ask you if this idea has sense (so if this is possible...) but especially if this method is dangerous for CPU (and PSP) life...

Thanks to all ^_^
its a good idea but its already been done. in cwcheat set the cpu frequency to -1 and the plugin will dynamically adjust the cpu frequency in relation to the cpu load
Really?! o.O
Well at least my was a good idea xD
Weltall, what algorithm do you use to calculate CPU usage? That suggested by insert_winny don't work in a VSH plugin...
Post Reply