Is it possible in linux to determine how long a file has been open for? I have a process I suspect is performing long running operations on some files, but I'm unsure how to check.
Asked
Active
Viewed 462 times
1 Answers
0
Perhaps not the answer you are looking for, but ps has lstart as a standard format specifier.
lstart STARTED time the command started. See also bsdstart, start, start_time, and stime.
So in your case ps -eo pid,lstart,cmd could indicate how long a specific command is running.
-e Select all processes.
-o format User-defined format.
rowan
- 121