Added systemd journal pane
This commit is contained in:
parent
0c8de47893
commit
ee4cea3b01
1 changed files with 10 additions and 2 deletions
|
|
@ -847,8 +847,9 @@ def run_ddrescue(state, pass_settings):
|
|||
# NOTE: 12/33 is based on min heights for SMART/ddrescue panes (12+22+1sep)
|
||||
result = run_program(['tput', 'lines'])
|
||||
height = int(result.stdout.decode().strip())
|
||||
height_smart = int(height * (12 / 33))
|
||||
height_ddrescue = height - height_smart
|
||||
height_smart = int(height * (8 / 33))
|
||||
height_journal = int(height * (4 / 33))
|
||||
height_ddrescue = height - height_smart - height_journal
|
||||
|
||||
# Show SMART status
|
||||
smart_pane = tmux_splitw(
|
||||
|
|
@ -857,6 +858,12 @@ def run_ddrescue(state, pass_settings):
|
|||
'watch', '--color', '--no-title', '--interval', '300',
|
||||
'ddrescue-tui-smart-display', state.source_path)
|
||||
|
||||
# Show systemd journal output
|
||||
journal_pane = tmux_splitw(
|
||||
'-dvl', str(height_journal),
|
||||
'-PF', '#D',
|
||||
'journalctl', '-f')
|
||||
|
||||
# Run pass for each block-pair
|
||||
for bp in state.block_pairs:
|
||||
if bp.pass_done[state.current_pass]:
|
||||
|
|
@ -926,6 +933,7 @@ def run_ddrescue(state, pass_settings):
|
|||
# Pause on errors
|
||||
pause('Press Enter to return to main menu... ')
|
||||
run_program(['tmux', 'kill-pane', '-t', smart_pane])
|
||||
run_program(['tmux', 'kill-pane', '-t', journal_pane])
|
||||
|
||||
|
||||
def select_parts(source_device):
|
||||
|
|
|
|||
Loading…
Reference in a new issue