Re: Benchmarking a script that can't be executed form the command line

From: Ragnar Hafstaš (gnari_at_simnet.is)
Date: 12/30/03


Date: Tue, 30 Dec 2003 22:44:55 -0000


"Erik Tank" <jundy@jundy.com> wrote in message
news:f89774d4a5b2529253d0c835d28915b2@news.teranews.com...
> I have written a web based help desk/billing/anything else my
> employeer wants it to be system using Perl. It's been in production
> over 1 year now and working well but some things are beginning to slow
> down. I am trying to figure out where the slow down is occure.
>
> With other scripts I have always used DProf/SmallProf or something
> like that but the problem here is there are several security
> precautions that make it (so far) unexecutable from the command line.
> To clarify I can execute it but I simply get a redirect to the login
> script.
>
> Any thoughts/suggestions?

yes. plain old log files

make a debug() function that prints timestamped messages to a log file, and
pepper calls to it all over your
application. this will help you locate problem areas. to disable it change
the function, or change a config variable
or just perl -pi -e 's/debug\(/#debug(/g' src/*.pl

gnari



Relevant Pages

  • [Full-disclosure] reduction of brute force login attempts via SSH through iptables --has
    ... The conversation about scripts which read log files and the holes in those scripts and the holes in those holes and the *ssholes and... ... Putting together iptables --hashlimit with some kind of log file reader will slow down the initial attack in real time, and allow a more leisurely log file scanner to react in not-so-real-time with more complete blockages against detected significant attackers. ...
    (Full-Disclosure)
  • PHP gives session error on remote server, but not local test machine
    ... I have a large set of PHP scripts of my own design that outputs any errors to text log files. ... // initialize the output tree. ... // based on the HTML structure ...
    (php.general)
  • Re: My server has been hacked
    ... >to basic authentication, is scripts enabled? ... >> bunch of crap in the log files from someone trying to ... >> because of the permission problem. ...
    (microsoft.public.inetserver.iis.security)
  • Python Class for Apache log analysis
    ... I am looking for a python package that I could employ to analyze ... Apache's log files in real time. ... scripts, but most of them are outdated, while others are ...
    (comp.lang.python)