On Tue, 13 Jul 2004 15:30:36 -0600 "Wiggins d Anconia" <[EMAIL PROTECTED]> wrote:
> > > > I had a script for which my previous host cancelled my account > > saying > it's a resource hog and using more than 50% resources of the server > (shared hosting). > > > > Yep, there were some faults in the script. I modified it and they > restored the account. > > > > But now I am looking for some script/subroutine within the script > > that > can give me the CPU/resource usage when the script runs? > > > > I have NO idea about it. > > > > Can anyone help me with it? > > This tends to be a very system dependent thing. I find it odd that > you would need to run a script in such an environment, isn't that what > the hoster does? Or are you talking about the resource usage of the > script specifically? > > In any case, give us more information about your platform. If it is > Unix can you read from /proc? yes, use: ********************** open (F, "</proc/$$/stat") || die "error opening /proc/$$/stat: $!\n" # $$ is current PID @content = split /\s+/, <F>; close F; print join("\n",@content), "\n"; ********************** all YOU need to find out now is what what each element means... and share your wisdom with us. well, I'd like to know. ;) > How were you doing this previously? You state that you fixed the > script and the account was reactivated, are you looking for further > improvements? If so, post the script.... > > Help us to help you... > > http://danconia.org > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > cheers, Alex -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>