summaryrefslogtreecommitdiffstats
path: root/src/spdk/dpdk/app/test/get-coremask.sh
blob: bb8cf404d20a49de80675ad69b259f33985d8ec1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#! /bin/sh -e
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2019 Intel Corporation

if [ "$(uname)" = "Linux" ] ; then
	cat /sys/devices/system/cpu/present
elif [ "$(uname)" = "FreeBSD" ] ; then
	ncpus=$(/sbin/sysctl -n hw.ncpu)
	echo 0-$(expr $ncpus - 1)
else
# fallback
	echo 0-3
fi