Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: jibsonline
9,353
Posted By jibsonline
I'm clear with that part now. I removed the...
I'm clear with that part now. I removed the decimal points using gawk itself and made it an integer. Now my problem is that i have a file called flag which would be having the values 1 or 0...
9,353
Posted By jibsonline
I have found a way to do it. I know this is not...
I have found a way to do it. I know this is not the right way. But it works!!!!

uptime|gawk -F" " '{ print $8 }'|gawk -F , '{ print $1 }'|gawk -F . '{ print $1 }'> load
while read Inbr
do
...
9,353
Posted By jibsonline
I am able to get the load average as u said. But...
I am able to get the load average as u said. But i am not able to compare to a number. When i give like

FirstNumber=`uptime | sed -e 's/.*average://' -e 's/ //g' | cut -d',' -f1`
echo...
9,353
Posted By jibsonline
Hi, I want to compare the value 0.07, the...
Hi,
I want to compare the value 0.07, the current load average

3:09pm up 31 day(s), 14:02, 7 users, load average: 0.07, 0.07, 0.08
9,353
Posted By jibsonline
I'm trying to do the check like this....... ...
I'm trying to do the check like this.......


uptime|gawk -F" " '{ print $8 }' > load
while read Inbr
do
echo $Inbr
if [ ${Inbr} -gt 77 ]; then
echo "Greater than 77"
else
...
10,451
Posted By jibsonline
I get an error running the script [: -gt:...
I get an error running the script

[: -gt: unary operator expected

Jibu
9,353
Posted By jibsonline
Sample
I get the load average like this

gawk '{ load=$1 }' /proc/loadavg

Now i need to check whether if its greater than 10 and if so stop my apache server.
9,353
Posted By jibsonline
Get value from file!!!!
Hi,
I'm trying to get the value of load average from the file /proc/loadavg to my script. I'm a bit new to scripting. I need to get the value as an integer type to do a checking. Can anyone help me...
10,451
Posted By jibsonline
Determening load average.
Hi,
I'm new to shell scripting. I need to make a script to add on to my cronjobs.


The script must get the value of load average from my server and if its greater than 10 it should stop my...
Showing results 1 to 9 of 9

 

Featured Tech Videos

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