aboutsummaryrefslogtreecommitdiff
path: root/huge_page_setup_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'huge_page_setup_helper.py')
-rwxr-xr-xhuge_page_setup_helper.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/huge_page_setup_helper.py b/huge_page_setup_helper.py
index b8545ed..9de0739 100755
--- a/huge_page_setup_helper.py
+++ b/huge_page_setup_helper.py
@@ -10,7 +10,12 @@
#
import os
-debug = True
+debug = False
+
+# must be executed under the root to operate
+if os.geteuid() != 0:
+ print "You must be root to setup hugepages!"
+ os._exit(1)
# config files we need access to
sysctlConf = "/etc/sysctl.conf"