Hi I wanted to get information about threads of process, so used /proc/stat command in terminal. But get "permission denied" error. How can I resolve this issue?
You cannot execute
/proc/stat, you can view it, for example with
/proc is a pseudo-filesystem with lots of system information to view. See
man proc for details. You can read details about linux
/proc/stat for example at this page
You can display threads with ps command as well:
THREAD DISPLAY H Show threads as if they were processes. -L Show threads, possibly with LWP and NLWP columns. m Show threads after processes. -m Show threads after processes. -T Show threads, possibly with SPID column.
ps -T -p $pid
to display threads with SPID number of process with PID $pid.