From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1DD6A138A1A for ; Mon, 9 Feb 2015 13:02:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 22D62E09DC; Mon, 9 Feb 2015 13:02:50 +0000 (UTC) Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 078F6E09B1 for ; Mon, 9 Feb 2015 13:02:48 +0000 (UTC) Received: by pdjg10 with SMTP id g10so24853874pdj.1 for ; Mon, 09 Feb 2015 05:02:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=hqrUUwaMKr/MvgNSZk7UsWUaVULe0ruz8AfXLV16V10=; b=uFrHeXoDt/oT1LdNm5sCkpnB5R6yafuOt8aHUAeGCciG50KcQTuXnzH/Rk5914ZEtN URh94nfmqbgut5VqAf3nEtZC5CMbN0CaeKLn/NBC68Ydt5avET83aL7/EKmKtjF8SZD+ uwpn2bhm7DmiuemZzcCvPKz/B+Y6c0CwbYhA/RkoiBEXlEH/XistkgE0Mxv4YZarL+9L 8nBgChhzyZf20R195c+TSpvjtIW/Uuxkl6tTQ7K//d1nBCE1Iu1/i8Ve/FCjHpxO72U4 WHy2/3ZkrTAcuo1HHGNYdOyJ8yYfkEDn3xFQlgGra4PyYtMk7hGcbZ23CLt72eCzEQr+ O/Yw== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.70.55.105 with SMTP id r9mr28987846pdp.147.1423486968149; Mon, 09 Feb 2015 05:02:48 -0800 (PST) Sender: freemanrich@gmail.com Received: by 10.70.85.39 with HTTP; Mon, 9 Feb 2015 05:02:48 -0800 (PST) In-Reply-To: <54D89F96.3000503@alectenharmsel.com> References: <20150209094818.GA3218@acm.fritz.box> <54D886B2.3060302@hanft.de> <201502091150.01015.michaelkintzios@gmail.com> <54D89F96.3000503@alectenharmsel.com> Date: Mon, 9 Feb 2015 08:02:48 -0500 X-Google-Sender-Auth: dWghvYMOPSK4TCHz-nKapBylYho Message-ID: Subject: Re: [gentoo-user] I don't seem to have a system log. Help, please! From: Rich Freeman To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: 69dfa496-ac40-4648-a49c-e81860092b87 X-Archives-Hash: dada01da7bfa2d3e62c410ae4b21a48f On Mon, Feb 9, 2015 at 6:52 AM, Alec Ten Harmsel wrote: > > On 02/09/2015 06:49 AM, Mick wrote: >> On Monday 09 Feb 2015 11:23:15 Rich Freeman wrote: >>> You don't have to export them from anything unless you need their >>> content in a text file. If you just run "journalctl" that is the >>> equivalent of typing cat /var/log/messages. If you do want to parse >>> them with an external tool then you get your choice of several text >>> formats and json. >> The thing is I never use cat. I invariably use less, rview, or grep, to >> browse or search the log files. >> >> How will this work with journalctl, will I have to export them first into a >> different format? >> > > You can run `journalctl | grep whatever`. I don't know what rview is, > but as long as whatever you're using supports pipes you should be fine. > Keep in mind that if you're grepping logs, there is probably a better way to accomplish what you want to do with journalctl's options. Finding all output from a particular daemon is going to be more reliable if you filter by unit, versus getting verbose log output from your mail server that has "mysql" somewhere in it or whatever. That is the main reason for using a binary log format. But, yes, you can just pipe the output into the tool of your choice. If you keep a lot of logs like I do it might be wiser to prefilter it a bit, such as by adding -b to the options to limit it to entries since the last reboot. I also tend to keep a journalctl -f running in a screen session, which is the equivalent of a tail -f. If you're using an automated tool you can also use cursors to bookmark the last entry you read and then ask journalctl for entries since that one. Of course, an automated tool would probably just read the logs via dbus or whatever (I haven't taken the time to look into the APIs). -- Rich