where does top gets real-time data
问题 Where does top application gets it's data on Linux? I would be interested in real-time CPU load/pid data.(I read allmost all documentation in /proc/pid man page, but the info isn't there). The pid is a jboss. I need the data lightweight (to be exported easily). 回答1: As documented in proc(5), in the file /proc/(pid)/stat you have the fields: utime %lu Amount of time that this process has been scheduled in user mode, measured in clock ticks (divide by sysconf(_SC_CLK_TCK). This includes guest