Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 8e87fca2f49595adc16d9aa519a6edad > files > 211

systemtap-1.6-1.fc14.x86_64.rpm

title: Display the task switches happening in the scheduler
name: sched_switch.stp
version: 1.0
author: kiran
keywords: profiling functions
subsystem: kernel
status: production
exit: user-controlled
output: trace
scope: system-wide
description: The sched_switch.stp script takes two arguments, first argument can be "pid" or "name" to indicate what is being passed as second argument. The script will trace the process based on pid/name and print the scheduler switches happening with the process. If no arguments are passed, it displays all the scheduler switches. This can be used to understand which tasks schedule out the current process being traced, and when it gets scheduled in again.
test_check: stap -p4 sched_switch.stp
test_installcheck: stap  sched_switch.stp -c "sleep 1"