1.\" $NetBSD: psrset.8,v 1.5 2008/09/23 10:09:56 rmind Exp $ 2.\" 3.\" Copyright (c) 2008 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 16.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 17.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 19.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25.\" POSSIBILITY OF SUCH DAMAGE. 26.\" 27.Dd September 23, 2008 28.Dt PSRSET 8 29.Os 30.Sh NAME 31.Nm psrset 32.Nd control processor sets 33.Sh SYNOPSIS 34.Nm 35.Op Ar setid ... 36.Nm 37.Fl a Ar setid Ar cpuid Ar ... 38.Nm 39.Fl b Ar setid Ar pid Ar ... 40.Nm 41.Fl c Op Ar cpuid Ar ... 42.Nm 43.Fl d Ar setid 44.Nm 45.Fl e Ar setid Ar command 46.Nm 47.Fl i Op Ar setid ... 48.Nm 49.Fl p 50.Nm 51.Fl r Ar cpuid Ar ... 52.Nm 53.Fl u Ar pid Ar ... 54.Sh DESCRIPTION 55The 56.Nm 57command can be used to control and inspect processor sets. 58.Pp 59The system always contains at least one processor set: the default 60set. 61The default set must contain at least one online processor (CPU) at 62all times. 63.Pp 64Available options: 65.Bl -tag -width indent 66.It Fl a 67Assign one or more processors (CPUs) to the set 68.Ar setid . 69In the current implementation, a CPU may only be present in one set. 70CPU IDs are as reported and used by the 71.Xr cpuctl 8 72command. 73.It Fl b 74Bind one or more processes to the set 75.Ar setid . 76All LWPs within the processes will be affected. 77Bindings are inherited when new LWPs or processes are forked. 78However, setting a new binding on a parent process does not affect the 79bindings of its existing child processes. 80.It Fl c 81Create a new processor set. 82If successful, the ID of the new set will be printed. 83If a list of CPU IDs is provided, those CPUs will be assigned to the set 84upon creation. 85Otherwise, the set will be created empty. 86.It Fl d 87Delete the processor set specified by 88.Ar setid . 89Any LWPs bound to the set will be re-bound to the default processor set. 90.It Fl e 91Execute a command within the processor set specified by 92.Ar setid . 93.It Fl i 94List all processor sets. 95For each set, print the member CPUs. 96If 97.Nm 98is run without any options, it behaves as if 99.Fl i 100were given. 101.It Fl p 102List all CPUs. 103For each CPU, print the associated processor set. 104.It Fl r 105Remove a CPU from its current set, and return it back to the default 106processor set. 107.It Fl u 108Bind the specified processes to the system default processor set. 109.El 110.Sh SEE ALSO 111.Xr pset 3 , 112.Xr cpuctl 8 , 113.Xr schedctl 8 114.Sh HISTORY 115The 116.Nm 117command first appeared in 118.Nx 5.0 . 119