File: socketStress

package info (click to toggle)
dpm-postgres 1.7.4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,788 kB
  • ctags: 10,782
  • sloc: ansic: 146,136; sh: 13,362; perl: 11,142; python: 5,529; cpp: 5,113; sql: 1,790; makefile: 955; fortran: 113
file content (41 lines) | stat: -rwxr-xr-x 1,012 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/perl -w

##########################################################################################
#
#  Socket-stressSuite
#
#  A Perl script to test the socket interface of DPM
#
#  Author: Gilbert Grosdidier, LAL (Universite Paris-Sud, Orsay)
#  Creation Date  : 3/11/2004
#  Migration :     27/12/2004
#  Last rev: 14/06/2005 (GG)
#
##########################################################################################

###
### Copyright (C) 2004-2005 by CERN/IT/GD/CT & CNRS/IN2P3/LAL
### All rights reserved
###

# $Id: socketStress,v 1.2 2005/06/14 13:38:06 grodid Exp $
# Usage: socketStress lxgate22 50 2100 [domain]

use strict;

my $mach = shift;
my $many = shift;
my $label = shift;
my $domain = shift || "cern.ch";
$label--;

my $command = "time socketSuite ${mach}.${domain} grodid > /tmp/suite-SLC3-${mach}-sec.lis";

foreach my $cn ( 1 .. $many ) {
    my $lab = $label + $cn;
    my $cm = "nohup $command$lab 2>&1 &";
    print "CM: >> $cm << \n";
    system ("$cm");
}

exit 0;