Re: Memory: measuring 5 limitations

From: James Willmore (jwillmore_at_remove.adelphia.net)
Date: 12/11/03


Date: Thu, 11 Dec 2003 16:50:50 GMT

On 11 Dec 2003 02:44:38 -0800
bart@nijlen.com (Bart Van der Donck) wrote:
> James Willmore wrote:
>
> > *If* you have shell access, you *may* be able to use
> > 'time "name of script here"'.
> > This will give you information about the execution of the script.
> > Not Perl, but it will give you more information than what you're
> > getting now.
>
> Yeah I have shell access and I can execute the time command.
>
> The output of 'time "script.cgi"' is:
> script.cgi: command not found

[Sigh}

I hate trying to type in what a command should look like - because it
always seems to be mis-interpreted.

You don't need the double quotes around the command you're trying to
execute. For example:

jim@maxine:~> time ls
[lots of output from the ls command]

real 0m0.564s
user 0m0.010s
sys 0m0.000s
jim@maxine:~>

If you can execute your script *without* typing in perl at the
beginning, then you have a script that can be executed. If not, then
you have your permissions set wrong - which looks like the case here.

> However the output format looks great and I believe that it is what
> I need:
> 0.000u 0.000s 0:00.00 0.0% 0+0k 0+0io 0pf+0w
> Am I missing something?

I haven't seen output like that from 'time' before. At least, not on
a Linux system. What OS is your host using?

The "workaround" I gave was for a *INX system - I should have been
specific about that. Sorry :-(

I'm thinking you may want to contact your host to see what solutions
they may have. We're starting to get away from Perl on this issue.

Last resort - shop around for a host that has the functionality you're
looking for - and read up a little more on using Perl through CGI.
Google is an excellent place to start - because there have been *many*
questions asked about using Perl through CGI asked and answered in
this and other newsgroups.

HTH

-- 
Jim
Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.
a fortune quote ...
You should emulate your heros, but don't carry it too far. 
Especially if they are dead. 


Relevant Pages

  • Re: Wait for background processes to complete
    ... To be able to execute commands in the background and wait for their ... The documentation I am referring to is http://perldoc.perl.org/. ... You can run a command in the background with: ... There is a general problem with perl documentation: ...
    (comp.lang.perl.misc)
  • Re: New Application Extension reports 404
    ... You actually want .RUN to be handled by Perl, ... please add a Web Service Extension ... /command1.run will execute Perl script1.pl ... but IIS4 had the "RUN" extension mapped to execute a predefined perl script. ...
    (microsoft.public.inetserver.iis)
  • CGIscript.net - csMailto.cgi - Remote Command Execution
    ... CGIscript.net - csMailto.cgi - Remote Command ... csMailto is a perl cgi formmail script developed by ... execute command on server and mail output to anyone ...
    (Bugtraq)
  • Obtaining complete Unix command line that evoked script as string
    ... If there is a more appropriate list for this, let me know; the other perl lists I've seen seem to specialised for this. ... Note this is not just the arguments of the call to the script, but everything including pipes and redirects, etc., e.g. ... Ideally the perl interpreter would grab the complete command line as its evoked and I'd access this via a variable. ...
    (perl.beginners)
  • Re: Talk about text files and embedded malware...
    ... | ASCII characters only. ... | script or VBS script)? ... Say a file called "bad.txt" contains some perl script. ... user double-clicking a bad file will execute some code? ...
    (alt.comp.anti-virus)