rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | !#/usr/local/bin/perl
|
| 2 | my @tl;
|
| 3 | @tl= `tasklist`;
|
| 4 | my $tl2;
|
| 5 | my $count=0;
|
| 6 |
|
| 7 | system "cls";
|
| 8 |
|
| 9 | foreach $tl2 (@tl)
|
| 10 | {
|
| 11 | if ( $tl2 =~ /xgconsole|buildconsole/i )
|
| 12 | {
|
| 13 | if ($count==0)
|
| 14 | {
|
| 15 | print "Image Name PID Session Name Session# Mem Usage\n";
|
| 16 | print "========================= ======== ================ =========== ============\n";
|
| 17 | }
|
| 18 | print "$tl2 \n";
|
| 19 | $count++;
|
| 20 | }
|
| 21 | }
|
| 22 |
|
| 23 | if ( $count==0)
|
| 24 | {
|
| 25 | print "Incredibuild running process NOT found.\n";
|
| 26 | } elsif ( $count==1)
|
| 27 | {
|
| 28 | print " $count Incredibuild running process found.\n";
|
| 29 | } elsif ( $count>1)
|
| 30 | {
|
| 31 | print " $count Incredibuild running processes found.\n";
|
| 32 | }
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|