JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris 11.1 Administration: Oracle Solaris Zones, Oracle Solaris 10 Zones, and Resource Management     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

Part I Oracle Solaris Resource Management

1.  Introduction to Resource Management

2.  Projects and Tasks (Overview)

3.  Administering Projects and Tasks

Administering Projects and Tasks (Task Map)

Example Commands and Command Options

Command Options Used With Projects and Tasks

ps Command

id Command

pgrep and pkill Commands

prstat Command

Using cron and su With Projects and Tasks

cron Command

su Command

Administering Projects

How to Define a Project and View the Current Project

How to Delete a Project From the /etc/project File

How to Validate the Contents of the /etc/project File

How to Obtain Project Membership Information

How to Create a New Task

How to Move a Running Process Into a New Task

Editing and Validating Project Attributes

How to Add Attributes and Attribute Values to Projects

How to Remove Attribute Values From Projects

How to Remove a Resource Control Attribute From a Project

How to Substitute Attributes and Attribute Values for Projects

How to Remove the Existing Values for a Resource Control Attribute

4.  Extended Accounting (Overview)

5.  Administering Extended Accounting (Tasks)

6.  Resource Controls (Overview)

7.  Administering Resource Controls (Tasks)

8.  Fair Share Scheduler (Overview)

9.  Administering the Fair Share Scheduler (Tasks)

10.  Physical Memory Control Using the Resource Capping Daemon (Overview)

11.  Administering the Resource Capping Daemon (Tasks)

12.  Resource Pools (Overview)

13.  Creating and Administering Resource Pools (Tasks)

14.  Resource Management Configuration Example

Part II Oracle Solaris Zones

15.  Introduction to Oracle Solaris Zones

16.  Non-Global Zone Configuration (Overview)

17.  Planning and Configuring Non-Global Zones (Tasks)

18.  About Installing, Shutting Down, Halting, Uninstalling, and Cloning Non-Global Zones (Overview)

19.  Installing, Booting, Shutting Down, Halting, Uninstalling, and Cloning Non-Global Zones (Tasks)

20.  Non-Global Zone Login (Overview)

21.  Logging In to Non-Global Zones (Tasks)

22.  About Zone Migrations and the zonep2vchk Tool

23.  Migrating Oracle Solaris Systems and Migrating Non-Global Zones (Tasks)

24.  About Automatic Installation and Packages on an Oracle Solaris 11.1 System With Zones Installed

25.  Oracle Solaris Zones Administration (Overview)

26.  Administering Oracle Solaris Zones (Tasks)

27.  Configuring and Administering Immutable Zones

28.  Troubleshooting Miscellaneous Oracle Solaris Zones Problems

Part III Oracle Solaris 10 Zones

29.  Introduction to Oracle Solaris 10 Zones

30.  Assessing an Oracle Solaris 10 System and Creating an Archive

31.  (Optional) Migrating an Oracle Solaris 10 native Non-Global Zone Into an Oracle Solaris 10 Zone

32.  Configuring the solaris10 Branded Zone

33.  Installing the solaris10 Branded Zone

34.  Booting a Zone, Logging in, and Zone Migration

Glossary

Index

Administering Projects

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. Become root or assume an equivalent role.
  2. View the default /etc/project file on your system by using projects -l.
    # 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. 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: 
    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: 
    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: 
    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: 
    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.

How to Delete a Project From the /etc/project File

This example shows how to use the projdel command to delete a project.

  1. Become root or assume an equivalent role.
  2. Remove the project booksite by using the projdel command.
    # projdel booksite
  3. Display the /etc/project file.
    # 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: 
  4. Log in as user mark and type projects to view the projects that are assigned to this user.
    # su - mark
    # projects
    default

How to Validate the Contents of the /etc/project File

If no editing options are given, the projmod command validates the contents of the project file.

To validate a NIS map, type the following:

# ypcat project | projmod -f —

To check the syntax of the /etc/project file, type the following:

# projmod -n

How to Obtain Project Membership Information

Use the id command with the -p flag to display the current project membership of the invoking process.

$ id -p
uid=100(mark) gid=1(other) projid=3(default)

How to Create a New Task

  1. Log in as a member of the destination project, booksite in this example.
  2. Create a new task in the booksite project by using the newtask command with the -v (verbose) option to obtain the system task ID.
    machine% newtask -v -p booksite
    16

    The execution of newtask creates a new task in the specified project, and places the user's default shell in this task.

  3. View the current project membership of the invoking process.
    machine% id -p
    uid=100(mark) gid=1(other) projid=4113(booksite)

    The process is now a member of the new project.

How to Move a Running Process Into a New Task

This example shows how to associate a running process with a different task and new project. To perform this action, you must be the root user, have the required rights profile, or be the owner of the process and be a member of the new project.

  1. Become root or assume an equivalent role.

    Note - If you are the owner of the process or a member of the new project, you can skip this step.


  2. Obtain the process ID of the book_catalog process.
    # pgrep book_catalog
        8100
  3. Associate process 8100 with a new task ID in the booksite project.
    # newtask -v -p booksite -c 8100
        17

    The -c option specifies that newtask operate on the existing named process.

  4. Confirm the task to process ID mapping.
    # pgrep -T 17
        8100