icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Choosing Surpass » Signed Up? » CPU Usage on script

Signed Up? If you're new with a question, ask here!

Reply
 
LinkBack Thread Tools Search this Thread
Old September 3rd, 2006, 8:02 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Aug 2006
9 posts
Gave thanks: 0
Thanked 0 times
CPU Usage on script

I was wondering if there was a way to see what your cpu usage is. I know there is the server status page, but that shows the entire load, not just mine. I am on a shared server and I have some script that I want to run but I don't want to use excessive resources.

I ran the script and I did not see a big change in the server status page. Though, when I run the same script on my moderatly high end consumer computer, the cpu usage is 100%. Is there some sort of way to see how much cpu time something takes?

One other question :
Load .51 (4 cpu) <- is this .51 as in 51% or 0.51%?
Memory Used 23%
Swap Used 2.53%
cakey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 3rd, 2006, 8:36 PM   #2 (permalink)
Registered User
Comfy Contributor
 
meephead's Avatar
 
Joined in Aug 2006
Hosted on SH103
100 posts
Gave thanks: 2
Thanked 4 times
I was wondering the same thing actually, but my scripts been running for a while and I don't think it caused any problems. But yeah, it would be nice to monitor such things, the only way that I know of now would be to pay for an ssh account and monitor it through something like 'top'.

Anyway, I'm guessing that the load is the same thing as the first load output you get from executing 'uptime'. If that's right then what the load means is the average number of processes that are queued up to get processed by the cpu. It can safely go above one to a number that really does depend on the server. I'm guessing that around 5 is acceptable although it might have some noticable effects on the system. Then again I never really ran a server like any of the ones surpass owns so my opinions might be wrong.

EDIT: I should restate this a bit, ideally you want a server load that stays under 1, but anything around 5 shouldn't cause the server to crash.
__________________
[SH103]
http://nemesia.org/

Last edited by meephead; September 3rd, 2006 at 8:39 PM.
meephead is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 4th, 2006, 12:47 AM   #3 (permalink)
Registered User
Fresh Surpasser
 
Joined in Aug 2006
9 posts
Gave thanks: 0
Thanked 0 times
While I'm on the subject of scripting...
What is the timeout on the shared servers for scripts?
The default on my apache server was 30 seconds or something.
Since I do not have SSH access, I cant look at the php.ini to find out.

Someone want to fill me in?
cakey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 4th, 2006, 7:48 AM   #4 (permalink)
Surpass Fan
Excelling Contributor
 
cowboy's Avatar
 
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
934 posts
Gave thanks: 2
Thanked 94 times
Quote:
Originally Posted by cakey View Post
While I'm on the subject of scripting...
What is the timeout on the shared servers for scripts?
The default on my apache server was 30 seconds or something.
Since I do not have SSH access, I cant look at the php.ini to find out.

Someone want to fill me in?
You cannot see the server php.ini file even if you have SSH because you are jailed to your own home directory. You can see all of your files with FTP or the file manager in cPanel.

You can see the php.ini settings by running the phpinfo() function and you can change them if needed by using the php ini_set() function or a directory php.ini file.

Server Load can be obtained by calling `uptime` in a php statement.
__________________
Where would you be if you were at the highest court in the land (US)?
cowboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old September 4th, 2006, 12:11 PM   #5 (permalink)
Registered User
Fresh Surpasser
 
Joined in Aug 2006
9 posts
Gave thanks: 0
Thanked 0 times
Thanks, that helped a bunch.
cakey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On