Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
ncharles committed Oct 24, 2023
1 parent ef41f6f commit d900fc5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -13,7 +13,7 @@
+ TOTAL_MEM_NEEDED=$((((${1})*100)/90))
+ TOTAL_MEM_AVAILABLE=$(($(free -m|awk '/^Mem:/{print $2}')+$(free -m|awk '/^Swap:/{print $2}')))
+ if [ ${TOTAL_MEM_AVAILABLE} -le ${TOTAL_MEM_NEEDED} ]; then
+ echo "WARNING: Not enough free memory to start Jetty (about ${TOTAL_MEM_NEEDED}MB are needed). Trying anyway, but>
+ echo "WARNING: Not enough free memory to start Jetty (about ${TOTAL_MEM_NEEDED}MB are needed). Trying anyway, but the application is likely to fail."
+ fi
+}
+
Expand Down
Expand Up @@ -14,7 +14,7 @@
+ fi
+elif [ -n "${ns}" ]; then # we have namespaces
+ # the sed is here to prepend a fake user field that is removed by the -o option (it is never used)
+ PS_COMMAND="eval ps --no-header -e -O utsns | grep -E '^[[:space:]]*[[:digit:]]*[[:space:]]+${ns}' | sed 's/^/user >
+ PS_COMMAND="eval ps --no-header -e -O utsns | grep -E '^[[:space:]]*[[:digit:]]*[[:space:]]+${ns}' | sed 's/^/user /'"
+else # standard unix
+ PS_COMMAND="ps -ef"
+fi
Expand Down

0 comments on commit d900fc5

Please sign in to comment.