Flag to run iotop in "lockdown mode"
iotop needs to be run with elevated privileges, and it tells why when not being run that way.
I think it would be a useful feature if iotop could be run in some kind of "lockdown mode", which basically makes it read only, disabling the possibility to renice processes, while still receiving input to be able to scroll the list and change the view modes. Something like this would make it safer to configure sudo to not request a password when iotop is started by my account, or for other users of the system to be able to check resource usage statistics without being able to renice processes.
The idea is somewhat similar to what less does when it is given the LESSSECURE=1 environment variable.
Thanks for the idea.
Let's name that read-only mode.
In case privileges are elevated by setcap, there will be no way to ensure that the environment variable is what the admin of the system wants. iotop can detect that it is run by a user and got privileges by setcap and always be read-only in this case but is that a good idea?
sudo can ensure setting the variable. Then it will be helpful to set that variable to the uid of the calling user. Not sure if sudo easily supports that.
In both cases allowing the user to renice their own processes seems to be good...
Let me know what you do think