Search Results

Search: Posts Made By: huyquocnguyen
21,548
Posted By huyquocnguyen
I found the valid script for me. Thank you very...
I found the valid script for me. Thank you very much for your help. :D
21,548
Posted By huyquocnguyen
The result still have error: root@ubuntu:~#...
The result still have error:

root@ubuntu:~# ./phan6.sh
88.5
./phan6.sh: line 5: [: 88.5: integer expression expected


Please check it for me.
Thank you very much.
21,548
Posted By huyquocnguyen
#!/bin/bash a=20 CPUIDLE=$(top -d 0.1 -n 2 |...
#!/bin/bash
a=20
CPUIDLE=$(top -d 0.1 -n 2 | grep '^Cpu(s):'| tail -1 |awk '{print $5}'|sed 's/%.*//')
echo $CPUIDLE
if [ $CPUIDLE -lt $a ]
then
exit 1
else
exit 0
fi



When I...
21,548
Posted By huyquocnguyen
How to get the information about cpu idle from top command?
I am using Ubuntu 9.04. I want to write a shell script to get the information about cpu idle from top command at the real time when i call it, compare cpu idle with 20 (20%), if cpu idle > 20 exit 1,...
Showing results 1 to 4 of 4

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