[lxc-users] Why does lxc-monitor insist on logging to a file?

Forest forestcode at ixio.org
Sun Apr 12 17:48:08 UTC 2020


On Sun, 12 Apr 2020 10:51:16 -0500, Serge E. Hallyn wrote:

>On Sat, Apr 11, 2020 at 08:09:56PM -0700, Forest wrote:
>> I am not passing any command line options to lxc-monitor, and its manual
>> says, "The default is no log."  Nevertheless, whenever I run it,
>> lxc-monitord writes to lxc-monitord.log.
>> 
>> I have tools that regularly use lxc-monitor, and this log file has been
>> slowly growing in size for who knows how long.  Passing -o /dev/null doesn't
>> help.  How can I banish this file?
>> 
>> $ lxc-monitor --version
>> 3.0.4
>
>Can you show how exactly you start lxc-monitor?  Which file exactly
>is being created, and can you show a few of its lines?
>
>-o /dev/null ought to work, but maybe try -l none instead.

Neither of those work.

I start lxc-monitor by running "lxc-monitor" from the bash command line. No
arguments.

The file created is lxc-monitord.log, in the directory I have configured as
lxc.lxcpath (whre all my container directories live).  Sample contents that
appear immediately in the file:

lxc-monitord 20200412174238.561 INFO     monitor -
monitor.c:lxc_monitor_sock_name:213 - Using monitor socket name
"lxc/bfa3b48b08475425//home/username/lxc" (length of socket name 37 must be
<= 105)
lxc-monitord 20200412174238.578 NOTICE   lxc_monitord -
cmd/lxc_monitord.c:main:445 - lxc-monitord with pid 6422 is now monitoring
lxcpath /home/username/lxc
lxc-monitord 20200412174238.580 INFO     lxc_monitord -
cmd/lxc_monitord.c:lxc_monitord_sock_accept:233 - Accepted client file
descriptor 5. Number of accepted file descriptors is now 1


More information about the lxc-users mailing list