LinuxCommandLibrary

pueue-follow

Follow the output of running Pueue tasks

TLDR

Follow the output of a task (stdout + stderr)

$ pueue follow [task_id]
copy

Follow stderr of a task
$ pueue follow --err [task_id]
copy

SYNOPSIS

pueue follow [OPTIONS] [TASK_ID...]

PARAMETERS

-g, --group <GROUP>
    Follows the output of tasks belonging to the specified group. This is useful for monitoring a subset of tasks related to a particular project or workflow.

-a, --all
    Follows the output of all currently active and pending tasks in the Pueue queue. This can provide a comprehensive overview of all ongoing processes.

-s, --show-task-id
    Prepends each line of output with the corresponding task ID. This option is particularly useful when following multiple tasks simultaneously, helping to distinguish their outputs.

-W, --wait
    (Default behavior) Continuously streams the task output until the task completes, fails, or is stopped. This ensures you see the entire execution lifecycle.

--no-wait
    Prints the current captured output of the specified tasks and then exits immediately, without waiting for the tasks to complete. Useful for quick checks.

--no-log-timestamps
    Suppresses the display of timestamps that are normally prepended to each line of log output by the Pueue daemon. Provides cleaner raw output.

--full-task-output
    Displays the complete captured output for the task(s), rather than a truncated view that might be applied by default for very long logs.

DESCRIPTION

The pueue follow command allows users to monitor the standard output (stdout) and standard error (stderr) of tasks managed by the Pueue task manager in real-time. This command is invaluable for tracking the progress of long-running jobs, debugging scripts, or simply observing the live output of a task as it executes.

Unlike pueue log, which displays the full historical output of completed tasks, pueue follow provides a live stream of the output from active or recently completed tasks. By default, if no task IDs are specified, it will follow the most recently added task. Users can specify one or more task IDs or use options to follow tasks within a specific group or even all active tasks. It connects to the running Pueue daemon to fetch and display the captured output, offering immediate feedback on task execution.

CAVEATS

The pueue follow command requires the Pueue daemon to be running and accessible, as it retrieves output directly from the daemon's internal logging mechanism. If the daemon is not running or the connection fails, the command will not be able to retrieve task output.

Following many active tasks with high output rates can consume significant terminal resources and may lead to performance issues if the output is extremely verbose. The displayed output is only what Pueue itself has captured, so any external logging or unbuffered output might not be immediately visible.

INTERACTIVE MONITORING

This command is the primary tool for interactive monitoring of ongoing jobs. It keeps the terminal focused on the task's progress, allowing for immediate observation of errors or completion messages without needing to constantly re-run pueue status or manually check log files.

TASK IDENTIFICATION

When no TASK_ID is provided, pueue follow defaults to observing the latest task. Providing specific TASK_IDs allows for precise monitoring of particular tasks, while using --group helps to manage monitoring within logical task subsets.

HISTORY

The Pueue project, initiated by NicoHood, aimed to create a user-friendly and robust command-line task queue manager. The pueue follow command was an integral part of its design from early stages, recognized as crucial for providing real-time operational feedback to users. Its development has mirrored that of the main Pueue application, adapting to new features like task grouping and improved output handling, ensuring that users can always effectively monitor their background tasks.

SEE ALSO

pueue(1), pueue status(1), pueue log(1), tail(1), watch(1)

Copied to clipboard