[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] The best way to monitor the number of concurrently runni
From: |
Peng Yu |
Subject: |
Re: [Help-bash] The best way to monitor the number of concurrently running processes forked by a main bash script ? |
Date: |
Tue, 2 Apr 2019 06:24:31 -0500 |
Thanks. When the forked processes finish quickly, how can an external
program ps keep track of them?
On Tue, Apr 2, 2019 at 6:15 AM Aleksey Tsalolikhin <address@hidden>
wrote:
> Could you monitor by parent process id?
>
> The "ps" man page documents the parent process id option:
>
> --ppid pidlist
> Select by parent process ID. This selects the processes
> with a
> parent process ID in pidlist. That is, it selects processes
> that are children of those listed in pidlist.
>
> In other words, *something* must be creating these processes -- use the
> PID of the *something*, and then you'll see all its children. You could
> run your "ps" command using the "watch" utility, and it would show you the
> various children as they come and go. (In your case, the PID of the bash
> script that is forking the children.)
>
> Best,
> -at
>
> On Sun, Mar 31, 2019 at 8:25 PM Peng Yu <address@hidden> wrote:
>
>> Hi,
>>
>> I want to monitor the number of concurrently running processes forked
>> from a bash script. I could use things like top. But I don't think
>> this can easily monitor the processes especially when processes finish
>> very quickly. Probably a way that is native to bash might be better.
>> Is it possible?
>>
>> What is the best way to monitor this info? Thanks.
>>
>> --
>> Regards,
>> Peng
>>
>>
>
> --
> Achieve real learning. Email address@hidden
>
--
Regards,
Peng
- Re: [Help-bash] The best way to monitor the number of concurrently running processes forked by a main bash script ?, Aleksey Tsalolikhin, 2019/04/02
- Re: [Help-bash] The best way to monitor the number of concurrently running processes forked by a main bash script ?,
Peng Yu <=
- Re: [Help-bash] The best way to monitor the number of concurrently running processes forked by a main bash script ?, Aleksey Tsalolikhin, 2019/04/02
- Message not available
- [Help-bash] Fwd: The best way to monitor the number of concurrently running processes forked by a main bash script ?, Peng Yu, 2019/04/02
- Re: [Help-bash] The best way to monitor the number of concurrently running processes forked by a main bash script ?, Aleksey Tsalolikhin, 2019/04/06
- Re: [Help-bash] The best way to monitor the number of concurrently running processes forked by a main bash script ?, Peng Yu, 2019/04/06
- Re: [Help-bash] The best way to monitor the number of concurrently running processes forked by a main bash script ?, Aleksey Tsalolikhin, 2019/04/07
- Re: [Help-bash] The best way to monitor the number of concurrently running processes forked by a main bash script ?, Peng Yu, 2019/04/07
- Re: [Help-bash] The best way to monitor the number of concurrently running processes forked by a main bash script ?, Aleksey Tsalolikhin, 2019/04/08