Skip Navigation Links | |
Exit Print View | |
System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones Oracle Solaris Legacy Containers |
1. Introduction to Solaris 10 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
Using cron and su With Projects and Tasks
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
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)
13. Creating and Administering Resource Pools (Tasks)
14. Resource Management Configuration Example
15. Resource Control Functionality in the Solaris Management Console
16. Introduction to Solaris Zones
17. Non-Global Zone Configuration (Overview)
18. Planning and Configuring Non-Global Zones (Tasks)
19. About Installing, Halting, Cloning, and Uninstalling Non-Global Zones (Overview)
20. Installing, Booting, Halting, Uninstalling, and Cloning Non-Global Zones (Tasks)
21. Non-Global Zone Login (Overview)
22. Logging In to Non-Global Zones (Tasks)
23. Moving and Migrating Non-Global Zones (Tasks)
24. Oracle Solaris 10 9/10: Migrating a Physical Oracle Solaris System Into a Zone (Tasks)
25. About Packages and Patches on an Oracle Solaris System With Zones Installed (Overview)
27. Oracle Solaris Zones Administration (Overview)
28. Oracle Solaris Zones Administration (Tasks)
29. Upgrading an Oracle Solaris 10 System That Has Installed Non-Global Zones
30. Troubleshooting Miscellaneous Oracle Solaris Zones Problems
31. About Branded Zones and the Linux Branded Zone
32. Planning the lx Branded Zone Configuration (Overview)
33. Configuring the lx Branded Zone (Tasks)
34. About Installing, Booting, Halting, Cloning, and Uninstalling lx Branded Zones (Overview)
35. Installing, Booting, Halting, Uninstalling and Cloning lx Branded Zones (Tasks)
36. Logging In to lx Branded Zones (Tasks)
37. Moving and Migrating lx Branded Zones (Tasks)
38. Administering and Running Applications in lx Branded Zones (Tasks)
This example shows how to use the projadd command to add a project entry and the projmod command to alter that entry.
Roles contain authorizations and privileged commands. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.
# projects -l system:0:::: user.root:1:::: noproject:2:::: default:3:::: group.staff:10::::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:
# projadd -U mark -p 4113 booksite
# 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:
# projmod -c `Book Auction Project' booksite
# 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.
This example shows how to use the projdel command to delete a project.
Roles contain authorizations and privileged commands. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.
# projdel booksite
# 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:
# su - mark # projects default
If no editing options are given, the projmod command validates the contents of the project file.
To validate a NIS map, as superuser, type the following:
# ypcat project | projmod -f —
Note - The ypcat project | projmod -f — command is not yet implemented.
To check the syntax of the /etc/project file, type the following:
# projmod -n
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)
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.
machine% id -p uid=100(mark) gid=1(other) projid=4113(booksite)
The process is now a member of the new project.
This example shows how to associate a running process with a different task and new project. To perform this action, you must either be superuser, or be the owner of the process and be a member of the new project.
Roles contain authorizations and privileged commands. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.
Note - If you are the owner of the process or a member of the new project, you can skip this step.
# pgrep book_catalog 8100
# newtask -v -p booksite -c 8100 17
The -c option specifies that newtask operate on the existing named process.
# pgrep -T 17 8100