gaczm
gaczm

Reputation: 95

Watching process state transition

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

Answers (1)

Sun
Sun

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

Related Questions