FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 10-09-2012, 05:35 PM
Lennart Poettering
 
Default replacing rsyslogd in minimal with journald

On Tue, 09.10.12 09:38, Chris Adams (cmadams@hiwaay.net) wrote:

> Once upon a time, Lennart Poettering <mzerqung@0pointer.de> said:
> > On Tue, 09.10.12 09:09, Chris Adams (cmadams@hiwaay.net) wrote:
> > > Once upon a time, Lennart Poettering <mzerqung@0pointer.de> said:
> > > > If people want some pixel-perfect copy of the traditional
> > > > /var/log/messages, then they should just run "journalctl" without any
> > > > args. It's much better than /var/log/messages:
> > >
> > > How do you read this log when the system is not running (e.g. mounting
> > > filesystems of a drive on another system, running from a rescue image,
> > > etc.)?
> >
> > journalctl -D <pathtothejournalfiles>
>
> And just what is the <pathtothejournalfiles> (relative to system /)?

The path where the journal files resides or where the per-machine
subdirs reside. More specifically "-D/var/log/journal/<machine-id>" if you
only want to see the logs from that one machine. Or "-D/var/log/journal" if
you want to see the logs from all per-machine dirs in there. The files
will be interleaved as appropriate in that case. The machine ID is the
contents of /etc/machine-id.

Lennart

--
Lennart Poettering - Red Hat, Inc.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-09-2012, 05:37 PM
"Richard W.M. Jones"
 
Default replacing rsyslogd in minimal with journald

On Tue, Oct 09, 2012 at 07:34:50PM +0200, drago01 wrote:
> On Tue, Oct 9, 2012 at 7:30 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
> > On Tue, Oct 09, 2012 at 04:16:16PM +0200, Lennart Poettering wrote:
> >> On Tue, 09.10.12 09:09, Chris Adams (cmadams@hiwaay.net) wrote:
> >>
> >> > Once upon a time, Lennart Poettering <mzerqung@0pointer.de> said:
> >> > > If people want some pixel-perfect copy of the traditional
> >> > > /var/log/messages, then they should just run "journalctl" without any
> >> > > args. It's much better than /var/log/messages:
> >> >
> >> > How do you read this log when the system is not running (e.g. mounting
> >> > filesystems of a drive on another system, running from a rescue image,
> >> > etc.)?
> >>
> >> journalctl -D <pathtothejournalfiles>
> >
> > What is <pathtothejournalfiles> in an actual system?
>
> From the man page:
>
> By default the journal stores log data in /run/log/journal/. Since
> /run/ is volatile log data is lost at reboot.

WTF?

> To make the data
> persistent it is sufficient to create /var/log/journal/ where
> systemd-journald will then store the data.

I'm assuming this directory will be created, before /var/log/messages
disappears.

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-09-2012, 05:38 PM
Lennart Poettering
 
Default replacing rsyslogd in minimal with journald

On Tue, 09.10.12 18:37, Richard W.M. Jones (rjones@redhat.com) wrote:

> On Tue, Oct 09, 2012 at 07:34:50PM +0200, drago01 wrote:
> > On Tue, Oct 9, 2012 at 7:30 PM, Richard W.M. Jones <rjones@redhat.com> wrote:
> > > On Tue, Oct 09, 2012 at 04:16:16PM +0200, Lennart Poettering wrote:
> > >> On Tue, 09.10.12 09:09, Chris Adams (cmadams@hiwaay.net) wrote:
> > >>
> > >> > Once upon a time, Lennart Poettering <mzerqung@0pointer.de> said:
> > >> > > If people want some pixel-perfect copy of the traditional
> > >> > > /var/log/messages, then they should just run "journalctl" without any
> > >> > > args. It's much better than /var/log/messages:
> > >> >
> > >> > How do you read this log when the system is not running (e.g. mounting
> > >> > filesystems of a drive on another system, running from a rescue image,
> > >> > etc.)?
> > >>
> > >> journalctl -D <pathtothejournalfiles>
> > >
> > > What is <pathtothejournalfiles> in an actual system?
> >
> > From the man page:
> >
> > By default the journal stores log data in /run/log/journal/. Since
> > /run/ is volatile log data is lost at reboot.
>
> WTF?
>
> > To make the data
> > persistent it is sufficient to create /var/log/journal/ where
> > systemd-journald will then store the data.
>
> I'm assuming this directory will be created, before /var/log/messages
> disappears.

Yes, of course.

Lennart

--
Lennart Poettering - Red Hat, Inc.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-09-2012, 05:47 PM
Matthew Miller
 
Default replacing rsyslogd in minimal with journald

On Tue, Oct 09, 2012 at 07:27:19PM +0200, Lennart Poettering wrote:
> That all said, the color and autopaging is disabled automatically if you
> pipe the tools to something that is not a tty. You can also enable this
> via command line args, and env vars. This is similar to man or git. If

As long as it does the right thing in the non-tty case, it's not such a big
deal. But in the current version, it _doesn't_ do the right thing. It's good
that you've fixed the upcoming release, but didn't we also go through this
exact same thing with systemctl output?

Searching through output is a _primary activity_ of the consumers of both of
these utilities!



--
Matthew Miller ☁☁☁ Fedora Cloud Architect ☁☁☁ <mattdm@fedoraproject.org>
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-09-2012, 05:51 PM
Lennart Poettering
 
Default replacing rsyslogd in minimal with journald

On Tue, 09.10.12 10:45, Matthew Miller (mattdm@fedoraproject.org) wrote:

> > i) You always see the full set of logs you have access to. No need
> > anymore to to look through /var/log/messages, /var/log/secure and so
> > on one individually. And you get all of this nicely interleaved.
>
> As noted in an earlier message, that distinction is there for a reason. We
> need a way to provide the same in the new system.

The journal is actually tighter in security in this regard. By default
users can only get access to their own logs, but not to the system
logs. Only users in the "adm" group can see system logs and logs of
other users. We also securely determine who is logging and split this
off into separate files, so that unprivileged users cannot spam the logs
anymore and have their fake messages spill into supposedly secure logs.

To summarize:

Previously: /var/log/secure readable only for root, /var/log/messages
readable for everybody and including data from everybody.

Now: A journal for each user with only his data in it. Only readable by
the user himself and members of "adm" and root. One journal for the
system, with only trusted data in it. Only readable by adm and root. For
each caller all accessible files interleaved transparently on display.

I think the new behaviour makes a ton more sense than anything before.

Lennart

--
Lennart Poettering - Red Hat, Inc.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-09-2012, 05:53 PM
Lennart Poettering
 
Default replacing rsyslogd in minimal with journald

On Tue, 09.10.12 11:00, Matthew Miller (mattdm@fedoraproject.org) wrote:

> On Tue, Oct 09, 2012 at 10:45:24AM -0400, Matthew Miller wrote:
> > > c) it auto-pages if run on a tty
> > Hmmm. That's not necessarily what people are expecting, but okay.
>
> To expand on this: there is a general expectation that non-interactive
> console tools will return control to the user immediately. Auto-paging is a
> different user-experience that doesn't necessarily dovetail with the Linux
> lineage. UI and UX aren't _just_ for GUI programs, after all.

Not true. Open your eyes. git! man! ...

Lennart

--
Lennart Poettering - Red Hat, Inc.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-09-2012, 05:58 PM
Lennart Poettering
 
Default replacing rsyslogd in minimal with journald

On Tue, 09.10.12 11:30, Matthew Miller (mattdm@fedoraproject.org) wrote:

> On Tue, Oct 09, 2012 at 05:24:42PM +0200, Richard Marko wrote:
> > > Compared to the other things I mentioned this is less important (because
> > > hey, sysadmins can learn new ways!), but I wanted to elaborate on where this
> > > is coming from.
> > +1. For example swapping action and name parameters for systemctl
> > compared to service calls is just annoying.
>
> Yes. Again, you're not the first person I've heard this from. Likewise,
> needing to fill out the .service extension. Both make a certain logical
> sense from a design point of view, but they're not putting the user first.

Note that in F18 we will append ".service" if a unit name otherwise
makes no sense.

In fact, there are a number of other little gimmicks in there:

"systemctl status foobar" is equivalent to "systemctl status foobar.service"
"systemctl status /dev/sda" is equivalent to "systemctl status dev-sda.device"
"systemctl status /home" is equivalent to "systemctl status home.mount"
"systemctl status ddel.service" is equivalent to "systemctl status dxc3xb6del.service"

Or with other words: we now have rules to qualify strings that otherwise
make no sense or are invalid with a very minimal, simple and static logic.

Lennart

--
Lennart Poettering - Red Hat, Inc.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-09-2012, 06:29 PM
Jesse Keating
 
Default replacing rsyslogd in minimal with journald

On 10/09/2012 05:55 AM, John.Florian@dart.biz wrote:

From: "Jhann B. Gumundsson" <johannbg@gmail.com>



I personally want to see the documentation releng/fesco has about what
the default minimal set, what the process is to have something
include,excluded from it and why the packages that exist in it are there



in the first place.


I too would very much like to see this as almost all of the (hundreds,
soon to be thousands of) systems I manage start life as a minimal install
and grow "just enough" to fit their role. I take "minimal" quite
literally in that I believe it should be the absolute minimum to boot,
login and install more atop of that, but only as needed. Anything beyond
this is some "use case", but minimal is minimal.

--
John Florian






And now we see why Anaconda did /not/ have a "minimal" option for a
while. Minimal means different things.


To some, it means an OS that boots, lets root log in, read man pages,
use non-english languages, and add more packages with depsolving. To
others it means an OS that boots and lets root login, and that's it.
Others feel that minimal should be enough to give you a filesystem and
runtime you can chroot into (but no kernel/bootloader).


Right now, "minimal" is defined in comps, as a set of packages.
Installing this group will depsolve and add more of course, which is
controlled by the packages itself. Anaconda will add a few more things
forcefully, such as a kernel and a bootloader and potential arch
specific utilities, as well as authconfig and
system-config-firewall-base in order to add the root user and configure
the firewall.


There are a couple places to make adjustment to what "minimal" is, comps
and the packages. As for the things Anaconda adds, we're not too keen
on having that be "configurable". Anaconda is really meant to be
creating bootable systems, not necessarily stripped down chroots.


That said, we do have multiple install paths in Anaconda now, and it's
not beyond the realm of imagination that there could be a mode that
creates a chroot, optionally bootable, with a very trimmed down set.
This would likely have to be driven by kickstart files, but does seem to
dovetail a bit with the Arm effort, where installs are just blasting
bits onto a SD card.


Interested parties should take up this effort and run with it, the
Anaconda team won't likely be spending any time on this for a while, if
ever. We will however review patches and guide those wanting to work on it.


--
Jesse Keating
Fedora -- Freedom is a feature!
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-09-2012, 06:40 PM
Chris Adams
 
Default replacing rsyslogd in minimal with journald

Once upon a time, Lennart Poettering <mzerqung@0pointer.de> said:
> Only users in the "adm" group can see system logs and logs of
> other users.

Is this configurable (if so, how)? For example, all the "wheel is
special" behavior I am aware of is configurable (e.g. PAM config,
visudo).

Also: what is the equivalent for logrotate in the systemd journal case?
How can you configure how much log data is kept and for how long?

--
Chris Adams <cmadams@hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 10-09-2012, 06:47 PM
Lennart Poettering
 
Default replacing rsyslogd in minimal with journald

On Tue, 09.10.12 13:40, Chris Adams (cmadams@hiwaay.net) wrote:

> Once upon a time, Lennart Poettering <mzerqung@0pointer.de> said:
> > Only users in the "adm" group can see system logs and logs of
> > other users.
>
> Is this configurable (if so, how)? For example, all the "wheel is
> special" behavior I am aware of is configurable (e.g. PAM config,
> visudo).

This is currently not configurable.

> Also: what is the equivalent for logrotate in the systemd journal
> case?

Rotation happens in-line, i.e. each time before we are about to write an
entry we check if rotation is necessary and execute it. This should make
things a lot more robust, as this fixes a common issue with syslog where
a lot of data generated in bursts could flood the fs until a much later
time-based rotation took place. This time window goes away with the journal.

> How can you configure how much log data is kept and for how long?

Rotation is strictly bound to disk size and space. There's an upper
limit on how much journald will consume, and a lower limit on how much
journald will always leave free.

See SystemMaxUse= resp. SystemKeepFree= in journald.conf(5).

Lennart

--
Lennart Poettering - Red Hat, Inc.
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 09:32 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org