Sponsored Content
Top Forums Shell Programming and Scripting Bash script affect load average Post 302819521 by capilla on Tuesday 11th of June 2013 04:56:15 AM
Old 06-11-2013
Finaly I change the script
Code:
#!/bin/bash HOSTS="198.19.1.174" COUNT=1 COUNT2=1 COUNT3=0 USER="****" PASS="****" #touch result$COUNT3.txt function bucle(){{
while [  $COUNT2 -lt 10 ];
do
# count=$(ping -c $COUNT $HOSTS | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }')
 # if [ $count -eq 0 ]; then
# 100% failed
ping -c 1 -t 10 $HOSTS  > /dev/null 2> /dev/null
 if [ $? -eq 0 ]; then
bucle
else
( echo open 198.19.253.49
sleep 2;
echo ${USER}
sleep 2;
echo ${PASS}
sleep 2;
echo "sh ip arp vrf OOB | i .129"
sleep 2;) |telnet
fi
done
}
bucle

This script doesn't up the load average, but the process kill with:
kernel: [2094147.207333] test_ping.sh[31552]: segfault at 7fffcc7f3f88 ip 48f62a sp 7fffcc7f3f70 error 6 in bash[400000+ba000]
It's possible the loop generate the error??
I continue investigating.........
I tried to change the loop (change the While for the command for)
for (( ; ; )) do with the same result Smilie
ontinue investigating.........
test_ping.sh[15343]: segfault at 7fff76f16fc8 ip 48f62a sp 7fff76f16fb0 error 6 in bash[400000+ba000]
Saludations

---------- Post updated at 03:56 AM ---------- Previous update was at 02:17 AM ----------

Hi!!
Finally I find the solution.
The problem is :
ping -c 1
This ping and the bucle provocate overload of the system, Changing to
ping -c 3 (or put a delay)
the problem has been solved
Thanks!!!!

Last edited by capilla; 06-11-2013 at 04:49 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

load average

we have an unix system which has load average normally about 20. but while i am running a particular unix batch which performs heavy operations on filesystem and database average load reduces to 15. how can we explain this situation? while running that batch idle cpu time is about %60-65... (0 Replies)
Discussion started by: gfhgfnhhn
0 Replies

2. UNIX for Dummies Questions & Answers

Load Average

Hello all, I have a question about load averages. I've read the man pages for the uptime and w command for two or three different flavors of Unix (Red Hat, Tru64, Solaris). All of them agree that in the output of the 2 aforementioned commands, you are given the load average for the box, but... (3 Replies)
Discussion started by: Heathe_Kyle
3 Replies

3. Shell Programming and Scripting

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 apache service. I cant find a way to get the value of load average in integer type to do the check. Any... (4 Replies)
Discussion started by: jibsonline
4 Replies

4. UNIX for Dummies Questions & Answers

top - Load average

Hello, Here is the output of top command. My understanding here is, the load average 0.03 in last 1 min, 0.02 is in last 5 min, 0.00 is in last 15 min. By seeing this load average, When can we say that, the system load averge is too high? When can we say that, load average is medium/low??... (8 Replies)
Discussion started by: govindts
8 Replies

5. Solaris

load average query.

Hi, i have installed solaris 10 on t-5120 sparc enterprise. I am little surprised to see load average of 2 or around on this OS. when checked with ps command following process is using highest CPU. looks like it is running for long time and does not want to stop, but I do not know... (5 Replies)
Discussion started by: upengan78
5 Replies

6. UNIX for Dummies Questions & Answers

Please Help me in my load average

Hello AlL,.. I want from experts to help me as my load average is increased and i dont know where is the problem !! this is my top result : root@a4s # top top - 11:30:38 up 40 min, 1 user, load average: 3.06, 2.49, 4.66 Mem: 8168788k total, 2889596k used, 5279192k free, 47792k... (3 Replies)
Discussion started by: black-code
3 Replies

7. Shell Programming and Scripting

30 Load average with fping script

Hi! I've make a script that gets a list of 200 Ip's and calls another script once per ip in a infinite loop with a pause of 10 seconds. So It calls over 200 times every 10 seconds the second script (that makes a fping). But this cause a load average of 30. I've been reading about this and I... (4 Replies)
Discussion started by: charlscross
4 Replies

8. UNIX for Dummies Questions & Answers

Help with load average?

how load average is calculated and what exactly is it difference between cpu% and load average (9 Replies)
Discussion started by: robo
9 Replies

9. HP-UX

Load average unit

Hi, On load average graph, unit is 100m, 200m, 300...800m. I don't understand what it means. Thx for helping (3 Replies)
Discussion started by: Michenux
3 Replies

10. Shell Programming and Scripting

Script to load daily average I/O stats from a .ksh file into Oracle db

Hi can anyone help me with a script to load output of the .ksh file into an Oracle database. I have attached sample output of the information that i need to load to the database (2 Replies)
Discussion started by: LucyYani
2 Replies
GRUB-RENDER-LABEL(1)                                               User Commands                                              GRUB-RENDER-LABEL(1)

NAME
grub-render-label - generate a .disk_label for Apple Macs. SYNOPSIS
grub-render-label [OPTION...] [OPTIONS] DESCRIPTION
Render Apple .disk_label. -b, --bgcolor=COLOR use COLOR for background -c, --color=COLOR use COLOR for text -f, --font=FILE use FILE as font (PF2). -i, --input=FILE read text from FILE. -o, --output=FILE set output filename. Default is STDOUT -t, --text=STRING set the label to render -v, --verbose print verbose messages. -?, --help give this help list --usage give a short usage message -V, --version print program version Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. REPORTING BUGS
Report bugs to <bug-grub@gnu.org>. SEE ALSO
The full documentation for grub-render-label is maintained as a Texinfo manual. If the info and grub-render-label programs are properly installed at your site, the command info grub-render-label should give you access to the complete manual. grub-render-label (GRUB) 2.02-2ubuntu8.3 July 2018 GRUB-RENDER-LABEL(1)
All times are GMT -4. The time now is 02:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy