Unix and Linux Discussions Tagged with cpu usage |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
3 |
15,429 |
UNIX for Advanced & Expert Users |
|
|
|
7 |
7,183 |
Shell Programming and Scripting |
|
|
|
10 |
13,421 |
Ubuntu |
|
|
|
5 |
13,938 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
3,862 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
3,639 |
Programming |
|
|
|
7 |
12,228 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
6,865 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
3,203 |
Solaris |
|
|
|
11 |
7,228 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
2,855 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
15,066 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
5,863 |
Programming |
|
|
|
1 |
1,968 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
3,730 |
UNIX for Advanced & Expert Users |
|
|
|
3 |
9,385 |
Shell Programming and Scripting |
|
|
|
1 |
9,084 |
HP-UX |
|
|
|
2 |
2,958 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
9,500 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
5,477 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
8,313 |
UNIX for Dummies Questions & Answers |
CPUSET(3) BSD Library Functions Manual CPUSET(3)
NAME
cpuset_create, cpuset_destroy, cpuset_zero, cpuset_set, cpuset_clr, cpuset_isset, cpuset_size -- dynamic CPU sets
SYNOPSIS
#include <sched.h>
cpuset_t *
cpuset_create(void);
void
cpuset_destroy(cpuset_t *set);
void
cpuset_zero(cpuset_t *set);
int
cpuset_set(cpuid_t cpu, cpuset_t *set);
int
cpuset_clr(cpuid_t cpu, cpuset_t *set);
int
cpuset_isset(cpuid_t cpu, const cpuset_t *set);
size_t
cpuset_size(const cpuset_t *set);
DESCRIPTION
This section describes the functions used to create, set, use and destroy the dynamic CPU sets.
This API can be used with the POSIX threads, see pthread(3) and affinity(3).
The ID of the primary CPU in the system is 0.
FUNCTIONS
cpuset_create()
Allocates and initializes a clean CPU-set. Returns the pointer to the CPU-set, or NULL on failure.
cpuset_destroy(set)
Destroy the CPU-set specified by set.
cpuset_zero(set)
Makes the CPU-set specified by set clean, that is, memory is initialized to zero bytes, and none of the CPUs set.
cpuset_set(cpu, set)
Sets the CPU specified by cpu in set. Returns zero on success, and -1 if cpu is invalid.
cpuset_clr(cpu, set)
Clears the CPU specified by cpu in the CPU-set set. Returns zero on success, and -1 if cpu is invalid.
cpuset_isset(cpu, set)
Checks if CPU specified by cpu is set in the CPU-set set. Returns the positive number if set, zero if not set, and -1 if cpu is
invalid.
cpuset_size(set)
Returns the size in bytes of CPU-set specified by set.
SEE ALSO
affinity(3), pset(3), sched(3), schedctl(8), kcpuset(9)
HISTORY
The dynamic CPU sets appeared in NetBSD 5.0.
BSD
November 2, 2011 BSD