$processor = `/aa/bin/get_bind_cpus.ksh`
####
my $mgr = shift;
my $processor = shift;
my $proc_id = locate_process_id( $mgr );
foreach ( keys %{$proc_id} )
{
next unless defined $$proc_id{$_};
system("$os_command_table{$^O}{pbind} -b $$processor $$proc_id{$_} >/dev/null 2>&1")
if defined $$processor;
}
}
}
####
sub get_cpu_used_by_other_proc
{
my $other_mgr = shift;
my $proc_id = locate_process_id( $other_mgr );
my $processor = undef;
my $pid = undef;
my @cmd_output = `$os_command_table{$^O}{pbind} -q 2>/dev/null`;
die "ERROR:failed to retrieve the bound processors\n" unless ( $? == 0 );
##### increase the weight of processors based on used or not #####
foreach ( keys %{$proc_id} )
{
$pid = $$proc_id{$_};
next unless defined $pid;
foreach ( @cmd_output )
{
$processor = $1, return \$processor if /process\s+id\s+${pid}\s*:\s*(\d+)$/;
}
}
}
####
$processor = `/aa/bin/get_bind_cpus.ksh`
####
system("$os_command_table{$^O}{pbind} -b $$processor $
$proc_id{$_} >/dev/null 2>&1")