- Posts: 47
- Thank you received: 59
Please Log in or Create an account to join the conversation.
quotes seem to be missing here? ($2 == 10.10.10.1) →→→ ($2 == "10.10.10.1")Something like this should work:
Code:#!/bin/bash MASK=$( printf "%X" $((1<<`lscpu -e=CPU | tail -1`)) ) NIC=`awk 'BEGIN{nic=""} {if ($1=="iface") {tmpnic = $2} if ($1=="address") {if ($2 == 10.10.10.1) {nic = tmpnic}}} END{print(nic)}' /etc/network/interfaces` if [ "$NIC" != "" ]; then grep $NIC /proc/interrupts | cut -d ":" -f 1 | while read -r IRQ; do echo $MASK > /proc/irq/$IRQ/smp_affinity done fi exit 0"
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.