DEVLINK(8)
๐ DEVLINK(8) โ the devlink tool, bestie edition ๐
okay so welcome to devlink(8), the Linux manual page for the devlink utility. Yes the title is all shouty up there but it's just devlink โ lowercase, chill, your new bestie for talking to the kernel's devlink subsystem. Sit down, grab a boba, let's get into it. ๐งโจ
๐ธ NAME ๐ธ
devlink โ the Devlink tool. That's it, that's the name. Short, iconic, does exactly what it says. ๐
โจ SYNOPSIS โจ
Here's the whole vibe in two lines:
devlink [ OPTIONS ] {
dev|port|monitor|sb|resource|region|health|trap|rate|lc|dpipe }
{ COMMAND | help }
devlink [ -force ] -batch filename
So like โ you pick an object from that big curly-brace menu, then you give it a command (or just help if you're feeling lost, no shame bestie). OR you go the batch route with a file. Either way, devlink's got you. ๐ซถ
๐ OPTIONS ๐
These are your little knobs and switches, okay? Every single one, no skips:
-V,--Versionโ prints the version of thedevlinkutility and then dips out. Bye! ๐-b,-batch <FILENAME>โ reads commands from the file you hand it (or from standard input) and runs them. Heads up: the first failure will cause termination ofdevlink. It does not play around. ๐-forceโ don't terminatedevlinkon errors in batch mode. So it keeps going even when things go sideways. But note this: if there were any errors during execution of the commands, the application return code will be non zero. It remembers. It always remembers. ๐-n,--no-nice-namesโ turns off printing out nice names. Like instead of the pretty devlink port identification, you get raw netdevice ifnames. Unglamorous but honest. โจ-j,--jsonโ generates JSON output. For when you want your data machine-readable and slightly mysterious. ๐ค-p,--prettyโ when combined with-j, generates a pretty JSON output. Aesthetic JSON. We love to see it. ๐-v,--verboseโ turns on verbose output. It's giving "tell me everything". ๐-s,--statisticsโ outputs statistics. Numbers, numbers, numbers. ๐-N,-Netns <NETNSNAME>โ switches to the specified network namespace. Portal travel, but for network stacks. ๐-i,--iecโ prints human readable rates in IEC units (e.g.1Ki=1024). Yes bestie, 1024, not 1000, don't @ me. ๐ข-x,--hexโ prints dump numbers in hexadecimal format.0xgirlies rise up. ๐ฅ
๐ OBJECT ๐
Pick your fighter. Each of these is a thing devlink can operate on:
devโ devlink device.portโ devlink port.monitorโ watch for netlink messages.sbโ devlink shared buffer configuration.resourceโ devlink device resource configuration.regionโ devlink address region access.healthโ devlink reporting and recovery.trapโ devlink trap configuration.rateโ devlink rate object configuration.lcโ devlink line card configuration.dpipeโ devlink datapath pipeline visualization.
โญ COMMAND โญ
So this is the part where you say what to do to the object you picked. The set of possible actions depends on the object type โ different objects, different energy.
As a rule, it is possible to show (or list) objects, but some objects do not allow all of these operations or have some additional commands. Not everyone gets the same menu, it's fine, we don't compare. ๐
The help command is available for all objects. It prints out a list of available commands and argument syntax conventions. Use it, bestie, it's literally free. ๐ซถ
If no command is given, some default command is assumed. Usually it is list or, if the objects of this class cannot be listed, help. The tool is smart like that. โจ
๐ฆ EXIT STATUS ๐ฆ
Exit status is 0 if command was successful, or a positive integer upon failure. Zero = slay. Anything else = something went wrong. ๐ธ
๐ SEE ALSO ๐
Go read these next, they're the whole friend group:
devlink-dev(8), devlink-port(8), devlink-monitor(8), devlink-sb(8), devlink-resource(8), devlink-region(8), devlink-health(8), devlink-trap(8), devlink-rate(8), devlink-lc(8), devlink-dpipe(8)
๐ REPORTING BUGS ๐
Found a bug? Report any bugs to the Network Developers mailing list <netdev@vger.kernel.org> โ that's where the development and maintenance is primarily done.
Good news: you do not have to be subscribed to the list to send a message there. Just slide in. ๐ฌ
๐ AUTHOR ๐
Jiri Pirko <jiri@mellanox.com> โ the actual author, we stan. ๐
and that's the whole page!! This one came from the iproute2 crew, dated 14 Mar 2016, and it's the DEVLINK(8) manual. Go forth, run devlink help, be the main character of your own network stack. periodt. ๐
โจ๐ฆ
๐ฆ where this page comes from
- alpine 3.24: iproute2-doc 7.0.0-r0 ยท GPL-2.0-or-later
- arch rolling: iproute2 7.2.0-1
- arch rolling: iproute2 7.3.0-1 ยท GPL-2.0-or-later
- centos-stream 10: iproute 7.0.0-2.el10 ยท GPL-2.0-or-later AND NIST-PD
- nixos 26.05: iproute2 7.0.0
- nixpkgs unstable: iproute2 7.2.0
- ubuntu stonking: iproute2 7.2.0-1ubuntu1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms