-
Notifications
You must be signed in to change notification settings - Fork 697
Open
Labels
Description
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-topologyThough 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 🙁