Go to main content

Administering Resource Management in Oracle® Solaris 11.4

Exit Print View

Updated: February 2021
 
 

Example: How to Define a Project and View the Current Project

This example shows how to use the projadd command to add a project entry and the projmod command to alter that entry.

  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. View the default /etc/project file on your system.
    $ projects -l
    system
            projid : 0
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    user.root
            projid : 1
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    noproject
            projid : 2
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    default
            projid : 3
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    group.staff
            projid : 10
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
  3. Add a project with the name booksite, and assign the project to a user who is named mark with project ID number 4113.
    $ projadd -U mark -p 4113 booksite
  4. View the /etc/project file again.
    $ projects -l
    system
            projid : 0
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    …
    booksite
            projid : 4113
            comment: ""
            users  : mark
            groups : (none)
            attribs:
  5. Add a comment that describes the project in the comment field.
    $ projmod -c 'Book Auction Project' booksite
  6. View the changes in the /etc/project file.
    $ projects -l
    system
            projid : 0
            comment: ""
            users  : (none)
            groups : (none)
            attribs: 
    …
    booksite
            projid : 4113
            comment: "Book Auction Project"
            users  : mark
            groups : (none)
            attribs: 

See Also

To bind projects, tasks, and processes to a pool, see Setting Pool Attributes and Binding to a Pool.