Thread info

Posted on 2011-04-25
Last Modified: 2012-05-11
Please provide command which i execute in RHEL (Linux) for knowing the number of threads running under particular process.

top -H (will give some info, not sure what is it showing)

Please help
Question by:wasman
    LVL 16

    Expert Comment

    ps -elm|grep pid|grep -v grep |wc -l

    where pid is process number
    LVL 68

    Accepted Solution

    ps -lm -p PID | grep -v PID | wc -l
    LVL 68

    Expert Comment

    ... to avoid a misunderstanding - the first "PID" means the PID you're searching for, the second "PID" actually means the string "PID" (to filter out the header line).

    Author Closing Comment

    Thank you Milk, sorry for late replay...i am sick for 2 weeks
    LVL 68

    Expert Comment

    Thx for the points 'man - hope you're well again!


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (…
    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now