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
GCHEM3D(1)						       gnome-chemistry-utils							GCHEM3D(1)

NAME
gchem3d - a small chemical viewer application SYNOPSIS
gchem3d [OPTION(S)...] [FILE...] DESCRIPTION
gchem3d is a small chemical viewer application, which can show several chemical file formats. OPTIONS
The following options are accepted: -b COLOR, --bgcolor=COLOR Use the given color as background color. COLOR can be one of "black" (default), "white", "#rrggbb" (don't forget to escape the "#" character in the shell). -d MODEL, --display3d=MODEL Choose how molecules are displayed. MODEL can be one of "BallnStick" (default), "SpaceFill". -?, --help Show application help options. --help-all, --help-* Print all or just a group of help options. These options are not documented here. Instead see gtk-options(7) and gnome-options(7). -v, --version Print gchem3d version information. SEE ALSO
gnome-options(7), gtk-options(7) AUTHORS
Jean Brefort <jean.brefort@normalesup.org> Program author. Daniel Leidert <daniel.leidert@wgdd.de> Manpage author. COPYRIGHT
Copyright (C) 2002-2007 Jean Brefort Copyright (C) 2004-2007 Daniel Leidert Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. gcu 0.12 $Date: 2009-03-19 10:53:47 +0100 (jeu. 19 mars 2009) $ GCHEM3D(1)
All times are GMT -4. The time now is 03:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy