Pregunta

If I want to know the internal working of any linux command then from where I will get the information about that? Actually I want to know the internal working of aplay command. By executing aplay command what processes occurs in the linux kernel ?

¿Fue útil?

Solución

Command in the Linux are at the user level. So when we execute the command from the user level it will interact with the kernel layer. This interaction is done via the system calls.

To get what system call is executing internally you can use the user space utility "strace". strace will give the system trace. Following command you can use:

$script

$strace <command> <argument>

$exit

script utility create a file, named "typescript" in current working directory which contains the output of strace.

Now from the strace you will get the what all system call your command is executing. Now you need the kernel source to track actually what are internal processing is going on in the kernel.

You also can use the systemtap and kgdb linux utilities.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top