How can you view thread information using the `ps` and `top` commands in Linux? Describe the steps and options required to display thread details in these tools.
For ps specifying m ahead of ps command such as ps -m provides the details of thread associated with the running processes. For top, using H as a keystroke provides the details of the threads running in the system.
To display the thread information in 'ps' add -m option. the listing shows processes along with threads.
Each line line with a number in the pid column represents a process as in normal ps output , The lines with dashes in the pid column represents the threads associated with the process.
While using `top` we can use f option to set the options and then select nTh field and press 'd' to show the no of threads with the process in the display output.