[Bugs] [Bug 1766425] cgroup control-cpu-load.sh script not working
bugzilla at redhat.com
bugzilla at redhat.com
Tue Oct 29 02:53:13 UTC 2019
https://bugzilla.redhat.com/show_bug.cgi?id=1766425
Mohit Agrawal <moagrawa at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|bugs at gluster.org |moagrawa at redhat.com
--- Comment #1 from Mohit Agrawal <moagrawa at redhat.com> ---
RCA:
As per current code in script it moves the thread of any gluster process
those have gluster keyword
as a substring and as of now all gluster threads has glfs prefix so script is
not able to move all
gluster threads to new created cgroup and cgroup restriction are not working
if ps -T -p ${daemon_pid} | grep gluster > /dev/null; then
for thid in `ps -T -p ${daemon_pid} | grep gluster | awk -F " " '{print
$2}'`;
do
echo ${thid} > ${LOC}/${cgroup_name}/tasks ;
done
if cat /proc/${daemon_pid}/cgroup | grep -w ${cgroup_name} > /dev/null; then
echo "Tasks are attached successfully specific to ${daemon_pid} to
${cgroup_name}."
else
echo "Tasks are not attached successfully."
fi
fi
To avoid the same need to change the script for loop condition like below
if ps -T -p ${daemon_pid} | grep gluster > /dev/null; then
for thid in `ps -T -p ${daemon_pid} | grep -v SPID | awk -F " " '{print
$2}'`;
do
echo ${thid} > ${LOC}/${cgroup_name}/tasks ;
done
if cat /proc/${daemon_pid}/cgroup | grep -w ${cgroup_name} > /dev/null; then
echo "Tasks are attached successfully specific to ${daemon_pid} to
${cgroup_name}."
else
echo "Tasks are not attached successfully."
fi
fi
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list