You are not logged in.

#1 2024-02-22 11:47:55

tethys
Member
Registered: 2019-08-13
Posts: 175

Why different directory and files sizes shown?

I noticed recently that the journal size surpassed the limit of 256M I set in "journald.conf". The journal directory contain 100 files: 61 of them are of about 8M, the rest of about 1M, giving a total size of over 500M.

For example:

$ ls -la /var/log/journal/8f6e4a856cfd425f990978a6b982b42d/user-1000@3e335690a3f24c47b62cc972b1c7beab-0000000000076f42-000610ed6e0f5c39.journal
-rw-r-----+ 1 root systemd-journal 8388608 11. Feb 07:52 /var/log/journal/8f6e4a856cfd425f990978a6b982b42d/user-1000@3e335690a3f24c47b62cc972b1c7beab-0000000000076f42-000610ed6e0f5c39.journal

However:

$ du -sh /var/log/journal/8f6e4a856cfd425f990978a6b982b42d/user-1000@3e335690a3f24c47b62cc972b1c7beab-0000000000076f42-000610ed6e0f5c39.journal
1,8M	/var/log/journal/8f6e4a856cfd425f990978a6b982b42d/user-1000@3e335690a3f24c47b62cc972b1c7beab-0000000000076f42-000610ed6e0f5c39.journal

and

$ du -sh /var/log/journal/8f6e4a856cfd425f990978a6b982b42d/
164M	/var/log/journal/8f6e4a856cfd425f990978a6b982b42d/

What is going on here?

Offline

#2 2024-02-22 11:56:34

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,267

Re: Why different directory and files sizes shown?

You're probably counting things incorrectly or *observed* things while in the process of getting cleaned/rotated out. If you want more accurate information on journal usage use

journalctl --disk-usage

the journal retains a bunch of data in memory first before persisting it to disc so deviations during "naive" file lookups can be expected while things are shuffled/moved around/compressed

Offline

Board footer

Powered by FluxBB