# CPU Context Info required



## Naughty Neurons (Feb 9, 2018)

I am running FreeBSD Kernel Version 8.2 on single core ARM. To debug the behavior of some user/application programs running on my system, I need a software that can tell/log information about the trace of processes running on CPU and when/how they are switched and which new process takes the CPU. So, in a nutshell I need CPU Context Info with timestamps.

Is there a way to get CPU context information with timestamp using a software that doesn't require having to recompile the kernel.
Any help in this regard would be highly appreciable.


----------



## SirDice (Feb 9, 2018)

FreeBSD 8.2 has been End-of-Life since July 2012 and is not supported any more.

Topics about unsupported FreeBSD versions
https://www.freebsd.org/security/unsupported.html


----------



## Naughty Neurons (Feb 9, 2018)

SirDice said:


> FreeBSD 8.2 has been End-of-Life since July 2012 and is not supported any more.
> 
> Topics about unsupported FreeBSD versions
> https://www.freebsd.org/security/unsupported.html


Thanks for your response. Is there a tool available for current version of FreeBSD, which fulfill the stated requirements?


----------



## SirDice (Feb 9, 2018)

dtrace(1) could probably get all the information you want and much more.


----------



## linux->bsd (Feb 10, 2018)

Naughty Neurons said:


> To debug the behavior of some user/application programs running on my system, I need a software that can tell/log information about the trace of processes running on CPU and when/how they are switched and which new process takes the CPU.



If you're only looking for system calls tracing, then truss() is the way to go. It's FreeBSD's equivalent to strace.

But if you're looking for much more than that, then as SirDice said, dtrace() is the workhorse you're looking for.


----------

