UPDD Linux Perl script ‘tbrenice’ for setting process
priorities
The priority can be changed to
that required by changing the two lines that each read.
`renice -5 @toks[0]`;
Script content
#!/usr/bin/perl
strict;
sleep(10);
{
my @res = ` ps ax | grep “tbupddwu” | grep –v grep`;
my $cnt = @res;
if($cnt == 1)
{
my $line = @res[0];
$line =~ s/^\s+//;
my @toks = split(/ /,$line) ;
print “setting priority for process “ . @toks[0] . “\n”;
`renice -5 @toks[0]`;
}
}
{
my @res = ` ps ax | grep “tblinuxmouse” | grep –v grep`;
my $cnt = @res;
if($cnt == 1)
{
my $line = @res[0];
$line =~ s/^\s+//;
my @toks = split(/ /,$line) ;
print “setting priority for process “ . @toks[0] . “\n”;
`renice -5 @toks[0]`;
}
}