summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2016-09-14 12:37:07 -0400
committerJonathan Abrahams <jonathan@mongodb.com>2016-09-14 12:37:07 -0400
commita071447aa574455acd1dbd1a1cab5bc1c53a4346 (patch)
tree9ffd4d93173122c990fa16e828aa772ac95ca84c /etc
parent3596a4fb09b31c955d95fbe17db0492589c96f03 (diff)
downloadmongo-a071447aa574455acd1dbd1a1cab5bc1c53a4346.tar.gz
SERVER-26044 Evergreen thread usage monitor should not send a signal to resmoke.py - code cleanup.
Diffstat (limited to 'etc')
-rw-r--r--etc/evergreen.yml42
1 files changed, 22 insertions, 20 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 8b633595331..51863498e1f 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -231,34 +231,36 @@ functions:
script: |
proc_list="(bsondump|java|lein|mongo|python|_test$|_test\.exe$)"
if [ "Windows_NT" = "$OS" ]; then
- get_pids() {\
- proc_pids=$(tasklist /fo:csv | awk -F'","' '{x=$1; gsub("\"","",x);\
- print $2, x}' | grep -i -E $1 | cut -f1 -d ' ');\
+ get_pids() {
+ proc_pids=$(tasklist /fo:csv |
+ awk -F'","' '{x=$1; gsub("\"","",x); print $2, x}' |
+ grep -i -E $1 |
+ cut -f1 -d ' ');
}
- get_process_info() {\
- proc_name="";\
- proc_info=$(wmic process where "ProcessId=\"$1\"" get "Name,ProcessId,ThreadCount" /format:csv 2> /dev/null | grep $1);\
- if [ ! -z $proc_info ]; then\
- proc_name=$(echo $proc_info | cut -f2 -d ',');\
+ get_process_info() {
+ proc_name="";
+ proc_info=$(wmic process where "ProcessId=\"$1\"" get "Name,ProcessId,ThreadCount" /format:csv 2> /dev/null | grep $1);
+ if [ ! -z $proc_info ]; then
+ proc_name=$(echo $proc_info | cut -f2 -d ',');
proc_threads=$(echo $proc_info | cut -f4 -d ',');
- fi;\
- }
+ fi;
+ }
else
get_pids() { proc_pids=$(pgrep $1); }
- get_process_info() {\
- proc_name=$(ps -p $1 -o comm=);\
+ get_process_info() {
+ proc_name=$(ps -p $1 -o comm=);
# prstat is available on Solaris
- if [ ! -z $(which prstat 2> /dev/null) ]; then\
- proc_threads=$(prstat -p $1 1 1 | grep $1 | cut -f2 -d "/");\
+ if [ ! -z $(which prstat 2> /dev/null) ]; then
+ proc_threads=$(prstat -p $1 1 1 | grep $1 | cut -f2 -d "/");
# /proc is available on Linux platforms
- elif [ -f /proc/$1/status ]; then\
- proc_threads=$($sudo grep Threads /proc/$1/status | sed "s/\s//g" | cut -f2 -d ":");\
- else\
- proc_threads=$(ps -AM $1 | grep -vc PID);\
- fi;\
+ elif [ -f /proc/$1/status ]; then
+ ${set_sudo}
+ proc_threads=$($sudo grep Threads /proc/$1/status | sed "s/\s//g" | cut -f2 -d ":");
+ else
+ proc_threads=$(ps -AM $1 | grep -vc PID);
+ fi;
}
fi
- ${set_sudo}
while [ 1 ]
do
get_pids $proc_list