Skip to content

Add support for nvme top (monitor feature) #2904

@igaw

Description

@igaw

There are use cases where the user wants to monitor the system changes. nvme-cli currently shows a snapshot. A simple way to achieve this in shell is to do:

watch -n1 nvme show-topology

Though sometimes shell scripting is adding an additional layer of problems, e.g. when creating logs for other tools to consume #2189

@hreinecke pointed out in https://lore.kernel.org/linux-nvme/[email protected]/

Well, that might be tricky. The current 'tree' structure is build
once when the program starts up. Any changes to that structure after
that are not tracked, and there (currently) are no hooks for updating
it. So having a 'monitor' function will get tricky.

To do that we would either need a udev event receiver (using uevents
to update the tree structure) or looking into fanotify()/inotify().
Then the tree structure would always be up-to-date and things like
'monitor' will be possible.
Will be hell for the python bindings, mind 🙁 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions