Skip to contentSkip to conversation

Logging to syslog from clients

DISCUSSION Székelyi Szabolcs 4 participants 6 messages Aug 16, 2011 – Aug 17, 2011

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm running a Ceph cluster with a number of read-only ramdisk based clients mounting the filesystem. I'd like to get the logs of the client out via syslog. I've seen some posts dealing with logging to syslog, namely the thread starting at http://www.spinics.net/lists/ceph-devel/msg02876.html . I see options like "log to syslog" and "clog to syslog". It's not clear what they mean, could someone tell me the difference?

Anyway, currently my logging settings on the client are

[global]
log file =
log dir =
log to syslog = true
clog to syslog = true

But when the filesystem is mounted with the FUSE client, I still get

failed to open log file '/var/log/ceph/client.admin.log': error 2: No such file or directory

which is surprising. I thought that the above options should have disabled logging to file, but it looks like it still tries to open it. Is this a bug, or me doing something wrong?

Thanks,

Signature · 1 line
cc
#1 lore raw

2011/8/15 Székelyi Szabolcs <[email protected]>:

Quoted 8 lines

Hi all,

I'm running a Ceph cluster with a number of read-only ramdisk based clients mounting the filesystem. I'd like to get the logs of the client out via syslog. I've seen some posts dealing with logging to syslog, namely the thread starting at http://www.spinics.net/lists/ceph-devel/msg02876.html . I see options like "log to syslog" and "clog to syslog". It's not clear what they mean, could someone tell me the difference?

"clog" is the center logger, which is a separate subsystem from the regular logger. The central log is maintained by the monitors rather than being a per-daemon thing like the regular log.

Quoted 9 lines

Anyway, currently my logging settings on the client are

[global]
log file =
log dir =
log to syslog = true
clog to syslog = true

Quoted 8 lines

But when the filesystem is mounted with the FUSE client, I still get

failed to open log file '/var/log/ceph/client.admin.log': error 2: No such file or directory

which is surprising. I thought that the above options should have disabled logging to file, but it looks like it still tries to open it. Is this a bug, or me doing something wrong?

This looks like an actual bug :(
I'm testing out a fix that will allow users to turn off log files for daemons again.

On an unrelated note: when you log to syslog, you may need to turn down the logging a little bit. Syslog tends to drop log messages when the load gets heavy, and this makes it harder to figure out what is going on.

regards,
Colin

Quoted 10 lines

Thanks,
--
cc

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

2011/8/15 Colin McCabe <[email protected]>:

Quoted 28 lines

2011/8/15 Székelyi Szabolcs <[email protected]>:

Quoted 8 lines

Hi all,

I'm running a Ceph cluster with a number of read-only ramdisk based clients mounting the filesystem. I'd like to get the logs of the client out via syslog. I've seen some posts dealing with logging to syslog, namely the thread starting at http://www.spinics.net/lists/ceph-devel/msg02876.html . I see options like "log to syslog" and "clog to syslog". It's not clear what they mean, could someone tell me the difference?

"clog" is the center logger, which is a separate subsystem from the regular logger. The central log is maintained by the monitors rather than being a per-daemon thing like the regular log.

Quoted 14 lines

Anyway, currently my logging settings on the client are

[global]
log file =
log dir =
log to syslog = true
clog to syslog = true

But when the filesystem is mounted with the FUSE client, I still get

failed to open log file '/var/log/ceph/client.admin.log': error 2: No such file or directory

Quoted 7 lines
Quoted 3 lines

which is surprising. I thought that the above options should have disabled logging to file, but it looks like it still tries to open it. Is this a bug, or me doing something wrong?

This looks like an actual bug :(
I'm testing out a fix that will allow users to turn off log files for daemons again.

This should be fixed in master by
8072bdcaa4445359051fed443be3d702f20807e0

This should fix it for you.

cheers,
Colin

Quoted 22 lines

On an unrelated note: when you log to syslog, you may need to turn down the logging a little bit. Syslog tends to drop log messages when the load gets heavy, and this makes it harder to figure out what is going on.

regards,
Colin

Quoted 10 lines

Thanks,
--
cc

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Hi Colin,

Quoted 15 lines · On 2011. August 16. 06:10:32 Colin McCabe wrote:

2011/8/15 Colin McCabe <[email protected]>:

Quoted 14 lines

2011/8/15 Székelyi Szabolcs <[email protected]>:

Quoted 9 lines

Hi all,

I'm running a Ceph cluster with a number of read-only ramdisk based clients mounting the filesystem. I'd like to get the logs of the client out via syslog. I've seen some posts dealing with logging to syslog, namely the thread starting at
http://www.spinics.net/lists/ceph-devel/msg02876.html . I see options like "log to syslog" and "clog to syslog". It's not clear what they mean, could someone tell me the difference?

"clog" is the center logger, which is a separate subsystem from the regular logger. The central log is maintained by the monitors rather than being a per-daemon thing like the regular log.

My would have gone to clog = client log. Thanks for the clarification.

Quoted 17 lines
Quoted 17 lines
Quoted 16 lines

Anyway, currently my logging settings on the client are

[global]
log file =
log dir =
log to syslog = true
clog to syslog = true

But when the filesystem is mounted with the FUSE client, I still get

failed to open log file '/var/log/ceph/client.admin.log': error 2: No such file or directory

which is surprising. I thought that the above options should have disabled logging to file, but it looks like it still tries to open it. Is this a bug, or me doing something wrong?

Quoted 8 lines
Quoted 3 lines

This looks like an actual bug :(
I'm testing out a fix that will allow users to turn off log files for daemons again.

This should be fixed in master by
8072bdcaa4445359051fed443be3d702f20807e0

This should fix it for you.

Thanks, Colin. Since I don't compile sources myself, I'll wait for the next release to roll this out.

Signature · 6 lines
cc

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
In reply to Colin McCabe

Hi,

Quoted 32 lines · Colin McCabe

2011/8/15 Székelyi Szabolcs <[email protected]>:

Quoted 8 lines

Hi all,

I'm running a Ceph cluster with a number of read-only ramdisk based clients mounting the filesystem. I'd like to get the logs of the client out via syslog. I've seen some posts dealing with logging to syslog, namely the thread starting at http://www.spinics.net/lists/ceph-devel/msg02876.html . I see options like "log to syslog" and "clog to syslog". It's not clear what they mean, could someone tell me the difference?

"clog" is the center logger, which is a separate subsystem from the regular logger. The central log is maintained by the monitors rather than being a per-daemon thing like the regular log.

Quoted 9 lines

Anyway, currently my logging settings on the client are

[global]
log file =
log dir =
log to syslog = true
clog to syslog = true

Quoted 8 lines

But when the filesystem is mounted with the FUSE client, I still get

failed to open log file '/var/log/ceph/client.admin.log': error 2: No such file or directory

which is surprising. I thought that the above options should have disabled logging to file, but it looks like it still tries to open it. Is this a bug, or me doing something wrong?

Quoted 8 lines

This looks like an actual bug :(
I'm testing out a fix that will allow users to turn off log files for daemons again.

On an unrelated note: when you log to syslog, you may need to turn down the logging a little bit. Syslog tends to drop log messages when the load gets heavy, and this makes it harder to figure out what is going on.

I also had that issue, but when using rsyslogd and using TCP for transport instead of UDP I wasn't able to see any dropped packets.

To my experience it's not syslog dropping the packets, but UDP packets which get lost due to buffers being full at the kernel.

# Sent all message to the remote syslog machine, then discard them to prevent local logging
# Use TCP (@@) for transmission to prevent packet loss :rawmsg,contains,"osd." @@loghost
& ~
:rawmsg,contains,"mon." @@loghost
& ~
:rawmsg,contains,"mds." @@loghost
& ~

Wido

Quoted 16 lines

regards,
Colin

Quoted 10 lines

Thanks,
--
cc

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw
Quoted 5 lines · Wido den Hollander

I also had that issue, but when using rsyslogd and using TCP for transport instead of UDP I wasn't able to see any dropped packets.

To my experience it's not syslog dropping the packets, but UDP packets which get lost due to buffers being full at the kernel.

A TCP syslog connection will drop messages if the kernel's outgoing TCP buffer gets full. You can see this in "ss --tcp" (old school:
"netstat -nt") output column Send-Q.

UDP loses messages even faster because it effectively doesn't have an outgoing buffer (it does, but it'll blast the contents on the wire ASAP). That is, UDP syslog loses messages easily if the bottleneck is anywhere else than in the outgoing network interface; TCP syslog gives you a TCP window size of grace to handle peaks.

Even syslog over UNIX domain sockets can lose messages, if the receiving process is too slow and the buffers fill up.

Basically, in logging, you have two choices when buffers get full:
pause the program/thread until buffer space is available (using e.g. straight writes to file, or runit/daemontools-style logging to stdout), or lose log messages (decision made by glibc/POSIX for you).