Search Results

Search: Posts Made By: mhannor
8,039
Posted By mhannor
Ok great. I will make sure to do ./cputest.sh in...
Ok great. I will make sure to do ./cputest.sh in the crontab. Also do you mind providing resources that could help me get better with shell scripting. I want to get better because I feel like I suck...
8,039
Posted By mhannor
Redhat Linux 7, and IT WORKS, that was the issue,...
Redhat Linux 7, and IT WORKS, that was the issue, why did that cause an error?

--- Post updated at 03:43 PM ---

Thanks so much, I been trying to figure this out for a week! I'm so grateful to...
8,039
Posted By mhannor
This is what I received when I did if [...
This is what I received when I did
if [ "${High_CPU%,*}" -gt 90 ]

[dbtlst@asdv-snsc-tlst ~]$ sh cputest.sh
+ top -b -n 1
+ head -8
+ sed -e 1,5d /tmp/cpu.lst
++ tail -1
++ cat...
8,039
Posted By mhannor
High_CPU is always a decimal from the top...
High_CPU is always a decimal from the top command. Does that help?

--- Post updated at 03:11 PM ---



This is the output from set -x

[dbtlst@asdv-snsc-tlst ~]$ sh cputest.sh
+ top -b -n 1...
8,039
Posted By mhannor
Hey @vgersh99, I copied and pasted your script to...
Hey @vgersh99, I copied and pasted your script to make sure I wasnt missing anything and I receive the same error:

cputest.sh: line 6: [: 70.0: integer expression expected
8,039
Posted By mhannor
When I remove the quotations, this is what I...
When I remove the quotations, this is what I receive:

cputest.sh: line 6: [: 30.0: integer expression expected
8,039
Posted By mhannor
Help with Shell script that monitors CPU Usage
I'm a newbie to shell scripting, I was given this script to modify. This script that monitors when CPU Usage is too high based off the top command. The comparison is not working as it should. Its...
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 11:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy