You need to enable JavaScript to run this app.
导航

自动开启多队列

最近更新时间2022.06.29 16:36:09

首次发布时间2021.10.29 18:50:38

本文指导您如何实现自动开启网卡多队列。

将以下脚本写入到开机脚本中,可以实现开机时自动开启网卡多队列。

#!/bin/bash
nics=$(ip link | grep -v 'lo: ' | grep '^[0-9]' | awk -F':' '{print $2}')
for nic in $nics; do
    queue=$(ethtool -l $nic | grep Combined: | awk '{print $2}' | head -1)
    if [ x"$queue" = x ]; then
         continue
    fi
    if [ $queue -gt 1 ];then
        ethtool -L $nic combined $queue
    fi
done