[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] Want to watch the fun with the Code Red and it 's new variant?



> > It looks a great script and I would love to use it. But how?
>
>Nobody else has, so I'll bite.  How much CPU does this
>thing use?  It could be a lot more efficient...


I knocked it up to satisfy my curiousity - not as any exercise in efficiency - if you want to re-write it in perl or some other scripting language - maybe even C and compile it - I don't care!

I'm sure that it uses a considerable amount of CPU while it sorts uniquely - other than that, the greps are about the same as any pattern matching in perl - you can't make them much friendlier - the biggest hit is the sort -u | uniq -c (building an array uses a little memory and some CPU) - as does the writing it to disk.

It runs with a data file of about 6.5Mb and takes about 5 seconds via http over our connection - perhaps the machine slows down up to 5 seconds every hour or so when I run it - perhaps not - I don't notice it slowing down.

I'd hazard a guess that it's less of a server drain than running a MySQL database on the server - anyone care to try and quantify it?

regards

Greg

>
>_______________________________________________
>cobalt-users mailing list
>cobalt-users@xxxxxxxxxxxxxxx
>To Subscribe or Unsubscribe, please go to:
>http://list.cobalt.com/mailman/listinfo/cobalt-users

-- 
http://www.webyourbusiness.com/
Providers of E-Commerce Software &
Web Design Consultancy and Services.
PH: (970)266-0195 FAX: (970)266-0158