ibjobs_v0.pl
770 Bytes
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
!#/usr/local/bin/perl
my @tl;
my $tl2;
my $count=0;
@tl= `qprocess xgconsole.exe`;
foreach $tl2 (@tl)
{
if ( $tl2 =~ /xgconsole/i )
{
if ($count==0)
{
print"USERNAME SESSIONNAME ID PID IMAGE\n";
}
print "$tl2 \n";
$count++;
}
}
@tl= `qprocess buildconsole.exe`;
$tl2="";
foreach $tl2 (@tl)
{
if ( $tl2 =~ /buildconsole/i )
{
if ($count==0)
{
print"USERNAME SESSIONNAME ID PID IMAGE\n";
}
print "$tl2 \n";
$count++;
}
}
if ( $count==0)
{
print "\nIncredibuild running process NOT found.\n";
} elsif ( $count==1)
{
print "\n $count Incredibuild running process found.\n";
} elsif ( $count>1)
{
print "\n $count Incredibuild running processes found.\n";
}