From: František Dvořák Date: Wed, 13 Jun 2007 16:14:02 +0000 (+0000) Subject: Move server names to the one place (pch.pm). X-Git-Tag: glite-yaim-lb_R_3_1_1-1~8 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=3649fa3f62e7b410423d220c2896ea47415880da;p=jra1mw.git Move server names to the one place (pch.pm). Added some arguments. --- diff --git a/org.glite.jp.index/examples/pch06/pch.pm b/org.glite.jp.index/examples/pch06/pch.pm index cfd17aa..6f33f17 100644 --- a/org.glite.jp.index/examples/pch06/pch.pm +++ b/org.glite.jp.index/examples/pch06/pch.pm @@ -12,6 +12,9 @@ use warnings; use XML::Twig; use Data::Dumper; +our $ps='https://skurut1,cesnet.cz:8901'; +our $is='https://scientific.civ.zcu.cz:8904'; + our $lbattr='http://egee.cesnet.cz/en/Schema/LB/Attributes'; our $jpsys='http://egee.cesnet.cz/en/Schema/JP/System'; our $jpwf='http://egee.cesnet.cz/en/Schema/JP/Workflow'; diff --git a/org.glite.jp.index/examples/pch06/query1.pl b/org.glite.jp.index/examples/pch06/query1.pl index 9b155b1..03cce44 100644 --- a/org.glite.jp.index/examples/pch06/query1.pl +++ b/org.glite.jp.index/examples/pch06/query1.pl @@ -15,8 +15,8 @@ use strict; use pch; use Data::Dumper; -my $ps='https://skurut1.cesnet.cz:8901'; -my $is='https://skurut1.cesnet.cz:8902'; +my $ps=$pch::ps; +my $is=$pch::is; my @according_jobs = (); # sequencially jobid list my %according_jobs = (); # hash jobid list diff --git a/org.glite.jp.index/examples/pch06/query2.pl b/org.glite.jp.index/examples/pch06/query2.pl index e189b59..c6d8527 100644 --- a/org.glite.jp.index/examples/pch06/query2.pl +++ b/org.glite.jp.index/examples/pch06/query2.pl @@ -14,8 +14,8 @@ use strict; use pch; use Data::Dumper; -my $ps='https://skurut1.cesnet.cz:8901'; -my $is='https://skurut1.cesnet.cz:8902'; +my $ps=$pch:ps; +my $is=$pch:is; my $program_name = "softmean"; my @according_jobs = (); # sequencially jobid list @@ -24,11 +24,12 @@ my $according_count = 0; my $output; -if ($#ARGV + 1 != 1) { - print STDERR "Usage: $0 OUTPUT_FILE\n"; +if ($#ARGV + 1 < 1) { + print STDERR "Usage: $0 OUTPUT_FILE [PROGRAM]\n"; exit 1 } $output = $ARGV[0]; +if ($#ARGV + 1 > 1) { $program_name = $ARGV[1]; } # debug calls $pch::debug = 0; diff --git a/org.glite.jp.index/examples/pch06/query3.pl b/org.glite.jp.index/examples/pch06/query3.pl index 7182679..9cb5b4a 100644 --- a/org.glite.jp.index/examples/pch06/query3.pl +++ b/org.glite.jp.index/examples/pch06/query3.pl @@ -13,8 +13,8 @@ use strict; use pch; use Data::Dumper; -my $ps='https://skurut1.cesnet.cz:8901'; -my $is='https://skurut1.cesnet.cz:8902'; +my $ps=$pch::ps; +my $is=$pch::is; my @attributes = ("$pch::jpsys:jobId", "$pch::jpwf:ancestor", @pch::view_attributes); my @according_jobs = (); # sequencially jobid list @@ -95,7 +95,8 @@ foreach my $jobid (sort { $according_jobs{$b}{attributes}{"$pch::jplbtag:IPAW_ST my %attributes = %{$job{attributes}}; my $stage = $attributes{"$pch::jplbtag:IPAW_STAGE"}{value}[0]; - if ( $stage == 3 || $stage == 4 || $stage == 5) { +# if ( $stage == 3 || $stage == 4 || $stage == 5) { + if ( $stage == 2 || $stage == 3) { print "jobid $jobid:\n"; # query & output all desired atributes diff --git a/org.glite.jp.index/examples/pch06/query4.pl b/org.glite.jp.index/examples/pch06/query4.pl index 467c2fd..82d9759 100644 --- a/org.glite.jp.index/examples/pch06/query4.pl +++ b/org.glite.jp.index/examples/pch06/query4.pl @@ -15,8 +15,8 @@ use strict; use pch; use Data::Dumper; -my $ps='https://skurut1.cesnet.cz:8901'; -my $is='https://skurut1.cesnet.cz:8902'; +my $ps=$pch::ps; +my $is=$pch::is; my $program_name='align_warp'; my $program_params='-m 12'; my $runday=1; @@ -31,6 +31,8 @@ my $according_count = 0; $pch::debug = 0; my $debug = 0; +if ($#ARGV + 1 > 1) { $program_name=$ARGV[0]; } + # # find out processes with given name ant parameters # diff --git a/org.glite.jp.index/examples/pch06/query5.pl b/org.glite.jp.index/examples/pch06/query5.pl index c9f05b7..3f700a5 100644 --- a/org.glite.jp.index/examples/pch06/query5.pl +++ b/org.glite.jp.index/examples/pch06/query5.pl @@ -15,8 +15,8 @@ use strict; use pch; use Data::Dumper; -my $ps='https://skurut1.cesnet.cz:8901'; -my $is='https://skurut1.cesnet.cz:8902'; +my $ps=$pch::ps; +my $is=$pch::is; my $program_name='align_warp'; my $end_program_name='convert'; my $header="GLOBAL_MAXIMUM=4095"; # test for exact equal (scripts already prepared it) @@ -30,6 +30,9 @@ my $according_count = 0; $pch::debug = 0; my $debug = 0; +if ($#ARGV + 1 >= 1) { $program_name = $ARGV[0]; } +if ($#ARGV + 1 >= 2) { $end_program_name = $ARGV[1]; } + # # find out processes with given name and parameters # diff --git a/org.glite.jp.index/examples/pch06/query6.pl b/org.glite.jp.index/examples/pch06/query6.pl index 21521e8..8c1d851 100644 --- a/org.glite.jp.index/examples/pch06/query6.pl +++ b/org.glite.jp.index/examples/pch06/query6.pl @@ -17,8 +17,8 @@ use strict; use pch; use Data::Dumper; -my $ps='https://skurut1.cesnet.cz:8901'; -my $is='https://skurut1.cesnet.cz:8902'; +my $ps=$pch::ps; +my $is=$pch::is; my $program_name='align_warp'; my $program_param='-m 12'; my $end_program_name='softmean'; @@ -35,6 +35,9 @@ my $workflow_count = 0; $pch::debug = 0; my $debug = 0; +if ($#ARGV + 1 >= 1) { $program_name = $ARGV[0]; } +if ($#ARGV + 1 >= 2) { $end_program_name = $ARGV[1]; } + # # find out processes with given name and parameters #