What level is the value `ulimit -n`mean? user level or process level? [duplicate]











up vote
0
down vote

favorite













This question already has an answer here:




  • Are limits.conf values applied on a per-process basis?

    1 answer




I want to increase the ulimit -n value,so I add



*       soft  nofile  20000
* hard nofile 20000


in the /etc/security/limits.conf file, but there is a question confuse me all the time.
what level is the value ulimit -n mean? user level or process level?

Specifically speaking, if the value of ulimit -n is 512, and user testUser hava 3 process, does it means testUser can have the total file descriptors for 512 sum up for all his 3 process, or does it means each of testUser's process can have 512 file descriptors and thus testUser can hava a total file descriptors amount of 512*3?










share|improve this question







New contributor




jacky is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











marked as duplicate by Community Dec 3 at 15:47


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















    up vote
    0
    down vote

    favorite













    This question already has an answer here:




    • Are limits.conf values applied on a per-process basis?

      1 answer




    I want to increase the ulimit -n value,so I add



    *       soft  nofile  20000
    * hard nofile 20000


    in the /etc/security/limits.conf file, but there is a question confuse me all the time.
    what level is the value ulimit -n mean? user level or process level?

    Specifically speaking, if the value of ulimit -n is 512, and user testUser hava 3 process, does it means testUser can have the total file descriptors for 512 sum up for all his 3 process, or does it means each of testUser's process can have 512 file descriptors and thus testUser can hava a total file descriptors amount of 512*3?










    share|improve this question







    New contributor




    jacky is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.











    marked as duplicate by Community Dec 3 at 15:47


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite












      This question already has an answer here:




      • Are limits.conf values applied on a per-process basis?

        1 answer




      I want to increase the ulimit -n value,so I add



      *       soft  nofile  20000
      * hard nofile 20000


      in the /etc/security/limits.conf file, but there is a question confuse me all the time.
      what level is the value ulimit -n mean? user level or process level?

      Specifically speaking, if the value of ulimit -n is 512, and user testUser hava 3 process, does it means testUser can have the total file descriptors for 512 sum up for all his 3 process, or does it means each of testUser's process can have 512 file descriptors and thus testUser can hava a total file descriptors amount of 512*3?










      share|improve this question







      New contributor




      jacky is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      This question already has an answer here:




      • Are limits.conf values applied on a per-process basis?

        1 answer




      I want to increase the ulimit -n value,so I add



      *       soft  nofile  20000
      * hard nofile 20000


      in the /etc/security/limits.conf file, but there is a question confuse me all the time.
      what level is the value ulimit -n mean? user level or process level?

      Specifically speaking, if the value of ulimit -n is 512, and user testUser hava 3 process, does it means testUser can have the total file descriptors for 512 sum up for all his 3 process, or does it means each of testUser's process can have 512 file descriptors and thus testUser can hava a total file descriptors amount of 512*3?





      This question already has an answer here:




      • Are limits.conf values applied on a per-process basis?

        1 answer








      linux files process ulimit






      share|improve this question







      New contributor




      jacky is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      jacky is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      jacky is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Dec 3 at 7:46









      jacky

      1




      1




      New contributor




      jacky is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      jacky is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      jacky is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      marked as duplicate by Community Dec 3 at 15:47


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






      marked as duplicate by Community Dec 3 at 15:47


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          The behaviour changes depend on if its a systemd service or not which i am not capable of pointing differences.



          /etc/security/limits.conf file sets the limits for root user, if you would like to increase a user's limits, you should edit /etc/security/limits.d/testUser.conf file.






          share|improve this answer





















          • And what is the level of ulimit -n control ? user or process?thanks
            – jacky
            Dec 3 at 8:33










          • -n The maximum number of open file descriptors. file descriptor: In Unix and related computer operating systems, a file descriptor (FD, less frequently fildes) is an abstract indicator (handle) used to access a file or other input/output resource, such as a pipe or network socket.
            – e73kiel
            Dec 3 at 8:52












          • And as the example I mention in the question, if testUser have 3 process, what is the max file descriptor amount can testUser get? 512 or 512*3?
            – jacky
            Dec 3 at 8:57












          • Are limits.conf values applied on a per-process basis?,this answer seems have the opposite point of view
            – jacky
            Dec 3 at 15:46










          • Man page linux.die.net/man/5/limits.conf says The pam_limits.so module applies ulimit limits, nice priority and number of simultaneous login sessions limit to user login sessions.
            – e73kiel
            2 days ago


















          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          The behaviour changes depend on if its a systemd service or not which i am not capable of pointing differences.



          /etc/security/limits.conf file sets the limits for root user, if you would like to increase a user's limits, you should edit /etc/security/limits.d/testUser.conf file.






          share|improve this answer





















          • And what is the level of ulimit -n control ? user or process?thanks
            – jacky
            Dec 3 at 8:33










          • -n The maximum number of open file descriptors. file descriptor: In Unix and related computer operating systems, a file descriptor (FD, less frequently fildes) is an abstract indicator (handle) used to access a file or other input/output resource, such as a pipe or network socket.
            – e73kiel
            Dec 3 at 8:52












          • And as the example I mention in the question, if testUser have 3 process, what is the max file descriptor amount can testUser get? 512 or 512*3?
            – jacky
            Dec 3 at 8:57












          • Are limits.conf values applied on a per-process basis?,this answer seems have the opposite point of view
            – jacky
            Dec 3 at 15:46










          • Man page linux.die.net/man/5/limits.conf says The pam_limits.so module applies ulimit limits, nice priority and number of simultaneous login sessions limit to user login sessions.
            – e73kiel
            2 days ago















          up vote
          0
          down vote













          The behaviour changes depend on if its a systemd service or not which i am not capable of pointing differences.



          /etc/security/limits.conf file sets the limits for root user, if you would like to increase a user's limits, you should edit /etc/security/limits.d/testUser.conf file.






          share|improve this answer





















          • And what is the level of ulimit -n control ? user or process?thanks
            – jacky
            Dec 3 at 8:33










          • -n The maximum number of open file descriptors. file descriptor: In Unix and related computer operating systems, a file descriptor (FD, less frequently fildes) is an abstract indicator (handle) used to access a file or other input/output resource, such as a pipe or network socket.
            – e73kiel
            Dec 3 at 8:52












          • And as the example I mention in the question, if testUser have 3 process, what is the max file descriptor amount can testUser get? 512 or 512*3?
            – jacky
            Dec 3 at 8:57












          • Are limits.conf values applied on a per-process basis?,this answer seems have the opposite point of view
            – jacky
            Dec 3 at 15:46










          • Man page linux.die.net/man/5/limits.conf says The pam_limits.so module applies ulimit limits, nice priority and number of simultaneous login sessions limit to user login sessions.
            – e73kiel
            2 days ago













          up vote
          0
          down vote










          up vote
          0
          down vote









          The behaviour changes depend on if its a systemd service or not which i am not capable of pointing differences.



          /etc/security/limits.conf file sets the limits for root user, if you would like to increase a user's limits, you should edit /etc/security/limits.d/testUser.conf file.






          share|improve this answer












          The behaviour changes depend on if its a systemd service or not which i am not capable of pointing differences.



          /etc/security/limits.conf file sets the limits for root user, if you would like to increase a user's limits, you should edit /etc/security/limits.d/testUser.conf file.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 3 at 8:15









          e73kiel

          63




          63












          • And what is the level of ulimit -n control ? user or process?thanks
            – jacky
            Dec 3 at 8:33










          • -n The maximum number of open file descriptors. file descriptor: In Unix and related computer operating systems, a file descriptor (FD, less frequently fildes) is an abstract indicator (handle) used to access a file or other input/output resource, such as a pipe or network socket.
            – e73kiel
            Dec 3 at 8:52












          • And as the example I mention in the question, if testUser have 3 process, what is the max file descriptor amount can testUser get? 512 or 512*3?
            – jacky
            Dec 3 at 8:57












          • Are limits.conf values applied on a per-process basis?,this answer seems have the opposite point of view
            – jacky
            Dec 3 at 15:46










          • Man page linux.die.net/man/5/limits.conf says The pam_limits.so module applies ulimit limits, nice priority and number of simultaneous login sessions limit to user login sessions.
            – e73kiel
            2 days ago


















          • And what is the level of ulimit -n control ? user or process?thanks
            – jacky
            Dec 3 at 8:33










          • -n The maximum number of open file descriptors. file descriptor: In Unix and related computer operating systems, a file descriptor (FD, less frequently fildes) is an abstract indicator (handle) used to access a file or other input/output resource, such as a pipe or network socket.
            – e73kiel
            Dec 3 at 8:52












          • And as the example I mention in the question, if testUser have 3 process, what is the max file descriptor amount can testUser get? 512 or 512*3?
            – jacky
            Dec 3 at 8:57












          • Are limits.conf values applied on a per-process basis?,this answer seems have the opposite point of view
            – jacky
            Dec 3 at 15:46










          • Man page linux.die.net/man/5/limits.conf says The pam_limits.so module applies ulimit limits, nice priority and number of simultaneous login sessions limit to user login sessions.
            – e73kiel
            2 days ago
















          And what is the level of ulimit -n control ? user or process?thanks
          – jacky
          Dec 3 at 8:33




          And what is the level of ulimit -n control ? user or process?thanks
          – jacky
          Dec 3 at 8:33












          -n The maximum number of open file descriptors. file descriptor: In Unix and related computer operating systems, a file descriptor (FD, less frequently fildes) is an abstract indicator (handle) used to access a file or other input/output resource, such as a pipe or network socket.
          – e73kiel
          Dec 3 at 8:52






          -n The maximum number of open file descriptors. file descriptor: In Unix and related computer operating systems, a file descriptor (FD, less frequently fildes) is an abstract indicator (handle) used to access a file or other input/output resource, such as a pipe or network socket.
          – e73kiel
          Dec 3 at 8:52














          And as the example I mention in the question, if testUser have 3 process, what is the max file descriptor amount can testUser get? 512 or 512*3?
          – jacky
          Dec 3 at 8:57






          And as the example I mention in the question, if testUser have 3 process, what is the max file descriptor amount can testUser get? 512 or 512*3?
          – jacky
          Dec 3 at 8:57














          Are limits.conf values applied on a per-process basis?,this answer seems have the opposite point of view
          – jacky
          Dec 3 at 15:46




          Are limits.conf values applied on a per-process basis?,this answer seems have the opposite point of view
          – jacky
          Dec 3 at 15:46












          Man page linux.die.net/man/5/limits.conf says The pam_limits.so module applies ulimit limits, nice priority and number of simultaneous login sessions limit to user login sessions.
          – e73kiel
          2 days ago




          Man page linux.die.net/man/5/limits.conf says The pam_limits.so module applies ulimit limits, nice priority and number of simultaneous login sessions limit to user login sessions.
          – e73kiel
          2 days ago



          Popular posts from this blog

          Accessing regular linux commands in Huawei's Dopra Linux

          Can't connect RFCOMM socket: Host is down

          Kernel panic - not syncing: Fatal Exception in Interrupt