]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - schedutils/taskset.1
rev: be careful with close()
[thirdparty/util-linux.git] / schedutils / taskset.1
index 901f9faf5f455188a05b42b0a5e166926d75183c..dc3d25666d3c5a320b2382d139988b6eb0351fe9 100644 (file)
@@ -51,21 +51,34 @@ to the last logical CPU.  Not all CPUs may exist on a given system but a mask
 may specify more CPUs than are present.  A retrieved mask will reflect only the
 bits that correspond to CPUs physically on the system.  If an invalid mask is
 given (i.e., one that corresponds to no valid CPUs on the current system) an
-error is returned.  The masks are typically given in hexadecimal.  For example,
+error is returned.  The masks may be specified in hexadecimal (with or without
+a leading "0x"), or as a CPU list with the
+.B \-\-cpu\-list
+option.  For example,
 .RS 4
 .TP 12
-.BR 0x00000001
+.B 0x00000001
 is processor #0,
 .TP
-.BR 0x00000003
+.B 0x00000003
 is processors #0 and #1,
 .TP
-.BR 0xFFFFFFFF
-is all processors (#0 through #31).
+.B 0xFFFFFFFF
+is processors #0 through #31,
+.TP
+.B 32
+is processors #1, #4, and #5,
+.TP
+.B \-\-cpu\-list\ 0-2,6
+is processors #0, #1, #2, and #6.
+.TP
+.B \-\-cpu\-list\ 0-10:2
+is processors #0, #2, #4, #6, #8 and #10. The suffix ":N" specifies stride in
+the range, for example 0-10:3 is interpreted as 0,3,6,9 list.
 .RE
 .PP
 When
-.BR taskset
+.B taskset
 returns, it is guaranteed that the given program has been scheduled to a legal
 CPU.
 .SH OPTIONS
@@ -110,11 +123,11 @@ A user can retrieve the affinity mask of any process.
 .BR chrt (1),
 .BR nice (1),
 .BR renice (1),
-.BR sched_setaffinity (2),
-.BR sched_getaffinity (2)
+.BR sched_getaffinity (2),
+.BR sched_setaffinity (2)
 .sp
 See
-.BR sched_setscheduler (2)
+.BR sched (7)
 for a description of the Linux scheduling scheme.
 .SH AUTHOR
 Written by Robert M. Love.
@@ -124,4 +137,4 @@ This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 .SH AVAILABILITY
 The taskset command is part of the util-linux package and is available from
-ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
+https://www.kernel.org/pub/linux/utils/util-linux/.