Detailed time Analysis of State switching of a process under linux

ask the bosses, how to check the state changes of the system under linux? For example, the
process with pid a starts to run when xxx.xxx s, and when xxx.xxx s starts to occupy cpu, to run xxx.xxx s, due to waiting for io or running out of time slices, it is put into the ready queue or blocked queue to wait for the next time slice.
that is, it needs to be accurate to the process state of ms to analyze the process running state transition, which is used to analyze the real-time performance of the system, and whether the bottleneck is related to system overhead or system scheduling.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e57b53-65a6a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e57b53-65a6a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?