TrueNAS shell: how to see background task

Hello,

from TrueNAS 20.10.0.2 shell I ran the format command to one of drives
sudo sg_format -v --format --size=4096 /dev/sdv

This command has a verbose output, the progress percent, and it’s okay.

If I then move to any other TrueNAS page, e.g. Dashboard, and then I came back to shell the above command output is gone.

Beside of the arguable TrueNAS shell design, how can I, from TrueNAS shell, bring back the still running format command, to know at which percent is it?

Look up tmux - that will enable you to do what you want

If you remember to use tmux before you start the command, that is. It won’t help after the fact.

As others have said, next time use tmux to create a session that survives you closing the shell interface. Or use ssh instead of the built-in shell, or both.

At this point you should be able to use sudo sg_turs --progress /dev/sdv to see the current status, if the formatting is still ongoing.

Sg_turs is installed, but the above command produces no output at all.

tmux is the solution, thanks!

The ssh option involves the deployment of an additional always on machine to login via ssh into TrueNAS Scale (ssh is already active for other purposes) only to manage the drive format … I wish avoid this option but I will adopt in case TrueNAS tmux implementation doesn’t meet my expectations.

Thanks guys.