I'd like to see if a hard disk is being actively used right now (a hddled-like indicator) and what particular files are being accessed. How can I achieve this in command line with SSH?
Asked
Active
Viewed 689 times
3 Answers
0
In addition to iotop/lsof that was already mentioned, some other options include nmon, iostat, or atop. See this post on StackOverflow or this other question here on ServerFault.
runlevelsix
- 2,609
- 21
- 19
0
Assuming you wanted to run the command through ssh and not just ssh directly to the machine. The command from ssh will look some thing like this:
ssh <hostname> lsof <options>
If you need this to run as root from a script, slightly fancy use of sudo and ssh keys should get you no requirement for a password. But be careful slightly to fancy use of sudo and ssh keys can just up and give anybody root access to your box.
Banis
- 166
- 3