Hi,

On Sun, 20 Aug 2023 20:42:53 -0400
Saint Michael <[email protected]> wrote:

> My command line is
> parallel --gnu --no-run-if-empty -k --lb -j-5 --colsep ' '  processx "{1}
> {#}" :::: ${FILE}
> and the file has 100.000 lines
> my box has 44 cores, minus 5, I should see 39 processes, but using ps ax |
> grep bash, I see only 10.
> How do I know how many cores parallel is seeing?

try editing parallel's Perl code and write the number of cores to a file. e.g:

{
        open my $fh, ">", "$ENV{HOME}/par.cores.txt" or die;
        print {$fh} "$num_cores\n";
        close $fh;
}

https://blog.codinghorror.com/learn-to-read-the-source-luke/ .

-- 

Shlomi Fish       https://www.shlomifish.org/
https://is.gd/MQHVF3 - The Atom Text Editor edits a 2,000,001B file

    <rindolf>  preaction: every mighty Klingon warrior uses Vim.
  <preaction>  only green-blooded Romulan scum use Emacs
    — #perl, https://is.gd/grdEqT

Please reply to list if it's a mailing list post - https://shlom.in/reply .

Reply via email to