Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 May 2000 11:06:07 +0400 (MSD)
From:      ls@gambit.msk.su
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/18587: /etc/security: improove the dmesg diff output
Message-ID:  <200005160706.LAA15679@Berkeley.Gambit.Msk.SU>

next in thread | raw e-mail | index | archive | help

>Number:         18587
>Category:       bin
>Synopsis:       /etc/security: improove the dmesg diff output
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 16 00:10:05 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     ls@gambit.msk.su
>Release:        FreeBSD 4.0-STABLE i386
>Organization:
Gambit Automated Design
>Environment:

     $FreeBSD: src/etc/security,v 1.36.2.1 2000/04/05 13:44:35 sheldonh Exp $

>Description:

	Since the dmesg output don't contain the date and time of event,
	it can contain a lot of equal entries (esp. when you run ipfw
	with logging)

>How-To-Repeat:

	$ dmesg | sort | uniq -c | sort -nr | head

>Fix:

--- etc/security.orig	Mon Apr 10 11:22:39 2000
+++ etc/security	Mon May  8 14:22:13 2000
@@ -102,7 +102,7 @@
 	if cmp ${LOG}/dmesg.today ${TMP} >/dev/null 2>&1; then :; else
 		separator
 		echo "${host} kernel log messages:"
-		diff -b ${LOG}/dmesg.today ${TMP} | egrep "^>"
+		diff -b ${LOG}/dmesg.today ${TMP} | egrep "^>" | sed -e 's/^> //' | sort | uniq -c | sort -rn
 		mv ${LOG}/dmesg.today ${LOG}/dmesg.yesterday
 		mv ${TMP} ${LOG}/dmesg.today
 	fi

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005160706.LAA15679>