On 19/04/2018 7:55 AM, Rupert Gallagher wrote:
On Thu, Apr 19, 2018 at 15:38, Zé Loff <zel...@zeloff.org> wrote:
# mountd -d > /var/log/mountd.log 2&>1 &
It is the first thing I did this morning. Unfortunately it does not survive
when ssh breaks out. Also, mountd -d is returning the shell prompt again, so I
have no logs at all.
Hi,
A couple of things... you need to read about "nohup" if you are trying
to run programs in the background and they are getting killed when the
ssh session ends.
Additionally, there are two programs that are very useful..
script
and
screen
"script" is on every Unix type system that I've ever been on in my last
35+ years of working on Unix type systems.
I believe that there is an "in-tree" replacement for the functionality
that "screen" brings, but I cannot remember what it's called.
Otherwise, use the screen package.
"screen" allows you to run an interactive session (mountd -d) and
"detach" (^AD) the session, log out, and at some point in the future,
"resume" the screen session.. (screen -r).
Combined with "script", which will log all information that is appearing
on the screen to a file, you should be able to run "mountd -d" and
capture all information to a file, as well as resuming the session to
see what is going on interactively.
Cheers,
Steve W.