LinuxCommandLibrary

uv-tree

Visualize process relationships as a tree

TLDR

Show dependency tree for current environment

$ uv tree
copy

Show dependency tree for all environments
$ uv tree --universal
copy

Show dependency tree up to a certain depth
$ uv tree [[-d|--depth]] [n]
copy

Show the latest available version for all outdated packages
$ uv tree --outdated
copy

Exclude dependencies from the dev group
$ uv tree --no-dev
copy

Show the inverted tree, so children are dependents instead of dependencies
$ uv tree --invert
copy

SYNOPSIS

uv-tree [-u username]

PARAMETERS

-u username
    Specifies the user whose processes will be displayed. If no username is provided, the processes of the current user are shown.

DESCRIPTION

The uv-tree command is a utility used to display processes in a hierarchical tree format, emphasizing user ownership. Unlike `pstree`, it specifically filters processes by user, showing only those owned by the specified user (or the current user if none is specified).

This makes it particularly helpful for understanding the process structure within a specific user's context. The output visually represents the parent-child relationships between processes, making it easier to identify process chains and understand how different processes are spawned and managed by a particular user. It uses indentation to indicate the process hierarchy. Each line displays the process ID (PID) and the command name associated with the process. This enables efficient debugging and monitoring of user-specific processes and resource utilization, facilitating better system administration and troubleshooting. The tool simplifies finding runaway processes or identifying the source of unexpected activity by focusing on the user-level process hierarchy.

OUTPUT INTERPRETATION

The output of uv-tree displays processes as a tree. The root of the tree represents the init process (usually PID 1), and subsequent levels show child processes indented appropriately. Each line includes the PID and the command name.

Example: Suppose you run uv-tree -u john and see the following output:
1 - init
     1234 - bash
          5678 - vim

This indicates that the init process spawned a bash shell (PID 1234), and within that shell, the vim editor (PID 5678) is running. All these processes are owned by the user 'john'.

SEE ALSO

pstree(1), ps(1), top(1)

Copied to clipboard