3

Need to be able to edit this file: /sys/class/net/eth0/queues/rx-0/rps_cpus

The file permissions:

cd:/sys/class/net/eth0/queues/rx-0$ ls -l
total 0
-rw-r--r-- 1 root root 4096 2012-02-13 17:23 rps_cpus
-rw-r--r-- 1 root root 4096 2012-02-13 12:54 rps_flow_cnt
cd :/sys/class/net/eth0/queues/rx-0$**

Tried this:

$ sudo rm /sys/class/net/eth0/queues/rx-0/rps_cpus; sudo sh -c "echo 1 > /sys/class/net/eth0/queues/rx-0/rps_cpus"
rm: cannot remove `/sys/class/net/eth0/queues/rx-0/rps_cpus': Operation not permitted

1 Answer 1

4

The files under /sys/ aren't real files, they're representations of the kernel's internal state. You can tweak kernel parameters by writing stuff to them, but as they are not actual files, you cannot delete them.

If what you want is to put a "1" there, try this:

echo 1 | sudo tee /sys/class/net/eth0/queues/rx-0/rps_cpus

See the answer to this question for an explanation of the "sudo tee" trick and why it's useful in this case.

Read more about /sys/ here: http://en.wikipedia.org/wiki/Sysfs

1
  • Well, there ya go. Just when I thought I had it figured out. Thanks
    – Ringtail
    Feb 14, 2012 at 2:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .