Bug 1301579 - Request to add journalctl --disk-usage output in sosreport
Request to add journalctl --disk-usage output in sosreport
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos (Show other bugs)
7.2
x86_64 Linux
unspecified Severity low
: rc
: ---
Assigned To: Pavel Moravec
BaseOS QE - Apps
https://github.com/sosreport/sos/issu...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-25 07:35 EST by masanari iida
Modified: 2016-11-11 03:20 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-11 03:20:43 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description masanari iida 2016-01-25 07:35:06 EST
Description of problem:
Request to add "journalctl --disk-usage" output in sosreport

Version-Release number of selected component (if applicable):
sos-3.2-35.el7.noarch

Currently, the sosreport doesn't collect "journalctl --disk-usage".
It would be good to collect the data in sosreport.
Comment 2 Pavel Moravec 2016-01-25 08:09:29 EST
Could you please elaborate why this information would be valuable to collect?

Can't be the same information extracted from current data, e.g. from size of

sos_commands/logs/journalctl_--all_--this-boot_--no-pager_-o_verbose

(though not sure how --this-boot can affect it - with default journald settings, these values match before and also after reboot)?
Comment 3 Bryn M. Reeves 2016-01-25 08:18:48 EST
> Can't be the same information extracted from current data, e.g. from size of
> 
> sos_commands/logs/journalctl_--all_--this-boot_--no-pager_-o_verbose

No: that is a text rendering of the journal contents. The journal itself is stored in a binary format with additional metadata. Although the size of journal logs approximates the size of the journal they do not measure the same thing.

  http://www.freedesktop.org/wiki/Software/systemd/journal-files/

This is also useful since it presents a global summary of disk usage rather than piecemeal per-file, e.g. (Fedora 23):

# journalctl --disk-usage
Archived and active journals take up 640.1M on disk.

With all that said on RHEL7 it is slightly less interesting/accurate:

# journalctl --disk-usage
Journals take up 96.0M on disk.

Although it is true that there are 96.0M of journal files present on this system:

# du -ch /run/log/journal/
96M	/run/log/journal/8f1a41c7c31a4575bd21b465748f123c
96M	/run/log/journal/
96M	total

These are all on the non-persistent (in-memory) /run file system - RHEL7 does not use persistent journald logs at all by default so this will only ever measure the size of the logs from the current boot.

That said I don't see any reason to not collect this & it is then available for other distributions (like Fedora) that do already offer persistent journald logs by default.
Comment 4 Pavel Moravec 2016-01-26 04:55:40 EST
Makes sense. Esp. when cmd execution time and also output size are trivially small.

PR raised in upstream.
Comment 5 Pavel Moravec 2016-05-07 09:47:45 EDT
POSTed to upsetram as:

https://github.com/sosreport/sos/commit/28c87cdb311bafa194a1d2d8df2421b2a80323a7
Comment 6 Pavel Moravec 2016-11-11 03:20:43 EST
This has been fixed in upstream sos 3.3 we rebased to by [1] in RHEL7.3. Errata [2] should resolve this bug.

Please test [2] and in case it does not address the reported problem properly, reopen this BZ.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1293044
[2] https://rhn.redhat.com/errata/RHBA-2016-2380.html

Note You need to log in before you can comment on or make changes to this bug.