Command list for work with projects/tasks in Solaris

ps -o user,pid,uid,projid,taskid,comm
id -p
pgrep -J projidlist
pkill -J projidlist
pgrep -T taskidlist
pkill -T taskidlist
prstat -J
prstat -T
projects -l
projadd -U mark -p 4113 booksite
projdel booksite
projmod -n
projects username
newtask -v -p booksite
newtask -v -p booksite -c 8100
projmod -a -K task.max-lwps myproject
projmod -a -K "task.max-lwps=(priv,100,deny)" myproject
projmod -a -K "task.max-lwps=(priv,1000,signal=KILL)" myproject
projmod -r -K "task.max-lwps=(priv,100,deny)" myproject
projmod -s -K "task.max-lwps=(priv,100,none),(priv,120,deny)" myproject
projmod -s -K task.max-lwps myproject

Use the prctl command to make runtime interrogations of and modifications to the resource
controls associated with an active process, task, or project on the system. See the prctl(1) man
page for more information.
# prctl $$ - displays all resource control values for given process.
# prctl -n process.max-file-descriptor $$ - more concrete
# prctl -n project.max-lwps -t privileged -v 3 -e deny -i project x-files - Add a new privileged value for project.max-lwps that limits the number of LWPs to three.
# prctl -n project.max-lwps -i project x-files
- verifies previous.
# prctl -n process.max-file-descriptor -r -v 128 $$ - change the lowest value of the process.max-file-descriptor resource control.

Use the rctladm command to make runtime interrogations of and modifications to the global
state of the resource controls facility. See the rctladm(1M) man page for more information.
# rctladm -e syslog process.max-file-descriptor - enable the global syslog attribute of process.max-file-descriptor
# rctladm - displays the global flags, including the global type flag, for each resource control.
# ipcs - displays information regarding open IPCS
# ipcs -J - displays information regarding open IPCS (Project oriented)

Capacity Warnings.
  1. # prctl -n task.max-lwps -v 40 -t privileged -d all ‘pgrep httpd‘
  2. # rctladm -e syslog task.max-lwps
  3. Observe whether the workload trips the resource control:
    If it does, you will see /var/adm/messages such as:
    Jan 8 10:15:15 testmachine unix: [ID 859581 kern.notice]
    NOTICE: privileged rctl task.max-lwps exceeded by task 12
Rlimits and resource controls.
UNIX systems have traditionally provided a resource limit facility (rlimit,plimit,ulimit).
The resource controls facility provides compatibility interfaces for the resource limits facility.
Existing applications that use resource limits continue to run unchanged.

Comments