mirror of
https://github.com/xmrig/xmrig.git
synced 2025-02-06 13:16:37 +00:00
Fix shellcheck warnings in enable_1gb_pages.sh
This commit is contained in:
parent
80ae339343
commit
785836cd9a
1 changed files with 4 additions and 7 deletions
|
@ -1,12 +1,9 @@
|
|||
#!/bin/bash -e
|
||||
#!/bin/sh -e
|
||||
|
||||
# https://xmrig.com/docs/miner/hugepages#onegb-huge-pages
|
||||
|
||||
sysctl -w vm.nr_hugepages=$(nproc)
|
||||
sysctl -w vm.nr_hugepages="$(nproc)"
|
||||
|
||||
for i in $(find /sys/devices/system/node/node* -maxdepth 0 -type d);
|
||||
do
|
||||
echo 3 > "$i/hugepages/hugepages-1048576kB/nr_hugepages";
|
||||
done
|
||||
find /sys/devices/system/node/node* -maxdepth 0 -type d -exec sh -c 'echo 3 > "$1/hugepages/hugepages-1048576kB/nr_hugepages"' _ {} \;
|
||||
|
||||
echo "1GB pages successfully enabled"
|
||||
echo "1GB pages successfully enabled"
|
||||
|
|
Loading…
Reference in a new issue