mahmood
mahmood

Reputation: 24755

setting affinity with taskset nt work

When I want to set an affinity to a process like this:

sudo taskset -c 0 -p 30466

I get this error:

taskset: executing -p failed: No such file or directory

However top command shows the process is executing.

UPDATE:

The command

 sudo taskset -c -p 0 30466

works

Upvotes: 1

Views: 1598

Answers (2)

Cârnăciov
Cârnăciov

Reputation: 1144

Correct syntax is taskset -cp 0 30466

Old question but still viewed a lot.

Upvotes: 1

Kenneth Hoste
Kenneth Hoste

Reputation: 2971

For some reason taskset is trying to execute the command -p, and isn't even tried to look for the process with the PID you specify.

Which version of taskset are you using? Can you check with man taskset whether your version supports -p?

Upvotes: 0

Related Questions