]> git.proxmox.com Git - mirror_iproute2.git/commit
devlink: Add devlink health show command
authorAya Levin <ayal@mellanox.com>
Thu, 28 Feb 2019 12:12:58 +0000 (14:12 +0200)
committerDavid Ahern <dsahern@gmail.com>
Thu, 28 Feb 2019 15:55:41 +0000 (07:55 -0800)
commit2f1242efe9d054b82d240dc8b152d2a48dcb0b48
treee0dd94280c8dc4c712f53ca7d70c69290f043aca
parent844a61764c6f7e6d83c77b318142aaa3a26ef355
devlink: Add devlink health show command

Add devlink health show command which displays status and configuration
info on a specific reporter on a device or dump the info on all
reporters on all devices. Add helper functions to display status and
dump's time stamp.
Example:
$ devlink health show pci/0000:00:09.0 reporter tx
pci/0000:00:09.0:
 name tx
  state healthy error 0 recover 1 last_dump_date 2019-02-14 last_dump_time 10:10:10 grace_period 600 auto_recover true
$ devlink health show pci/0000:00:09.0 reporter tx -jp
{
 "health":{
  "pci/0000:00:0a.0":[
     {
     "name":"tx",
     "state":"healthy",
     "error":0,
     "recover":1,
     "last_dump_date":"2019-Feb-14",
     "last_dump_time":"10:10:10",
     "grace_period":600,
     "auto_recover":true
    }
  ]
}

Signed-off-by: Aya Levin <ayal@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
devlink/devlink.c