linux 中perl如何查看共享内存使用情况(100分)

L

love751

Unregistered / Unconfirmed
GUEST, unregistred user!
一下为程序的初始化部分.
sub init
{
IPC::Shareable->clean_up_all;
my $glue = 'tbps_common_data';
my %options = (
create => 'yes',
exclusive => 0,
mode => 0644,
destroy => 'yes',
);
my %staff_hash;
tie %staff_hash, 'IPC::Shareable', $glue, { %options } or die "server: tie failed/n";
$staff_hash{'105010'} = 0;
$staff_hash{'105019'} = 0;
$staff_hash{'105018'} = 0;
$staff_hash{'105017'} = 0;
$staff_hash{'105016'} = 0;
}
我想在写一个脚本.来查看staff_hash的使用情况,该怎么做啊,请教高手指点迷经.
 
顶部