forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Stewie87



Joined: 03 Apr 2008
Posts: 39

PostPosted: Sun Jun 15, 2008 8:52 am    Post subject: Request for a technical opinion about a plugin project... Reply with quote

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:
Quote:
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
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Sun Jun 15, 2008 9:24 am    Post subject: Reply with quote

to get cpu:
http://alek.dark-alex.org/pspsdkdocs/psppower_8h.html#fe5b38c893bd064e8e962ec03b9243b6
_________________

Upgrade your PSP
Back to top
View user's profile Send private message
whistler



Joined: 04 Mar 2008
Posts: 40

PostPosted: Sun Jun 15, 2008 9:27 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Stewie87



Joined: 03 Apr 2008
Posts: 39

PostPosted: Sun Jun 15, 2008 9:41 am    Post subject: Reply with quote

Pirata Nervo wrote:
to get cpu:
http://alek.dark-alex.org/pspsdkdocs/psppower_8h.html#fe5b38c893bd064e8e962ec03b9243b6


I know those functions, but I ask for a function that gives me the CPU usage and not the frequency...
Back to top
View user's profile Send private message
Insert_witty_name



Joined: 10 May 2006
Posts: 376

PostPosted: Sun Jun 15, 2008 9:53 am    Post subject: Reply with quote

Search.

http://forums.ps2dev.org/viewtopic.php?t=9912
Back to top
View user's profile Send private message
Stewie87



Joined: 03 Apr 2008
Posts: 39

PostPosted: Sun Jun 15, 2008 9:56 am    Post subject: Reply with quote

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 ^__^
Back to top
View user's profile Send private message
Stewie87



Joined: 03 Apr 2008
Posts: 39

PostPosted: Sun Jun 15, 2008 10:08 am    Post subject: Reply with quote

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 ^_^
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Sun Jun 15, 2008 6:43 pm    Post subject: Reply with quote

@Stewie oh I misunderstood then, I see you edited your post explaining exactly what you want :p
_________________

Upgrade your PSP
Back to top
View user's profile Send private message
whistler



Joined: 04 Mar 2008
Posts: 40

PostPosted: Mon Jun 16, 2008 12:00 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Stewie87



Joined: 03 Apr 2008
Posts: 39

PostPosted: Mon Jun 16, 2008 12:14 am    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group