Sponsored Content
Full Discussion: Multiple loops for Load test
Top Forums Shell Programming and Scripting Multiple loops for Load test Post 302075024 by willdev on Monday 29th of May 2006 03:25:53 PM
Old 05-29-2006
Error Multiple loops for Load test

Hi All,

I am trying to write a bash script that will read a list of numbers from a file, then it needs to use netcat to create a socket connection and pass header/request. I need to limit it to 100 connections. So, after the first set of 100 are fineshed, I need to loop and do it again with the next set of 100 numbers. I als need to pass in the number into the request made by netcat.

This is to test a wap site.

I have an idea for the netcat portion:
#printf 'GET http://<URL> HTTP/1.0\nHost: <address: port>\nAccept: text/html, image/gif, image/jpeg, *; q=, */*; q=.2\nUser-Agent: Motorola V3\nCache-control: no-cache\nPragma: no-cache\nx-up-calling-line-id:<NUMBER>\nx-up-forwarded-for: 10.10.10.10\nx-up-subscriber-coi: COI1\n\n' | nc -w 10 <host> <port>

So, for example, the file with numbers as 10,000 5 digit numbers. I want to read the first 100 into the script, then make the netcat requests in parallel. Then repeat for next 100 numbers.

Any ideas would be greatly appreciated!

John
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Multiple for loops within a Menu?

I have program that I want to be able to use I guess you would call them functions.... to run muliple little programs or loops with one menu script. How would I do this. Here is some code I am using. Sorry about the formatting....it doesn't paste well. echo "*****************************... (3 Replies)
Discussion started by: darthur
3 Replies

2. Shell Programming and Scripting

bash scripting: using multiple 'for loops'??

Hey guys, I'm kinda a noob at scripting. I am trying to create a script that uses multiple for loops with the lsiutility to monitor disk health on a system. The script runs, but it will continually echo an infinite number of LogVolumes when there are only 2 per virtual disk on my server. It's... (2 Replies)
Discussion started by: tank126
2 Replies

3. UNIX for Advanced & Expert Users

Memory load test

is there a program out there that will put a memory load on my HP_ux 11.11 box. I need to stress mem/swap to setup memory thresholds for my monitoring software. I am using Nimbus to monitor memory and swap. glance is telling me that memory is never past 70 percent however nimbus will page out ... (1 Reply)
Discussion started by: myork
1 Replies

4. Shell Programming and Scripting

For loops with multiple variables

Hi script gurus. I have need to know how to use for loop with multiple variable. Basically lets take for example /etc/passwd file has following entries The above cat command will basically first greps the real users that have email addresses then converts ':' to '+' then using cut... (4 Replies)
Discussion started by: sparcguy
4 Replies

5. Shell Programming and Scripting

multiple while loops in expect script

Hi, I am trying to incorporate multiple while loops into an expect script written in ksh shell. This is on a Solaris 10 system. Here is the code: #!/bin/ksh EXPECT=/usr/local/bin/expect exp_internal i=1 h=0 while ]; do $EXPECT << DONE set stty_init raw ... (1 Reply)
Discussion started by: cic
1 Replies

6. Shell Programming and Scripting

help with multiple loops in shell script

Hi Guys- I'm trying to write a script which takes date as input (mm.yy.dd) and search in the current file. If pattern doesn't exist it will then look in a backup directory and so on. being a newb i'm unable to loop over to the backup directory. hoping for some ideas, i've highlighted the... (1 Reply)
Discussion started by: Irishboy24
1 Replies

7. UNIX for Dummies Questions & Answers

While Loops Multiple File

Guru, I try to make a loop of 2 files, Input File1.txt: 1 2 File2.txt: A B C A, B and C is a file name, inside A X Y Z Expected Output A.1 X (2 Replies)
Discussion started by: guns
2 Replies

8. Shell Programming and Scripting

Capture the data in Linux .While doing load test.

Hi All, I am trying to capture the data in linux .While doing load test. is there's any sample script please help me. Linux test4 2.6.18-308.8.1.el5 #1 SMP Fri May 4 16:43:02 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux Thanks, (5 Replies)
Discussion started by: sam1226
5 Replies

9. Shell Programming and Scripting

Help with multiple for loops

All, I have set up ssh trust between 3 machines. The aim is to connect from machine-A to B and C and clear the txt files in tmp on all 3 machines. And, I have 3 environments and each environment has 2 hosts. So I should be able to run this script on any environment. Here is the logic: I want... (5 Replies)
Discussion started by: pnara2
5 Replies

10. Shell Programming and Scripting

Ssh to multiple hosts and then run multiple for loops under remote session

Hello, I am trying to login to multiple servers and i have to run multiple loops to gather some details..Could you please help me out. I am specifically facing issues while running for loops. I have to run multiple for loops in else condition. but the below code is giving errors in for... (2 Replies)
Discussion started by: mohit_vardhani
2 Replies
IMAGEPALETTECOPY(3)							 1						       IMAGEPALETTECOPY(3)

imagepalettecopy - Copy the palette from one image to another

SYNOPSIS
void imagepalettecopy (resource $destination, resource $source) DESCRIPTION
imagepalettecopy(3) copies the palette from the $source image to the $destination image. PARAMETERS
o $destination - The destination image resource. o $source - The source image resource. RETURN VALUES
No value is returned. EXAMPLES
Example #1 imagepalettecopy(3) example <?php // Create two palette images $palette1 = imagecreate(100, 100); $palette2 = imagecreate(100, 100); // Allocate the background to be // green in the first palette image $green = imagecolorallocate($palette1, 0, 255, 0); // Copy the palette from image 1 to image 2 imagepalettecopy($palette2, $palette1); // Since the palette is now copied we can use the // green color allocated to image 1 without using // imagecolorallocate() twice imagefilledrectangle($palette2, 0, 0, 99, 99, $green); // Output image to the browser header('Content-type: image/png'); imagepng($palette2); imagedestroy($palette1); imagedestroy($palette2); ?> PHP Documentation Group IMAGEPALETTECOPY(3)
All times are GMT -4. The time now is 05:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy