LCM-LOGGER(1)

NAME
lcm-logger - a logging tool

SYNOPSIS

lcm-logger [options] [FILE]

DESCRIPTION
usage: lcm-logger [options] [FILE]

LCM message logging utility. Subscribes to all channels on an LCM network, and records all messages received on that network to FILE. If FILE is not specified, then a filename is automatically chosen.

OPTIONS

-c, --channel=CHAN
    Channel string to pass to lcm_subscribe. (default: ".*")

--flush-interval=MS
    Flush the log file to disk every MS milliseconds. (default: 100)

-f, --force
    Overwrite existing files.

-h, --help
    Shows this help text and exits.

-i, --increment
    Automatically append a suffix to FILE such that the resulting filename does not already exist. This option precludes -f and --rotate.

-l, --lcm-url=URL
    Log messages on the specified LCM URL

-m, --max-unwritten-mb=SZ
    Maximum size of received but unwritten messages to store in memory before dropping messages. (default: 100 MB)

--rotate=NUM
    When creating a new log file, rename existing files out of the way and always write to FILE.0. If FILE.0 already exists, it is renamed to FILE.1. If FILE.1 exists, it is renamed to FILE.2, etc. If FILE.NUM exists, then it is deleted. This option precludes -i.

--split-mb=N
    Automatically start writing to a new log file once the log file exceeds N MB in size (can be fractional). This option requires -i or --rotate.

-q, --quiet
    Suppress normal output and only report errors.

-a, --append
    Append events to the given log file.

-s, --strftime
    Format FILE with strftime.

-v, --invert-channels
    Invert channels. Log everything that CHAN does not match.

--disk-quota=SIZE
    Minimum amount of free space to reserve on the disk being written to. lcm-logger will exit when it sees the current free disk space has fallen below the quota minimum. For example, given `du -H` reports 15 GB free, and that nothing else is changing the target disk, --disk-quota=10GB means that lcm-logger will not write more than 5 GB before it exits. Units accepted: B 1024: K, M, G, T, P, E, Ki, Mi, Gi, Ti, Pi, Ei, KiB, MiB, GiB, TiB, PiB, EiB 1000: KB, MB, GB, TB, PB, EB e.g. "50G" or "0.05 TiB". Units are treated case insensitively. gb is treated as GB (gigabytes) and not as gigabits. Note for `df`: -h is 1024 and -H is 1000 units. NOT currently supported on Windows!

Rotating / splitting log files ==============================

    For long-term logging, lcm-logger can rotate through a fixed number of log files, moving to a new log file as existing files reach a maximum size. To do this, use --rotate and --split-mb. For example:

    # Rotate through logfile.0, logfile.1, ... logfile.4 lcm-logger --rotate=5 --split-mb=2 logfile

    Moving to a new file happens either when the current log file size exceeds the limit specified by --split-mb, or when lcm-logger receives a SIGHUP. A user may send SIGHUP with the kill command to trigger rotating logs.

SIGNALS

On platforms defining SIGHUP, lcm-logger will react to HUP by closing the active log file and opening a new one.

COPYRIGHT
lcm-logger is part of the Lightweight Communications and Marshalling (LCM) project. Permission is granted to copy, distribute and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. See the file COPYING in the LCM distribution for more details regarding distribution. LCM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with LCM; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

SEE ALSO
strftime(3)