I need the source code for the top, which I also could not find, I wanted to get a little more information about what exactly the / proc directory contains. I saw that it has folders with folders marked 1, 2, 3 4, .... and these folders seem to have a sequential set of files. I was wondering if these are directories for processes currently running on the machine.
I also wanted to know exactly how TOP is associated with this folder, because I was told that processes are tracked by TOP, by extracting data from these directories. I would like to know which file exactly TOP gets CPU usage of a specific process from the directory. If this is too complicated, it would be great if you could just tell me a piece of code where I could understand it!
Thanks for your help Shouvik
source
share