⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 openmosix

📁 OpenMosix工具
💻
字号:
#!/bin/sh -## chkconfig: 2345 95 5# description: OpenMosix configures your computer to be part#              of a high-performance computing cluster on your system.## openmosix    Script to enable/disable openmosix on your system.### Copyright (c) 2002 Amit Shah (amitshah@gmx.net)#### Mosix is (c) of prof. Barak http://www.mosix.org## OpenMosix is (c) of Moshe Bar http://www.openmosix.com## Each respective trademark is of its own owner## All rights reserved.#### This software is distributed under GPL 2## THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTY IS ASSUMED.## NO LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING## FROM THE USE OF THIS SOFTWARE WILL BE ACCEPTED. IT CAN BURN## YOUR HARD DISK, ERASE ALL YOUR DATA AND BREAK DOWN YOUR## MICROWAVE OVEN. YOU ARE ADVISED.#daemon openmosix. /etc/rc.d/init.d/functionsdisable_openmosix() {        # is this an openmosix system?        if [ -f /proc/hpc/admin/mospe ]	then	    echo 0 > /proc/hpc/admin/mospe	else	    echo "This is not OpenMosix!"	fi	action $"Disabling OpenMosix..." rm -f /var/lock/subsys/openmosix}enable_openmosix() {        # check if openmosix is already enabled        if [ -f /var/lock/subsys/openmosix ]	then	    echo OpenMosix already enabled.	    exit 2 # error condition	fi        # read the configuration in /etc/hpc.map in the kernel        # via the /proc/hpc interface.	if [ -f /etc/hpc.map ]; then	    action $"Initializing OpenMosix..." /sbin/setpe -W $a1 $a2 -f /etc/hpc.map	fi        # for us to know that we're running...	if [ $? -eq 0 ] # if the command above was successful	then	    touch /var/lock/subsys/openmosix	fi}# Control is given here when the script is run.case "$1" in  start) # Attempt to enable openmosix on this node	#echo "Initializing OpenMOSIX..."	if [ ! -f /etc/hpc.map]	then # hpc.map doesn't exist -- display warning message		if [[ ! -f /etc/mosix.map ]]		then		    echo "Please configure the hpc.map file in /etc."		    echo "For instructions, refer the README that came"		    echo "along with the OpenMosix userland tools."		    exit 1;		else		    echo " "		    echo ",---------------------WARNING------------------------;"		    echo "|     mosix.map is the configuration file of the old |"		    echo "| MOSIX project. For now, it is supported for        |"		    echo "| backwards compatibility, but keep in mind that     |"		    echo "| shortly it would be depreciated.                   |"		    echo ",---------------------WARNING------------------------;"		    echo "|    These are OpenMosix userland tools, NOT MOSIX   |"		    echo "| userland tools. It does not work with a kernel with|"		    echo "| the MOSIX kernel patch. If you want to use the     |"		    echo "| MOSIX kernel patch, you should use their userland  |"		    echo "| tools, and agree with their licence.               |"		    echo ",---------------------WARNING------------------------;"		    echo "| System Adminstrators are required to make note     |"		    echo "| of this and change the filename to hpc.map.        |"		    echo "| The contents of the file will remain the same.     |"		    echo "\`---------------------WARNING------------------------'"		    echo " "		fi	fi			enable_openmosix ;;  stop) # Disable openmosix for this session	#echo "Disabling OpenMOSIX..."	disable_openmosix ;;  status) # what's our current status: enabled/disabled?	/sbin/setpe -r ;;  restart|reload) # disable, then re-enable openmosix on this node.	echo "Restarting OpenMOSIX..."	disable_openmosix	enable_openmosix ;;  *) # if no command-line arguments given or invalid argument:	echo "Usage: openmosix {start|stop|status|restart|reload}"	exit 1 # error conditionesacexit 0 # successful termination... ie no error.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -