Administering Resource Management in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014

How to Use prctl to Temporarily Change a 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 How to Set the Maximum Number of LWPs for Each Task in a Project.

  1. Become root or assume an equivalent role.
  2. Use newtask to join the x-files project.
    # newtask -p x-files
  3. Use the id command with the –p option to 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
            usage          203
            privileged    1000       -   deny                      -
            system       2.15G     max   deny                      -