LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

hp-levels

Displays bar graphs of current ink or toner supply levels for HP printers

TLDR

Show ink/toner levels for the default/only installed printer
$ hp-levels
copy
Show levels for a specific CUPS printer
$ hp-levels -p [printer-name]
copy
Show levels by device URI
$ hp-levels -d [device-uri]
copy
Run interactively, choosing the printer from a list
$ hp-levels -i
copy
Draw a wider bar graph (default width is 51 characters)
$ hp-levels -s [80]
copy

SYNOPSIS

hp-levels [DEVICE-URI|PRINTER-NAME] [MODE] [OPTIONS]

DESCRIPTION

hp-levels queries an HPLIP-supported HP printer for its current ink or toner supply levels and renders them as text bar graphs in the terminal, one bar per installed cartridge or tank.Point it at a printer with -p or -d; with no target given it uses the sole installed HPLIP device or prompts to choose one when several are configured. This is the CLI equivalent of the supply-levels panel in the HPLIP toolbox GUI.

PARAMETERS

-d device-uri, --device=device-uri

Specify the target printer by CUPS device URI.
-p printer, --printer=printer
Specify the target printer by CUPS queue name.
-i, --interactive
Run in interactive mode, prompting to choose a device.
-s size, --size=size
Bar graph width in characters (default 51).
-c, --color
Use colored bar graphs (colorized by default).
-a char, --char=char
Character used to draw the bar graph (default /).
-l level, --logging=level
Set logging verbosity: none, info (default), error, warn, or debug.
-g
Run with debug-level logging (equivalent to -l debug).
-h, --help
Display help and exit.

INSTALL

sudo apt install hplip
copy
sudo dnf install hplip
copy
sudo pacman -S hplip
copy
sudo zypper install hplip
copy
nix profile install nixpkgs#hplip
copy

CAVEATS

Part of the HPLIP package. Level reporting accuracy and granularity vary by printer model; some cheaper models only report ok/low/out rather than a percentage, and a few report nothing at all.

HISTORY

hp-levels is one of the supply-monitoring utilities in HPLIP (HP Linux Imaging and Printing), HP's open-source printer/scanner driver suite for Linux.

SEE ALSO

hp-info(1), hp-check(1), lpstat(1)

RESOURCES

Copied to clipboard
Kai