hsinclai has asked for the wisdom of the Perl Monks concerning the following question:
$VAR1 = { 'hosts' => { '127.0.0.1:11211' => { 'misc' => { 'bytes' => ' +132677792', 'curr_connec +tions' => '1', 'connection_ +structures' => '3', 'pointer_siz +e' => '64', 'time' => '1 +196796974', 'total_items +' => '1900000', 'cmd_set' => + '1900000', 'bytes_writt +en' => '66197744', 'evictions' +=> '0', 'curr_items' + => '1900000', 'pid' => '18 +968', 'limit_maxby +tes' => '318767104', 'uptime' => +'1625', 'rusage_user +' => '13.501947', 'cmd_get' => + '1900000', 'rusage_syst +em' => '20.188930', 'version' => + '1.2.2', 'get_hits' = +> '1900000', 'bytes_read' + => '65067000', 'threads' => + '1', 'total_conne +ctions' => '41', 'get_misses' + => '0' }, 'sizes' => { '64' => '99 +9', '96' => '18 +99001' }, 'malloc' => { 'total_fre +e' => '6438240', 'releasabl +e_space' => '6425520', 'free_chun +ks' => '7', 'fastbin_b +locks' => '0', 'arena_siz +e' => '156471296', 'total_all +oc' => '150033056', 'max_total +_alloc' => '0', 'mmapped_r +egions' => '36', 'mmapped_s +pace' => '57696256', 'fastbin_s +pace' => '0' } } }, 'self' => {}, 'total' => { 'malloc_releasable_space' => 6425520, 'bytes' => 132677792, 'connection_structures' => 3, 'total_items' => 1900000, 'malloc_mmapped_regions' => 36, 'malloc_free_chunks' => 7, 'malloc_total_alloc' => 150033056, 'cmd_set' => 1900000, 'bytes_written' => 66197744, 'malloc_fastbin_blocks' => 0, 'curr_items' => 1900000, 'malloc_max_total_alloc' => 0, 'malloc_arena_size' => 156471296, 'malloc_mmapped_space' => 57696256, 'cmd_get' => 1900000, 'malloc_fastbin_space' => 0, 'get_hits' => 1900000, 'bytes_read' => 65067000, 'total_connections' => 41, 'malloc_total_free' => 6438240, 'get_misses' => 0 } };
... which at least yeilds some data:my $hashref1 = $memd->stats(); while ( my ($k,$v) = each %$hashref1 ) { print $k . ' --> ' . $v . $/; while ( my ($KK,$VV) = each %$v ) { print $KK . ' --> ' . $VV . $/; } }
hosts -> HASH(0x30129a0) 127.0.0.1:11211 --> HASH(0x1b71da50) malloc_releasable_space --> 6425520 bytes --> 132677792 connection_structures --> 3 total_items --> 1900000 malloc_mmapped_regions --> 36 malloc_free_chunks --> 7 malloc_total_alloc --> 150033056 cmd_set --> 1900000 bytes_written --> 66210882 malloc_fastbin_blocks --> 0 curr_items --> 1900000 malloc_max_total_alloc --> 0 malloc_arena_size --> 156471296 malloc_mmapped_space --> 57696256 cmd_get --> 1900000 malloc_fastbin_space --> 0 get_hits --> 1900000 bytes_read --> 65067290 total_connections --> 66 malloc_total_free --> 6438240 get_misses --> 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dereferencing a Hash of Hashes of Hashes?
by CountZero (Bishop) on Dec 04, 2007 at 21:13 UTC | |
|
Re: Dereferencing a Hash of Hashes of Hashes?
by pKai (Priest) on Dec 04, 2007 at 21:06 UTC |