Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: Brad BrezinskiI tried to use a Execute System Command node to run this command: sh ${HOME}/Lavastorm/LAE6.1.4/bin/lae_PSAUXDefunct
I worked a few time but I’m getting a message that the object is not iterable. Do I have the syntax correct? Also, is there a way to get PS AUX to output with a delimiter like a comma?
node:ps_aux__grep_defunct
bretype:DefunctPIDs::Execute System Command
editor:Label=ps aux | grep defunct
editor:sortkey=566b1b2a363f12b9_7
output:@4bbb5f76369e1fb0/=
prop:Command=sh /opt/app/t1lae1c1/Lavastorm/LAE6.1.4/bin/lae_PSAUXDefunct
editor:XY=90,120
editor:Notes=Variables
editor:Notes=${HOME}/Lavastorm/LAE6.1.4/bin
editor:Notes=sh ${HOME}/Lavastorm/LAE6.1.4/bin/lae_PSAUXDefunct
editor:Notes=sh /opt/app/t1lae1c1/Lavastorm/LAE6.1.4/bin/lae_PSAUXDefunct
editor:Notes=
editor:Notes=This is the script at /opt/app/t1lae1c1/Lavastorm/LAE6.1.4/bin/lae_PSAUXDefunct:
editor:Notes=
editor:Notes=. "/opt/app/t1lae1c1/Lavastorm/LAE6.1.4/.profile.lavastorm"
editor:Notes=
editor:Notes=vDefunctHeaders="PSAUXString"
editor:Notes=vDefunctList="$(ps aux | grep defunct)"
editor:Notes=
editor:Notes=echo "${vDefunctHeaders}" > /home/bb2712/graph_utility/lae_defuctlist.txt
editor:Notes=echo "${vDefunctList}" >> /home/bb2712/graph_utility/lae_defuctlist.txt
end:ps_aux__grep_defunct
node:Delimited_File
bretype:core::Delimited File
editor:sortkey=5ad919a2510446f1
output:@41e6c6cd11e613c6/=
inclock:/=ps_aux__grep_defunct
prop:FieldDelimiter=\" "
prop:File=/home/bb2712/graph_utility/lae_defuctlist.txt
prop:RecordDelimiter=\n
editor:XY=190,120
editor:Notes=lae_defuctlist.txt
end:Delimited_File
And this two nodes also:
node:Delimited_File_3
bretype:core::Delimited File
editor:sortkey=5ad919a2510446f1_2
output:@41e6c6cd11e613c6/=
inclock:/=ps_aux__sort_nrk_33__head_n_10
prop:FieldDelimiter=\t
prop:File=/home/bb2712/graph_utility/lae_PSAUXTop10.txt
prop:RecordDelimiter=\n
editor:XY=200,400
editor:Notes=lae_defuctlist.txt
editor:Notes=/opt/app/t1lae1c1/Lavastorm/LAE6.1.4/bin/lae_PSAUXTop10.txt
editor:Notes=${HOME}/Lavastorm/LAE6.1.4/bin/lae_PSAUXTop10.txt
editor:Notes=/home/bb2712/graph_utility/lae_PSAUXTop10.txt
end:Delimited_File_3
node:ps_aux__sort_nrk_33__head_n_10
bretype:DefunctPIDs::Execute System Command
editor:Label=ps aux | sort -nrk 3,3 | head -n 10
editor:sortkey=566b1b2a363f12b9
output:@4bbb5f76369e1fb0/=
prop:Command=sh /opt/app/t1lae1c1/Lavastorm/LAE6.1.4/bin/lae_PSAUXTop10
editor:XY=100,400
editor:Notes=Variables
editor:Notes=${HOME}/Lavastorm/LAE6.1.4/bin
editor:Notes=sh ${HOME}/Lavastorm/LAE6.1.4/bin/testscript6
editor:Notes=sh /opt/app/t1lae1c1/Lavastorm/LAE6.1.4/bin/testscript6
editor:Notes=
editor:Notes=sh /opt/app/t1lae1c1/Lavastorm/LAE6.1.4/bin/lae_PSAUXTop10
editor:Notes=sh ${HOME}/Lavastorm/LAE6.1.4/bin/lae_PSAUXTop10
editor:Notes=
editor:Notes=This is the script at /opt/app/t1lae1c1/Lavastorm/LAE6.1.4/bin/testscript6:
editor:Notes=
editor:Notes=. "/opt/app/t1lae1c1/Lavastorm/LAE6.1.4/.profile.lavastorm"
editor:Notes=
editor:Notes=vDefunctHeaders="PSAUXString"
editor:Notes=vDefunctList="$(ps aux | grep defunct)"
editor:Notes=#vDefunctZColumn="$(ps aux | awk '{ print $8 " " $2 }' | grep -w Z)"
editor:Notes=
editor:Notes=echo "${vDefunctHeaders}" > /home/bb2712/graph_utility/lae_defuctlist.txt
editor:Notes=echo "${vDefunctList}" >> /home/bb2712/graph_utility/lae_defuctlist.txt
end:ps_aux__sort_nrk_33__head_n_10
SCRIPT ONE: This is the script at /opt/app/t1lae1c1/Lavastorm/LAE6.1.4/bin/lae_PSAUXDefunct is:
. "/opt/app/t1lae1c1/Lavastorm/LAE6.1.4/.profile.lavastorm"
vDefunctHeaders="PSAUXString"
vDefunctList="$(ps aux | grep defunct)"
echo "${vDefunctHeaders}" > /home/bb2712/graph_utility/lae_defuctlist.txt
echo "${vDefunctList}" >> /home/bb2712/graph_utility/lae_defuctlist.txt
SCRIPT TWO:
. "/opt/app/t1lae1c1/Lavastorm/LAE6.1.4/.profile.lavastorm"
vDefunctList="$(ps aux | sort -nrk 3,3 | head -n 10)"
vDefunctHeaders="PSAUXTop10"
echo "${vDefunctHeaders}" > /home/bb2712/graph_utility/lae_PSAUXTop10.txt
echo "${vDefunctList}" >> /home/bb2712/graph_utility/lae_PSAUXTop10.txt
echo "${vDefunctHeaders}"
echo "${vDefunctList}"
echo "This is the PS AUX Top 10 output:"
vDefunctAUX="$(ps aux | sort -nrk 3,3 | head -n 10)"
echo "${vDefunctAUX}"