Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have to change the smp_affinity of a interrupt permanently. The following code needs to be executed when the server reboots:

echo "1" > /proc/irq/152/smp_affinity_list
echo "2" > /proc/irq/151/smp_affinity_list
echo "3" > /proc/irq/150/smp_affinity_list
echo "4" > /proc/irq/149/smp_affinity_list
echo "5" > /proc/irq/148/smp_affinity_list
echo "6" > /proc/irq/147/smp_affinity_list
echo "7" > /proc/irq/146/smp_affinity_list
echo "8" > /proc/irq/145/smp_affinity_list
echo "9" > /proc/irq/144/smp_affinity_list
echo "10" > /proc/irq/143/smp_affinity_list
echo "11" > /proc/irq/142/smp_affinity_list
echo "12" > /proc/irq/141/smp_affinity_list
echo "13" > /proc/irq/140/smp_affinity_list
echo "14" > /proc/irq/139/smp_affinity_list
echo "15" > /proc/irq/138/smp_affinity_list
echo "16" > /proc/irq/137/smp_affinity_list

I've added these lines to the /etc/rc.local file but the changes are not applied to the system. I've also added echo "test" > /root/test which gets executed properly, so the rc.local file gets executed. The system is running Debian 6.0.

share|improve this question

2 Answers 2

The rc.local script should be the last executed on boot. Let's supposed it not running as last in your system, then it might run too early, before /proc is even mounted. Or it might be a problem on your modular kernel if the smp_affinity_list is managed by a kernel module still not loaded when rc.local is run.

So, just change your rc.local and check for the existance of /proc/irq/*/smp_affinity_list before echoing into it. Otherwise sleep for some time and try again and eventually emit an error message via the logger command, so that you will be able to read it in /var/log/syslog.

share|improve this answer

You may have irqbalance service loading during startup which would reset anything you have running at startup. This article explains how to stop the irqbalance service:

service --status-all
chkconfig --list | grep '3:on'
chkconfig irqbalance off
service irqbalance stop

And then remove it from the boot runlevel so it won't be restarted on boot:

update-rc.d -f irqbalance remove <-- removes from boot process
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.