Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set CPU limit to 80% when it needs to activate? #1

Open
ThunderModsYT opened this issue Mar 16, 2023 · 1 comment
Open

How to set CPU limit to 80% when it needs to activate? #1

ThunderModsYT opened this issue Mar 16, 2023 · 1 comment

Comments

@ThunderModsYT
Copy link

No description provided.

@ThunderModsYT
Copy link
Author

Fixed by change 10.00 to 80.00 and 9.00 to 79.00

cat > activate.sh << EOF
#!/bin/bash
loadavg=load.avg
cat /proc/loadavg | colrm 6 > $loadavg
grep -w "[0.00-10.00]" $loadavg > /dev/null
if [ $? -eq 0 ]
then
exit
else
bash /root/cf-auto-uam/uam.sh
fi
EOF
cat > deactivate.sh << EOF
#!/bin/bash
loadavg=load.avg
cat /proc/loadavg | colrm 6 > $loadavg
grep -w "[0.00-9.00]" $loadavg > /dev/null
if [ $? -eq 0 ]
then
bash /root/cf-auto-uam/high.sh
else
exit
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant