On Mi, 14.02.18 06:42, P.R.Dinesh (pr.din...@gmail.com) wrote:

> I am interesting in getting some statistics information from journal, for
> eg.,
> 1) number of logs
> 2) number of logs per severity
> 3) number of logs per daemon

I presume you mean "log records" when you write "logs", right?

Such accounting is currently not available. Please file an RFE issue
about this, or even better a PR implementing this.

> 4) time when log rotate happen

In theory we could add a recognizable log record for this (i.e. one
that can be recognized by its MESSAGE_ID field), but so far we didn't
since it's kind of a feedback loop thing: rotation is supposed to make
room for new log records, but if we generate log output for doing it
then we'll also make it consume space right-away.

That said, we might want to revisit this, hence please file an RFE
issue about this too.

> ...
> Currently I am generating these data using journalctl and wc (journalctl
> <Filter> | wc -l)
> Is there any other better/native way to get these statistics?

Currently not, no.


Lennart Poettering, Red Hat
systemd-devel mailing list

Reply via email to