Skip to content

Commit ab5f713

Browse files
committed
st2ctl: Force ps to use wide output to avoid truncation
At least in GHA in some cases, the ps output is getting truncated, possibly respecting our COLUMNS=120 env var. This adds ww to the ps command to make it have unlimited width.
1 parent 27a2f60 commit ab5f713

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

st2common/bin/st2ctl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function service_manager() {
141141
function reopen_component_log_files() {
142142
COM=${1}
143143

144-
PID=`ps ax | grep -v grep | grep -v st2ctl | grep -E "(${COM}\.wsgi)|(bin/${COM})|(hubot .*${COM})" | awk '{print $1}'`
144+
PID=`ps axww | grep -v grep | grep -v st2ctl | grep -E "(${COM}\.wsgi)|(bin/${COM})|(hubot .*${COM})" | awk '{print $1}'`
145145
if [[ ! -z ${PID} ]]; then
146146
for p in ${PID}; do
147147
echo "Sending SIGUSR1 to ${COM} PID: ${p}"
@@ -201,7 +201,7 @@ function getpids() {
201201
COMPONENTS=${COMPONENTS}
202202

203203
for COM in ${COMPONENTS}; do
204-
PID=`ps ax | grep -v grep | grep -v st2ctl | grep -E "(${COM}\.wsgi)|(bin/${COM})|(hubot .*${COM})" | awk '{print $1}'`
204+
PID=`ps axww | grep -v grep | grep -v st2ctl | grep -E "(${COM}\.wsgi)|(bin/${COM})|(hubot .*${COM})" | awk '{print $1}'`
205205

206206
if [[ ! -z ${PID} ]]; then
207207
for p in ${PID}; do

0 commit comments

Comments
 (0)