Basically I want to have all processes that have been sleeping for more than one hour.
I know that there is etime in ps, but sadly it shows the overall lifetime.
How can this be done under linux (preferably with ps)?
Basically I want to have all processes that have been sleeping for more than one hour.
I know that there is etime in ps, but sadly it shows the overall lifetime.
How can this be done under linux (preferably with ps)?
Copyright © 2021 Jogjafile Inc.
The
/proc/pid/sched
file contains a metric ton of scheduling data:I suggest reading through the
/proc/*/sched
files looking forse.statistics.nr_wakeups
orse.statistics.wait_count
lines that don't change for an hour. I don't know off-hand which one would give you 'better' results, but try both :) and see which one gives you answers like you expect.