Go to main content

Administering Resource Management in Oracle® Solaris 11.3

Exit Print View

Updated: March 2018
 
 

How to Set Multiple Controls on a Project

The /etc/project file can contain settings for multiple resource controls for each project as well as multiple threshold values for each control. Threshold values are defined in action clauses, which are comma-separated for multiple values.

  1. Become root or assume an equivalent role.
  2. Set resource controls on project x-files.
    # projmod -s -K 'task.max-lwps=(basic,10,none),(privileged,500,deny);
    process.max-file-descriptor=(basic,128,deny)' x-filesone line in file

    The following controls are set:

    • A basic control with no action on the maximum LWPs per task.

    • A privileged deny control on the maximum LWPs per task. This control causes any LWP creation that exceeds the maximum to fail, as shown in the previous example How to Set the Maximum Number of LWPs for Each Task in a Project.

    • A limit on the maximum file descriptors per process at the basic level, which forces the failure of any open call that exceeds the maximum.

  3. View the entry in the file by using one of the following methods:
    • Type:

      # projects -l
      …
      x-files
              projid : 100
              comment: ""
              users  : (none)
              groups : (none)
              attribs: process.max-file-descriptor=(basic,128,deny)
                       task.max-lwps=(basic,10,none),(privileged,500,deny) one line in file
    • Type:

      # cat /etc/project
      …
      x-files:100::::process.max-file-descriptor=(basic,128,deny);
      task.max-lwps=(basic,10,none),(privileged,500,deny) one line in file