Go to main content

Administering Resource Management in Oracle® Solaris 11.4

Exit Print View

Updated: February 2021
 
 

Example: How to Temporarily Change a Privileged Value

This example procedure uses the prctl command to temporarily add a new privileged value to deny the use of more than three LWPs per project for the x-files project. The result is comparable to the result in Example: How to Set the Maximum Number of LWPs for Each Task in a Project.

  1. Assume the root role.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.4.

  2. Join the x-files project.
    $ newtask -p x-files
  3. Verify that the correct project has been joined.
    $ id -p
    uid=0(root) gid=1(other) projid=101(x-files)
  4. Add a new privileged value for project.max-lwps that limits the number of LWPs to three.
    $ prctl -n project.max-lwps -t privileged -v 3 -e deny -i project x-files
  5. Verify the result.
    $ prctl -n project.max-lwps -i project x-files
    process: 111108: csh
    NAME    PRIVILEGE    VALUE    FLAG   ACTION            RECIPIENT
    project.max-lwps
            usage          203
            privileged    1000       -   deny                      -
            system       2.15G     max   deny                      -