From owner-freebsd-questions@FreeBSD.ORG Wed Feb 20 03:12:55 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 32EBF1DA for ; Wed, 20 Feb 2013 03:12:55 +0000 (UTC) (envelope-from bw.mail.lists@gmail.com) Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [IPv6:2a00:1450:400c:c03::22c]) by mx1.freebsd.org (Postfix) with ESMTP id 95130C20 for ; Wed, 20 Feb 2013 03:12:54 +0000 (UTC) Received: by mail-we0-f172.google.com with SMTP id x10so6352259wey.17 for ; Tue, 19 Feb 2013 19:12:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ufjYBlrKg3rkjgVuo3OXqn5Qi/s9eXFBKcepXsmCZUA=; b=Uy7vPBzZjktRImoQch6z5/YuyZ8LB0vFgDFmoaiAq6gCf8ENXynEGss1RqXq9ofi64 JJiBeSI4gry3GSOIXD591vcI1QY+HNzpGlZoh9w1Dbv+faKIzkCz+oC3QRnlla2DAawn arn9Wm/Uy5r1CWfyVjwidraIYUscsTKUHIK+amlST1bR46Xp3loKPGPm8QXKXOcJ7Pk6 ofThfrjKW4vVE2bJssKeSb6mhhwxMF7/3jYhdF0ZOYccBwsrPwKLCU5x3eimKD9fXkfO N+usoChC2t0/mLNGJeT6rIIhQZsDPCP3aDNjjsSVVV0cpC4I53SUz6WAYbhA7Wc0x9r8 8rLA== X-Received: by 10.194.24.197 with SMTP id w5mr25912307wjf.9.1361329973003; Tue, 19 Feb 2013 19:12:53 -0800 (PST) Received: from [192.168.0.128] (dhcp-089-099-199-083.chello.nl. [89.99.199.83]) by mx.google.com with ESMTPS id s8sm28868203wif.9.2013.02.19.19.12.50 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Feb 2013 19:12:51 -0800 (PST) Message-ID: <51243F31.3050109@gmail.com> Date: Wed, 20 Feb 2013 05:12:49 +0200 From: "bw.mail.lists" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: convert date and time to epoch in awk References: <20130220014133.4D8D0BF63@kev.msw.wpafb.af.mil> In-Reply-To: <20130220014133.4D8D0BF63@kev.msw.wpafb.af.mil> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2013 03:12:55 -0000 > > b> I want to write a script that parses the last, say, 10 minutes of a log > b> file looking for a certain string, like 'error', or failed', and returns > b> how many times it shows up. The script would be run by Nagios and if it > b> returns > 0 an alert is raised. Each line of the log file starts with a > b> date like 'Feb 19 23:45:32'. > > Instead of looking for 'error' or 'failed', I'd recommend weeding out > benign log entries and returning everything else. Well, that was just an example, my needs are a bit more specific, but I found some new stuff for later in those links, thanks.