From: Petr Vorel <pvorel@suse.cz>
To: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] lib/tst_pid.c: Count used pid by traversing /proc
Date: Mon, 13 Feb 2023 18:33:54 +0100 [thread overview]
Message-ID: <Y+p0guL0/bQwDf/i@pevik> (raw)
In-Reply-To: <20230213134104.229241-1-ycliang@andestech.com>
Hi Leo,
> Use "ps -eT | wc -l" to calculate the number of used pid
> could have an incorrectly larger result because "ps -eT"
> may list the same pid multiple times (with different SPID).
> Instead, we could count used pid by traversing /proc
> directory and count the subdirectories that have name
> composed of digits.
> Increase PIDS_RESERVED to avoid fork failure.
Thank you!
Waiting little longer before merging to give others change to have look.
Suggested-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-02-13 17:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 13:41 [LTP] [PATCH 1/1] lib/tst_pid.c: Count used pid by traversing /proc Leo Yu-Chi Liang
2023-02-13 17:33 ` Petr Vorel [this message]
2023-02-14 10:58 ` Cyril Hrubis
2023-02-14 11:59 ` Leo Liang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y+p0guL0/bQwDf/i@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=ycliang@andestech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox