[systemd-devel] Documentation question

David Lambert dave at lambsys.com
Sat Mar 3 10:03:15 PST 2012


On 03/03/2012 11:29 AM, David Lambert wrote:
> On 02/29/2012 07:26 AM, Lennart Poettering wrote:
>>
>> You can put limits on the log size however, for example via
>> SystemMaxUse=64M or SystemKeepFree=500M or suchlike.
>
Further experimentation seems to indicate that the first time a limit is 
reached, the system trims the log file back, BUT subsequently it appears 
to ignore all limits:

root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
252K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
256K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
296K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
300K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
68K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal 
<<<<<<<<<<<<<<<<<<journal file trimmed as expected
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
76K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
76K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
88K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
100K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
132K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
140K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
160K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
272K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
288K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
336K    /run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
612K    
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal<<<<<<<<<<<<<<<<journal 
file continues to grow ......
...
root at argus2:~# du -s 
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal -h
1.3M    
/run/log/journal/bd4dce8541064e29b00e90f7234b3287/system.journal<<<<<<<<<<<<<<<<....and 
grow until all memory is exhausted :(

Configuration file is:

root at argus2:~# cat /etc/systemd/systemd-journald.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
# See system-journald.conf(5) for details

[Journal]
#Compress=yes
#RateLimitInterval=10s
#RateLimitBurst=200
SystemMaxUse=100K
#SystemKeepFree=
SystemMaxFileSize=200K
#SystemMinFileSize=
RuntimeMaxUse=1M
#RuntimeKeepFree=
RuntimeMaxFileSize=300K
#RuntimeMinFileSize=
ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
#ImportKernel=yes




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20120303/a7d5a4e0/attachment.htm>


More information about the systemd-devel mailing list