This was supplied by nmon user Paul Smith - well done Paul.
Call this file nmon make it executable and it should work out the platform you are on and start the right nmon version automatically.
If you have changed of fixes please make a copy here and add them.
plat=power # not tested
[ `expr \`uname -m\` : ".*\(86\)"` = "86" ] && plat=x86
os=`head -1 /etc/issue`
required=no_nmon_found
case $os in
*Debian*) required=nmon_"$plat"_debian3 ;; # not tested
*Fedora*) required=nmon_"$plat"_fedora3 ;; # not tested
*Shrike*) required=nmon_"$plat"_redhat9 ;;
*Red\ Hat*release\ 2*) required=nmon_"$plat"_rhel2 ;;
*Red\ Hat*release\ 3*) required=nmon_"$plat"_rhel3 ;;
*Red\ Hat*release\ 4*) required=nmon_"$plat"_rhel4 ;;
*Red\ Hat*release\ 5*) required=nmon_"$plat"_rhel52 ;;
*SUSE*8\.*) required=nmon_"$plat"_sles8 ;; # not tested
*SUSE*9\.*) required=nmon_"$plat"_sles9 ;;
*SUSE*10\.*) required=nmon_"$plat"_sles9 ;;
esac
echo Linux version $os and starting up nmon $required
# Try current directory
if [[ -e $required ]]
then
echo $required $*
exec $required $*
fi
# Try current directory with ./
if [[ -e ./$required ]]
then
echo ./$required $*
exec ./$required $*
fi
# Try same directory as this script
if [[ -e `dirname $0`/$required ]]
then
echo `dirname $0`/$required $*
exec `dirname $0`/$required $*
fi
echo Giving up - where did you put $required ?
Ubuntu users can use the RHEL4 version (at least on my Ubuntu 7.10 x86_64 install).
Add this line to the "case" section:
Ubuntu) required=nmon_"$plat"_rhel4 ;; # Tested - Dan Linder - dan / at / linder / dot / org
Dan
P.S. I don't think the 32bit/64bit detection on the first two lines is working. The $plat variable is "x86" but should be "x86_64"... Add this line right after the "plat=x86" line:
[ `expr \`uname -m\` : ".*(86_64)"` = "86" ] && plat=x86_64