Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
themeMidnight
languagebash
titleEdit /opt/nsys/bin/nsys-daemon.env.sh file:
linenumberstrue
#!/bin/bash

#
# One way to set the NSYS HOME path is here via this variable. Simply uncomment it and set a valid path like
# /var/nsys/application-data/daemon. You can of course set it outside in the command terminal, that will also work.
#
NSYS_HOME="/var/nsys/application-data/daemon"

#
# One way to set the custom NSYS CONFIG is here via this variable. Simply uncomment it and set a valid path like
# /opt/nsys/conf/nsys.cfg. You can of course set it outside in the command terminal, that will also work.
#
NSYS_CONFIG="/opt/nsys/conf/nsys.cfg"

#
# One way to set the custom LOG4J CONFIG is here via this variable. Simply uncomment it and set a valid path like
# /opt/nsys/conf/log4j.xml. You can of course set it outside in the command terminal, that will also work.
#
LOG4J_CONFIG="/opt/nsys/conf/log4j.xml"

#
# Occasionally support team may recommend that you set some specific JVM arguments. 
# You can use this variable below to do that.
#
JVM_SUPPORT_RECOMMENDED_ARGS=""

#
# The following 2 settings control the minimum and maximum given to the Nsys Daemon Java virtual machine.
# In larger Nsys Platform instances, the maximum amount will need to be increased.
#
JVM_MINIMUM_MEMORY="128m"
JVM_MAXIMUM_MEMORY="256m"

if [ "x$NSYS_HOME" = "x" ]; then
    NSYS_HOME="${NSYS_BASEDIR}/application-data/daemon"
    echo "Variable NSYS_HOME is missing! Using default..." >&2
fi

if [ "x$NSYS_CONFIG" = "x" ]; then
    NSYS_CONFIG="${NSYS_BASEDIR}/conf/nsys.cfg"
    echo "Variable NSYS_CONFIG is missing! Using default..." >&2
fi

if [ "x$LOG4J_CONFIG" = "x" ]; then
    LOG4J_CONFIG="${NSYS_BASEDIR}/conf/log4j.xml"
    echo "Variable LOG4J_CONFIG is missing! Using default..." >&2
fi

#
# The following creates classpaths for Nsys-Boot class loader.
# http://doc.nsys.org/display/NSYS/Nsys+Boot
#

NSYS_CLASSPATH="."

for entry in "$NSYS_BASEDIR"/lib/*.jar 
do
  NSYS_CLASSPATH="${NSYS_CLASSPATH}|${entry}"
done

#
# The following are the required arguments needed for Nsys Daemon.
#
JVM_REQUIRED_ARGS="-Dnsys.home=${NSYS_HOME} -Dnsys.basedir=${NSYS_BASEDIR} -Dnsys.config=${NSYS_CONFIG} -Dnsys-boot.class.path=${NSYS_CLASSPATH}"
JVM_REQUIRED_ARGS="${JVM_REQUIRED_ARGS} -Dnsys.daemon.port=9080"

JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${NSYS_OPTS} ${JVM_SUPPORT_RECOMMENDED_ARGS}"

# PermGen size needs to be increased if encountering OutOfMemoryError: PermGen problems. 
# Specifying PermGen size is not valid on IBM JDKs.
JVM_MAX_PERM_SIZE=128m

if [ "$JAVA_VERSION" -lt 18 ]; then
        JAVA_OPTS="-XX:MaxPermSize=${JVM_MAX_PERM_SIZE} ${JAVA_OPTS}"
fi

JAVA_OPTS="${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true"
JAVA_OPTS="${JAVA_OPTS} -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8"

if [ "$LOG4J_CONFIG" != "" ]; then
    JAVA_OPTS="${JAVA_OPTS} -Dlog4j.debug=false -Dlog4j.configuration=file:${LOG4J_CONFIG}"
fi

export JAVA_OPTS
Code Block
themeMidnight
languagebash
titleEdit /opt/nsys/bin/nsys-portal.env.sh file:
linenumberstrue
#!/bin/bash

#
# One way to set the NSYS HOME path is here via this variable. Simply uncomment it and set a valid 
# path like /var/nsys/application-data/portal. You can of course set it outside in the command 
# terminal, that will also work.
#
NSYS_HOME="/var/nsys/application-data/portal"

#
# One way to set the custom NSYS CONFIG is here via this variable. Simply uncomment it and set a valid path like
# /opt/nsys/conf/nsys-portal.cfg. You can of course set it outside in the command terminal, that will also work.
#
NSYS_CONFIG="/opt/nsys/conf/nsys-portal.cfg"

#
# One way to set the custom LOG4J CONFIG is here via this variable. Simply uncomment it and set a valid path like
# /opt/nsys/conf/log4j-portal.xml. You can of course set it outside in the command terminal, that will also work.
#
LOG4J_CONFIG="/opt/nsys/conf/log4j-portal.xml"

#
# Occasionally support team may recommend that you set some specific JVM arguments. 
# You can use this variable below to do that.
#
JVM_SUPPORT_RECOMMENDED_ARGS=""

#
# The following 2 settings control the minimum and maximum given to the Nsys Portal Java virtual machine.
# In larger Nsys Platform instances, the maximum amount will need to be increased.
#
JVM_MINIMUM_MEMORY="128m"
JVM_MAXIMUM_MEMORY="384m"

if [ "x$NSYS_HOME" = "x" ]; then
    NSYS_HOME="${NSYS_BASEDIR}/application-data/portal"
    echo "Variable NSYS_HOME is missing! Using default..." >&2
fi

if [ "x$NSYS_CONFIG" = "x" ]; then
    NSYS_CONFIG="${NSYS_BASEDIR}/conf/nsys-portal.cfg"
    echo "Variable NSYS_CONFIG is missing! Using default..." >&2
fi

if [ "x$LOG4J_CONFIG" = "x" ]; then
    LOG4J_CONFIG="${NSYS_BASEDIR}/conf/log4j-portal.xml"
    echo "Variable LOG4J_CONFIG is missing! Using default..." >&2
fi

#
# The following are the required arguments needed for Nsys Portal.
#
JVM_REQUIRED_ARGS="-Dnsys.home=${NSYS_HOME} -Dnsys.basedir=${NSYS_BASEDIR} -Dnsys.config=${NSYS_CONFIG}"
JVM_REQUIRED_ARGS="${JVM_REQUIRED_ARGS} -Dnsys.portal.http.port=9060 -Dnsys.portal.https.port=9070"
JVM_REQUIRED_ARGS="${JVM_REQUIRED_ARGS} -Dnsys.portal.ajp.port=9050 -Dnsys.portal.rmi.port=9040"

JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${NSYS_OPTS} ${JVM_SUPPORT_RECOMMENDED_ARGS}"

# PermGen size needs to be increased if encountering OutOfMemoryError: PermGen problems. 
# Specifying PermGen size is not valid on IBM JDKs.
JVM_MAX_PERM_SIZE=256m

if [ "$JAVA_VERSION" -lt 18 ]; then
        JAVA_OPTS="-XX:MaxPermSize=${JVM_MAX_PERM_SIZE} ${JAVA_OPTS}"
fi

JAVA_OPTS="${JAVA_OPTS} -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8"

if [ "$LOG4J_CONFIG" != "" ]; then
    JAVA_OPTS="${JAVA_OPTS} -Dlog4j.debug=false -Dlog4j.configuration=file:${LOG4J_CONFIG}"
fi

export JAVA_OPTS

...