rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | !#/usr/local/bin/perl
|
| 2 | my @tl;
|
| 3 |
|
| 4 | my $tl2;
|
| 5 | my $count=0;
|
| 6 |
|
| 7 | @tl= `qprocess xgconsole.exe`;
|
| 8 |
|
| 9 | foreach $tl2 (@tl)
|
| 10 | {
|
| 11 | if ( $tl2 =~ /xgconsole/i )
|
| 12 | {
|
| 13 | if ($count==0)
|
| 14 | {
|
| 15 | print"USERNAME SESSIONNAME ID PID IMAGE\n";
|
| 16 | }
|
| 17 | print "$tl2 \n";
|
| 18 | $count++;
|
| 19 |
|
| 20 | }
|
| 21 | }
|
| 22 |
|
| 23 |
|
| 24 | @tl= `qprocess buildconsole.exe`;
|
| 25 |
|
| 26 | $tl2="";
|
| 27 |
|
| 28 |
|
| 29 | foreach $tl2 (@tl)
|
| 30 | {
|
| 31 | if ( $tl2 =~ /buildconsole/i )
|
| 32 | {
|
| 33 | if ($count==0)
|
| 34 | {
|
| 35 | print"USERNAME SESSIONNAME ID PID IMAGE\n";
|
| 36 | }
|
| 37 | print "$tl2 \n";
|
| 38 | $count++;
|
| 39 |
|
| 40 | }
|
| 41 | }
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 | if ( $count==0)
|
| 47 | {
|
| 48 | print "\nIncredibuild running process NOT found.\n";
|
| 49 | } elsif ( $count==1)
|
| 50 | {
|
| 51 | print "\n $count Incredibuild running process found.\n";
|
| 52 | } elsif ( $count>1)
|
| 53 | {
|
| 54 | print "\n $count Incredibuild running processes found.\n";
|
| 55 | }
|