Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: $PID/$$ capped at 32767?

by choroba (Archbishop)
on Oct 30, 2017 at 23:07 UTC ( #1202387=note: print w/replies, xml ) Need Help??


in reply to $PID/$$ capped at 32767?

What OS/$^O are you running? In mine (Linux), PID can never grow over 32767, it rotates back to 1 (300 in fact).

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: $PID/$$ capped at 32767?
by reinaldo.gomes (Beadle) on Oct 30, 2017 at 23:51 UTC
    So, I just realized that I can lower the 'kernel.max_pid' value to 32768, which would solve my problem. However, just for the sake of completeness, I would like to know if there is any configuration that I can change on Perl to increase the max PID value capacity.
      I would like to know if there is any configuration that I can change on Perl to increase the max PID value capacity

      I don't have an answer to that question, but perhaps you'll get to see the larger values by calling POSIX::getpid instead of $$.
      (This would require, of course, that the POSIX module be loaded.)

      Or there might be some other module that would return the larger values.

      Cheers,
      Rob
Re^2: $PID/$$ capped at 32767?
by reinaldo.gomes (Beadle) on Oct 30, 2017 at 23:14 UTC

    Perl Version is: revision 5 version 16 subversion 3

    OS is: CentOS 7.3.1611 (Kernel 3.10.0-514.el7.x86_64)

    By issuing "top" command, I can see PIDs up to 62k+
      Are you using a 32 or 64 bit perl? ( perl -v )


      holli

      You can lead your users to water, but alas, you cannot drown them.
        "This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1202387]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2020-10-20 21:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (210 votes). Check out past polls.

    Notices?