…elogs greppen

eigentlich nur für mich selbst, damit ich es nicht jedes mal neu suchen muss:

in den elogs (/fnsw/local/logs/elogs/elogYYYYMMDD) sind kritische fehler mit “[SERIOUS]” zu erkennen - danach zu greppen ist also ohne probleme möglich. allerdings steht die wichtige information erst in der zeile danach:

2007/12/31 09:26:37.532 121,0,41 INXbg -s IndexServer (4513) … [SERIOUS]
Oracle not available. (ORA-3113), (File: ../src/GDBO.c, Line 3823)

daher reicht ein normales grep nicht - aber awk kann helfen:

export R=SERIOUS
awk ‘{if ($0~/’$R’/) {print $0; n=1} else { if (n==1) {print $0; n=0}}}’ elogYYYYMMDD

Related posts:

  1. spaß mit dem oracle client
  2. iisreset? iisapp.vbs reicht!
  3. BDC Meta Man - try Oracle, DB2, Web Services, MS Access now in Developer version
  4. Citrix AddPrinter Utility

Make a Comment

Make A Comment: ( 2 so far )

blockquote and a tags work here.

2 Responses to “…elogs greppen”

RSS Feed for konfabulieren Comments RSS Feed

grep mit der Option “-C 1″ oder “-C 2″ wäre auch Möglich, oder?

Martin Leyrer AUSTRIA Windows Vista Mozilla Firefox 2.0.0.12 wrote on March 14, 2008 @ 20:34 (in other words: 9 hours, 2 minutes after the fact)

Martin Leyrer

leider nein…

~/local/logs/elogs> cat /etc/release
Solaris 9 9/04 s9s_u7wos_09 SPARC
Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 29 June 2004

grep: illegal option — C
Usage: grep -hblcnsviw pattern file . . .

hipslu AUSTRIA Windows XP Internet Explorer 7.0 wrote on March 14, 2008 @ 21:00 (in other words: 9 hours, 28 minutes after the fact)

hipslu

Where's The Comment Form?

Liked it here?
klick here to open a random post - or have a look at this: