|
|
#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% |
|
|
|
|
|
#2 (permalink) |
|
Registered User
Comfy Contributor
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. Last edited by meephead; September 3rd, 2006 at 8:39 PM. |
|
|
|
|
|
#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? |
|
|
|
|
|
#4 (permalink) | |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
934 posts
Gave thanks: 2
Thanked 94 times
|
Quote:
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)? |
|
|
|
|