| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
Comments:
<0> rindolf: namely, I override $SIG{__WARN__} and $SIG{__DIE__} without respecting their previous value. But I have an easy fix <1> guys <1> look at this please <1> http://rafb.net/paste/results/QPy6EW58.html <2> The paste QPy6EW58 has been copied to http://erxz.com/pb/2068 <3> whoever: well.. this is my first time with perl. I've defined my @cust arry inside the foreach block. so i should create it before the foreach and ***ign the values inside the block ? <4> Woo! 11MB/s on my rsync backups. <1> I actually don't know what is it <5> Loady: yes <6> Yaakov: would you say I can just say "Yoma 63a" as a citation in a paper I'm writing? <6> or do I need to be more specific than that? <4> This is still going to take a while, though... 16GB... <3> whoever: cool. thanks :) <7> japhy: the key will be expanded in your bibliography,no? <8> Yaakov: trunking! <4> japhy: Babylonian Talmud, Tractate Yoma, Folio 63a
<5> Loady: http://perldoc.perl.org/functions/my.html <6> gotchya <6> bpalmer_: right now, my bibliography is, um, two books ;) <1> integral, could you explain me why CGI::Session so strange ? <5> Loady: and read http://perldoc.perl.org/perlsub.html , too <8> Sir_J: ugh, why are you picking on me? <9> hi, i have users downloading files off my server, i can log when they clicked the link to download the file, but how can i log if they actually downloaded it and not stopped in the middle of it? (can that even be done?) <1> it seems that you are "father of Perl " :) <8> I, sir, am an idiot. <1> no-no <8> uh, how bloody depressing <1> can anybody help me ? <9> can what i asked be done? <9> Sir_J: what is the problem? <1> http://rafb.net/paste/results/QPy6EW58.html <2> The paste QPy6EW58 has been moved to: http://erxz.com/pb/2068 <1> Kilbor, loot at this please <1> *look <4> japhy: Though I would prefer: Talmud Bavli (Babylonian Talmud), ... <5> Sir_J: use strict and the reason will be shown to you <9> Sir_J: don't see the difference yet lol <4> integral: I think it is disk-bound on the notebook computer side. <5> Kilbor: it's a tiny "my" <6> Yaakov: ok ;) <1> Kilbor, if I don't use my $session it doesn't work <9> o <9> you losing variable scope :p <9> $cgi->cookie( CGISESSID => $session->id ); <9> $session is unknown there <8> Yaakov: oh, it's just that 11MB/s is also the max for 100baseT <10> perlbot: coping with scoping? <11> Coping with Scoping - http://perl.plover.com/FAQs/Namespaces.html (also of interest is http://www.mail-archive.com/linux-il%40cs.huji.ac.il/msg33714.html) <1> Kilbor, ?? <9> on second line <5> Sir_J: same links i gave to Loady: http://perldoc.perl.org/functions/my.html + http://perldoc.perl.org/perlsub.html <8> but it's also the max for some disk busses *sigh* <1> Kilbor, why loosing ? <8> stupid confusing world. <9> you need to reserve the memory for it with "my" <4> mangle transport control protocol/internet protocol <1> $session is a global variable <4> mangle: transport control protocol/internet protocol <2> disfellowship cut and try civility/internet rules of conduct <1> $cgi->cookie( CGISESSID => --> $session->id <-- ); ? <9> but the 2nd line you redeclare it <4> integral: I can try it on a gig link. <9> you turn it to>>>> new CGI::Session <8> --> <-- isn't valid perl syntax <1> integral, that is example <4> integral: It _could_ be network bound. <1> Kilbor, how can I fix that ? <1> if i use $session <1> what should be in the second line ? <8> ethernet over firewire's another neat trick <9> Sir_J: let the MY there :p <1> but if I don't use my ? <4> integral: I can do that too. <9> then it the $session variable is not the one you want <10> Sir_J: you might want to check out a free online book called beginning perl. it will explain a lot of things for you. <10> perlbot: beginning perl?
<11> http://learn.perl.org/library/beginning_perl/ <9> you want $session to be the new whatever <1> Kilbor, it is clear <9> (according to the code) <1> but what can I do to preserve line 2 <9> get it? :p <10> mangle: you might want to check out a free online book called beginning perl. it will explain a lot of things for you. <2> other self black power be dying to to lesion show its face a unsnarl online docket called first stage perl. it p***ion undo a ration of machinery in preference to number one. <1> Kilbor, session should be the same all he time <1> because in other case it would make no sense <9> well, depends on what's installed i think, check out search.cpan for $session, they should have examples <12> hello guys <9> now is there a way to tell if a user downloaded my file? <10> good morning <1> Kilbor, I've looked over examples <1> and it still no clear <12> i am trying to check a http log and check for a value 200 and if is not 200 then send out an email anyone have any ideas? <9> Sir_J: http://search.cpan.org/~cwest/Apache-Session-1.81/Session.pm <13> Kilbor's url is at http://xrl.us/o3gp <1> is it possible to change first line ( $session .... ) and don't touch the second line ? <12> 192.168.34.32 - - [13/Jul/2006:14:58:04 +0100] "POST /va/2ndconnection HTTP/1.1" 200 1167 "-" "RPT-HTTPClient/0.3-3E" <1> Kilbor, I use CGI::Session <9> Snake007uk: it's the 200 after http thing <1> not Apache::Session <12> so where the 200 is in that line i would want to tail -f /var/log/httpd/access <9> Sir_J: http://search.cpan.org/~markstos/CGI-Session-4.14/lib/CGI/Session.pm <13> Kilbor's url is at http://xrl.us/o3gr <12> and then check each line for that 200 <12> if it 200 then ok, otherwise email me <9> Snake007uk: "POST /va/2ndconnection HTTP/1.1" --->>200<<---- 1167 <12> yep <10> Snake007uk: are you familiar with open() and somewhat familiar with regexen? <14> eval: $string='THIS IS A LINE IN THE FILE 200'; print "OMG, TEH 200" if $string ~m /200/; <2> uberspaced: Error: syntax error at (eval 141) line 15, near "$string ~" <14> gah! <14> eval: $string='THIS IS A LINE IN THE FILE 200'; print "OMG, TEH 200" if $string =~ m /200/; <2> uberspaced: OMG, TEH 200 1 <12> genio honestly no, i am super noob with perl <14> eval: $string='THIS IS A LINE IN THE FILE'; print "OMG, TEH 200" if $string =~ m /200/; <2> uberspaced: <12> but i will be tailign the file <10> Snake007uk: are you looking to learn? <9> Snake007uk: search regular expressions... loop the log files line by line, checking for the 200 after a space and " <12> yes, coz i am starting seeing limits with bash <14> $string = `tail filename`; <12> ok let me play see what i come up with and ill paste on pastebin <12> brb <12> :D <10> Snake007uk: a good place to start learning perl would be the free online book beginning perl. after you have a grasp of basic perl, check out perldoc -f open perldoc perlopentut perldoc retut <9> just work it out step by step, if you know a bit of codding you will get it <10> perlbot: beginning perl? <11> http://learn.perl.org/library/beginning_perl/ <12> i know a bit of coding.. i know basic perl stuff <12> just slow at putting it togeather <9> experience :p <12> $string==`tail -f filename` would work as file is constant be editied to <12> wouldnt <9> well, i would run a script once an hour... less overhead <9> and with big log files the script can take a few minutes to run <9> so cron job it <12> thats why i want to use tail to update line by line <12> and do on the fly <14> Snake007uk, you probably want something like, my @parts = split(/\s/,$string); if ($parts[some index] =~ m /200/) {do stuff here...} <9> well, how many requests you have? <9> requests per second? <12> 1 a sec <12> max 5 a sec <9> do it on a cron job :p <12> the idea is so that i get alerted that the number ISNT 200 <12> lol <9> think you can do a simpple htaccess file for that :p <9> but it's a bad idea <14> Snake007uk: tail -f filename | perl -e 'while(<STDIN>){$string=$_; @parts=split(/\s/,$string); if ($parts[some_index] !~ m/200/){send_email_stuff;}}' <9> at start, you get 95% of your hits from robots = 404 everywhere
Return to
#perl or Go to some related
logs:
emerge gnome-terminal gentoo libgl #perl #kde sata_nv iowait #debian mysql non-aggregate min #php #css >sysdate -1 MSSQL practice-06.pdf
|
|