Scroll to navigation

SAVELOG(1) General Commands Manual SAVELOG(1)

NAME

savelog - save log files from within an ns-exec session

SYNOPSIS

savelog [ options ...] filename ...

DESCRIPTION

This utility works within a shell session spawned by ns-exec(1). For example, it could be used like this:


# ns-exec --export /opt/tools:/mnt --savelogs ./diagnostics -C testcontainer
...
testcontainer# /mnt/savelog /var/log/myapplication.log
Stored /var/log/myapplication.log

This will transfer myapplication.log from the container's filesystem and store it as ./diagnostics/var/log/myapplication.log.

IMPLEMENTATION NOTE

At the moment, savelog works by opening the savelog directory in the host context, and passing the open file descriptor to the shell session. The fd is identified by an environment variable passed to the shell and its children. This allows savelog(1) to access the directory and create files and directories within it.

However, users of savelog should not rely on specific properties of this approach.

SEE ALSO

ns-exec(1).

AUTHORS

Written by Olaf Kirch <okir@suse.com>

26 April 2020 4.3 Berkeley Distribution