Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
4.5. Examples of Using Tuna
Example 4.1. Assigning Tasks to Specific CPUs
				The following example uses a system with four or more processors, and shows how to make all 
ssh threads run on CPU 0 and 1, and all http threads on CPU 2 and 3.
			tuna --cpus=0,1 --threads=ssh\* --move --cpus=2,3 --threads=http\* --move
# tuna --cpus=0,1 --threads=ssh\* --move --cpus=2,3 --threads=http\* --move
				The above example command performs the following operations sequentially:
			
- Select CPUs 0 and 1.
- Select all threads that begin withssh.
- Move the selected threads to the selected CPUs. Tuna sets the affinity mask of threads starting withsshto the appropriate CPUs. The CPUs can be expressed numerically as 0 and 1, in hex mask as0x3, or in binary as11.
- Reset the CPU list to 2 and 3.
- Select all threads that begin withhttp.
- Move the selected threads to the selected CPUs. Tuna sets the affinity mask of threads starting withhttpto the appropriate CPUs. The CPUs can be expressed numerically as 2 and 3, in hex mask as0xC, or in binary as1100.
Example 4.2. Viewing Current Configurations
				The following example uses the 
--show_threads (-P) parameter to display the current configuration, and then tests if the requested changes were made as expected.
			
				The above example command performs the following operations sequentially:
			
- Select all threads that begin withgnome-sc.
- Show the selected threads to enable the user to verify their affinity mask and RT priority.
- Select CPU 0.
- Move thegnome-scthreads to the selected CPU (CPU 0).
- Show the result of the move.
- Reset the CPU list to CPU 1.
- Move thegnome-scthreads to the selected CPU (CPU 1).
- Show the result of the move.
- Add CPU 0 to the CPU list.
- Move thegnome-scthreads to the selected CPUs (CPUs 0 and 1).
- Show the result of the move.