subrata_modak | 8dfa1b3 | 2008-07-26 04:15:36 +0000 | [diff] [blame^] | 1 | ############################################################################# |
| 2 | ## |
| 3 | ## Copyright (c) International Business Machines Corp., 2007 |
| 4 | ## |
| 5 | ## This program is free software; you can redistribute it and#or modify |
| 6 | ## it under the terms of the GNU General Public License as published by |
| 7 | ## the Free Software Foundation; either version 2 of the License, or |
| 8 | ## (at your option) any later version. |
| 9 | ## |
| 10 | ## This program is distributed in the hope that it will be useful, but |
| 11 | ## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 12 | ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 13 | ## for more details. |
| 14 | ## |
| 15 | ## You should have received a copy of the GNU General Public License |
| 16 | ## along with this program; if not, write to the Free Software |
| 17 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 18 | ## |
| 19 | ############################################################################# |
| 20 | # |
| 21 | # Author Pradeep Kumar Surisetty, pradeepkumars@in.ibm.com |
| 22 | # |
| 23 | # History Nov 27 2007 -created- pradeep kumar surisetty |
| 24 | #! /bin/sh |
| 25 | # |
| 26 | # File : numa_test.sh |
| 27 | |
| 28 | |
| 29 | #!/bin/sh |
| 30 | x=0 |
| 31 | chk_ifexist() |
| 32 | { |
| 33 | if [ ! -d /sys/devices/system/node ] |
| 34 | then |
| 35 | x=0 |
| 36 | else |
| 37 | x=$(ls /sys/devices/system/node | wc -l) |
| 38 | fi |
| 39 | if [ $x -gt 1 ] |
| 40 | then |
| 41 | if [ ! -f /usr/include/numa.h ] |
| 42 | then |
| 43 | echo no; |
| 44 | else |
| 45 | echo yes; |
| 46 | fi |
| 47 | else |
| 48 | echo no; #numa is not present |
| 49 | |
| 50 | fi |
| 51 | } |
| 52 | chk_ifexist |
| 53 | |