While analyzing vmcore it is useful to have an information
about relative lag of each CPU. Usually, people do something like this:
runq -t | grep CPU | sort -k3r |
awk 'NR==1{now=strtonum("0x"$3)}1{printf"%s\t%7.2fs behind\n",
$0,(now-strtonum("0x"$3))/1000000000}'
Here, most recent runqueue timestamp is taken as a basis, and other
runqueues are assumed to lag behind it. This information can tell
the reviewer which CPU is experiencing some lockup, which is
especially useful for vmcores taken in virtual machines.
I think it would be nice to have this feature implemented by crash
utility itself.
Since this is an RFC and if this enhancement looks useful, I'd like
to ask to assist me with output indentation since dump_on_rq_timestamp(),
for instance, looks too implicit and (honestly) awful to use as it is.
Changes since v1:
* use calculated amount of leading spaces to indent output nicely
Oleksandr Natalenko (1):
runq: display relative lag of each CPU
help.c | 4 ++-
task.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 95 insertions(+), 2 deletions(-)
--
2.15.0