Reputation: 95
I need to write linux application that will monitor specified process. Is it possible to be informed about every change of process state? I mean every change of field state
in task_struct
Upvotes: 2
Views: 305
Reputation: 1591
enable ftrace and keep logging it
cat /sys/kernel/debug/tracing/trace
cat /sys/kernel/debug/tracing/tracing_on
1
cat /sys/kernel/debug/tracing/current_tracer
function
cat /sys/kernel/debug/tracing/available_tracers
blk function_graph mmiotrace wakeup_rt wakeup function nop
Follow: http://lwn.net/Articles/290277/
Upvotes: 2