[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Server crash.
>Date: Wed, 09 Jul 1997 13:56:55 +0300
>To: mik@actcom.co.il (Michael Kraizelman), linux-il@linux.org.il
>From: Shlomi Fish <shlomi@slink.co.il>
>Subject: Re: Server crash.
>In-Reply-To: <199707090916.MAA14207@actcom.co.il>
>
>At 11:33 AM 7/9/97 +0300, Michael Kraizelman wrote:
>>Hi there,
>>
>>I am running a (java) server 24 hours a day on the Internet.
>>From time to time it ends with no message.
>>How can I find out why the abend?
>>
>>(I have tried strace but it has to much details. I need only the bottom
line).
>>
>I suggest writing a perl script to filter only the 200 or so last lines.
Here's the general template:
>
>#!/usr/bin/perl
>
>my $logfile = "JavaServer.log"; # The name of the log file
>my $num_lines = 200; # The number of lines you are interested in
>my @lines;
>my $li;
>
>open O, '>'.$logfile;
>for($li=0 ; $lines[$li] = <> ; $li++)
>{
> print O $lines[$li];
> if ($li == $num_lines * 2)
> {
> @lines = @lines[$num_lines .. ($num_lines*2-1)];
> close O;
> open O, '>'.$logfile;
> print O $l foreach $l (@lines);
> }
>}
>close O;
>
>
>You need to use this program as a pipe i.e:
>strace <Blah Blah> | perl filterer.pl
>
>Hope it helps.
>
> Shlomi Fish
-----------------------------------------------------------------------------
Shlomi Fish Smart Link Ltd.
Home E-mail: shlomif@ibm.net Work E-mail: shlomi@slink.co.il
Home Page: http://www.slink.co.il/~shlomi
The Bible dictates that "Thou shalt not seethe [=cook] a kid [= young goat]
in his mother's milk." To avoid possibility of breaking that regulation,
the Jewish tradition ruled that it also applies to female goats, to mature
goats, and to the meat and milk of two completely unrelated goats. It is
also forbidden to eat the meat with fresh milk, and it applies to beef and
mutten as well (including mixing the milk and meat of two different
beasts). Finally, chicken, which are incapable of milk production, may not
be eaten along with any mammal's milk either.
We are fortunate that most mathematicians were not Jewish. Otherwise, it
would have been forbidden to divide by all numbers between -1 and 1.
-----------------------------------------------------------------------------
Follow-Ups: