Git Product home page Git Product logo

Comments (8)

tokuhirom avatar tokuhirom commented on May 20, 2024

Can you send me a data file to reproduce?

from msgpack-perl.

alexander-potemkin avatar alexander-potemkin commented on May 20, 2024

Sure, please, find it here: https://github.com/battleship-potemkin/test/blob/master/dump.cant_parse

Here is the command to reproduce:

perl test.pl dump.cant_parse

Please, let me know if any additional information required.

from msgpack-perl.

syohex avatar syohex commented on May 20, 2024

Is dump.cant_parse valid ?

% od -t x1 dump.cant_parse
0000000 87 a7 6f 73 5f 6e 61 6d 65 a5 4c 69 6e 75 78 aa
0000020 6f 73 5f 72 65 6c 65 61 73 65 ae 32 2e 36 2e 33
0000040 32 2d 33 34 31 2d 65 63 32 a9 68 6f 73 74 5f 6e
0000060 61 6d 65 ba 70 68 69 6c 6f 73 6f 70 68 65 72 2e
....

First data type is 0x87, this is fix map and it has 7 key & value pairs.
So Data::MessagePack unpack 7 keys and 7 values then it stops unpacking
and dies, because there are still not unpacking data remaining.
I think this behavior is not wrong.

You should use 'map 32' or 'map 16' for unpacking dump.cant_parse correctly.

from msgpack-perl.

alexander-potemkin avatar alexander-potemkin commented on May 20, 2024

I guess it should, first of all, because Python's bindings unpack it very well.

Regarding the elements - yes, we have (were packing) 7 keys and values there.

from msgpack-perl.

syohex avatar syohex commented on May 20, 2024

dump.cant_parse has multiple data structures.

They are following

Chunk from 0 to 145
{
  'host_address' => '10.128.101.100',
  'os_arch' => 'x86_64',
  'lib_arch' => '64',
  'os_name' => 'Linux',
  'uptime' => 20396890,
  'host_name' => 'philosopher.zoo.10bees.com',
  'os_release' => '2.6.32-341-ec2'
}

Chunk from 145 to 236
{
  'buffers' => 180372,
  'swap_total' => 0,
  'total' => 650456,
  'swap_used' => 0,
  'free' => 75108,
  'swap_free' => 0,
  'used' => 575348,
  'cached' => 254320
}

Chunk from 236 to 288
{
  'system' => 0,
  'idle' => 100,
  'nice' => 0,
  'irq' => 0,
  'sintr' => 0,
  'steal' => 0,
  'wait' => 0,
  'user' => 0
}

Chunk from 288 to 1917
{
  'cpudevours' => [
                    {
                      'uid' => 0,
                      'pid' => 19349,
                      'ppid' => 11884,
                      'cpu_usage' => 1,
                      'cmdline' => './proc_sysinfo-linux-x86_64',
                      'mem_usage' => 932,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 1,
                      'ppid' => 0,
                      'cpu_usage' => 0,
                      'cmdline' => '/sbin/init',
                      'mem_usage' => 1520,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 2,
                      'ppid' => 0,
                      'cpu_usage' => 0,
                      'cmdline' => 'kthreadd',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 3,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'migration/0',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 4,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'ksoftirqd/0',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 5,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'watchdog/0',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 6,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'events/0',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 7,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'cpuset',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 8,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'khelper',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 9,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'netns',
                      'mem_usage' => 0,
                      'username' => 'root'
                    }
                  ],
  'stopped' => 0,
  'zombies' => 0,
  'sleeping' => 66,
  'memdevours' => [
                    {
                      'uid' => 101,
                      'pid' => 408,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => 'rsyslogd',
                      'mem_usage' => 1260,
                      'username' => 'syslog'
                    },
                    {
                      'uid' => 1001,
                      'pid' => 11758,
                      'ppid' => 11689,
                      'cpu_usage' => 0,
                      'cmdline' => 'sshd: alexander@pts/0',
                      'mem_usage' => 1876,
                      'username' => 'alexander'
                    },
                    {
                      'uid' => 0,
                      'pid' => 11689,
                      'ppid' => 401,
                      'cpu_usage' => 0,
                      'cmdline' => 'sshd: alexander [priv]',
                      'mem_usage' => 3432,
                      'username' => 'root'
                    },
                    {
                      'uid' => 1006,
                      'pid' => 24114,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => '10bees-agent',
                      'mem_usage' => 10544,
                      'username' => '10bees'
                    },
                    {
                      'uid' => 0,
                      'pid' => 532,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => '/usr/sbin/console-kit-daemon',
                      'mem_usage' => 3924,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 401,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => '/usr/sbin/sshd',
                      'mem_usage' => 1660,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 11877,
                      'ppid' => 11759,
                      'cpu_usage' => 0,
                      'cmdline' => 'su',
                      'mem_usage' => 1784,
                      'username' => 'root'
                    },
                    {
                      'uid' => 107,
                      'pid' => 27770,
                      'ppid' => 27767,
                      'cpu_usage' => 0,
                      'cmdline' => 'qmgr',
                      'mem_usage' => 2384,
                      'username' => 'postfix'
                    },
                    {
                      'uid' => 107,
                      'pid' => 18667,
                      'ppid' => 27767,
                      'cpu_usage' => 0,
                      'cmdline' => 'pickup',
                      'mem_usage' => 2200,
                      'username' => 'postfix'
                    },
                    {
                      'uid' => 0,
                      'pid' => 27767,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => '/usr/lib/postfix/master',
                      'mem_usage' => 2292,
                      'username' => 'root'
                    }
                  ],
  'running' => 1,
  'total' => 67
}

Chunk from 1917 to 2004
{
  'mounts' => [
                {
                  'bsize' => 4096,
                  'bfree' => 5284724,
                  'filesystem' => '/dev/sda1',
                  'mounted_on' => '/',
                  'bused' => 2972228,
                  'btotal' => 8256952
                }
              ]
}

Chunk from 2004 to 4414
{
  'nics' => [
              {
                'recv' => 3059957,
                'name' => 'eth0',
                'sent' => 4838496,
                'ipv6_addr_count' => 1,
                'ipv4_addr_count' => 1,
                'ipv4_addrs' => [
                                  '10.128.101.100'
                                ],
                'ipv6_addrs' => [
                                  'fe80::1031:40ff:fe00:669a'
                                ]
              },
              {
                'recv' => 0,
                'name' => 'dummy0',
                'sent' => 0,
                'ipv6_addr_count' => 0,
                'ipv4_addr_count' => 1,
                'ipv4_addrs' => [
                                  '0.0.0.0'
                                ],
                'ipv6_addrs' => []
              },
              {
                'recv' => 0,
                'name' => 'ifb0',
                'sent' => 0,
                'ipv6_addr_count' => 0,
                'ipv4_addr_count' => 1,
                'ipv4_addrs' => [
                                  '0.0.0.0'
                                ],
                'ipv6_addrs' => []
              },
              {
                'recv' => 0,
                'name' => 'ifb1',
                'sent' => 0,
                'ipv6_addr_count' => 0,
                'ipv4_addr_count' => 1,
                'ipv4_addrs' => [
                                  '0.0.0.0'
                                ],
                'ipv6_addrs' => []
              }
            ]
}

Data::MessagePack::unpack can unpack 1 data structure,
So Data::MessagePack::unpack unpacks only first data(7 element map)
and finish unpacking and dies(because there are still not unpacking data remaining).

You should use Data::MessagePack::Stream such case.

Sample code is following

use strict;
use warnings;
use Data::MessagePack::Stream;
use Data::Dumper;

my $dump_file_name = shift or die "Usage: $0 message_packed_file";

my $dump_content = do {
    local $/;
    open my $fh, "<", $dump_file_name or die "Can't open $dump_file_name: $!";
    <$fh>;
};

my $unpacker = Data::MessagePack::Stream->new;
$unpacker->feed($dump_content);
local $Data::Dumper::Terse = 1;
while ($unpacker->next) {
    print Dumper($unpacker->data);
}

And I get following output same as above

% perl stream.pl dump.cant_parse
{
  'host_address' => '10.128.101.100',
  'os_arch' => 'x86_64',
  'lib_arch' => '64',
  'os_name' => 'Linux',
  'uptime' => 20396890,
  'host_name' => 'philosopher.zoo.10bees.com',
  'os_release' => '2.6.32-341-ec2'
}
{
  'buffers' => 180372,
  'swap_total' => 0,
  'total' => 650456,
  'swap_used' => 0,
  'free' => 75108,
  'swap_free' => 0,
  'used' => 575348,
  'cached' => 254320
}
{
  'system' => 0,
  'idle' => 100,
  'nice' => 0,
  'irq' => 0,
  'sintr' => 0,
  'steal' => 0,
  'wait' => 0,
  'user' => 0
}
{
  'cpudevours' => [
                    {
                      'uid' => 0,
                      'pid' => 19349,
                      'ppid' => 11884,
                      'cpu_usage' => 1,
                      'cmdline' => './proc_sysinfo-linux-x86_64',
                      'mem_usage' => 932,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 1,
                      'ppid' => 0,
                      'cpu_usage' => 0,
                      'cmdline' => '/sbin/init',
                      'mem_usage' => 1520,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 2,
                      'ppid' => 0,
                      'cpu_usage' => 0,
                      'cmdline' => 'kthreadd',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 3,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'migration/0',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 4,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'ksoftirqd/0',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 5,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'watchdog/0',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 6,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'events/0',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 7,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'cpuset',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 8,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'khelper',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 9,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'netns',
                      'mem_usage' => 0,
                      'username' => 'root'
                    }
                  ],
  'stopped' => 0,
  'zombies' => 0,
  'sleeping' => 66,
  'memdevours' => [
                    {
                      'uid' => 101,
                      'pid' => 408,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => 'rsyslogd',
                      'mem_usage' => 1260,
                      'username' => 'syslog'
                    },
                    {
                      'uid' => 1001,
                      'pid' => 11758,
                      'ppid' => 11689,
                      'cpu_usage' => 0,
                      'cmdline' => 'sshd: alexander@pts/0',
                      'mem_usage' => 1876,
                      'username' => 'alexander'
                    },
                    {
                      'uid' => 0,
                      'pid' => 11689,
                      'ppid' => 401,
                      'cpu_usage' => 0,
                      'cmdline' => 'sshd: alexander [priv]',
                      'mem_usage' => 3432,
                      'username' => 'root'
                    },
                    {
                      'uid' => 1006,
                      'pid' => 24114,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => '10bees-agent',
                      'mem_usage' => 10544,
                      'username' => '10bees'
                    },
                    {
                      'uid' => 0,
                      'pid' => 532,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => '/usr/sbin/console-kit-daemon',
                      'mem_usage' => 3924,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 401,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => '/usr/sbin/sshd',
                      'mem_usage' => 1660,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 11877,
                      'ppid' => 11759,
                      'cpu_usage' => 0,
                      'cmdline' => 'su',
                      'mem_usage' => 1784,
                      'username' => 'root'
                    },
                    {
                      'uid' => 107,
                      'pid' => 27770,
                      'ppid' => 27767,
                      'cpu_usage' => 0,
                      'cmdline' => 'qmgr',
                      'mem_usage' => 2384,
                      'username' => 'postfix'
                    },
                    {
                      'uid' => 107,
                      'pid' => 18667,
                      'ppid' => 27767,
                      'cpu_usage' => 0,
                      'cmdline' => 'pickup',
                      'mem_usage' => 2200,
                      'username' => 'postfix'
                    },
                    {
                      'uid' => 0,
                      'pid' => 27767,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => '/usr/lib/postfix/master',
                      'mem_usage' => 2292,
                      'username' => 'root'
                    }
                  ],
  'running' => 1,
  'total' => 67
}
{
  'mounts' => [
                {
                  'bsize' => 4096,
                  'bfree' => 5284724,
                  'filesystem' => '/dev/sda1',
                  'mounted_on' => '/',
                  'bused' => 2972228,
                  'btotal' => 8256952
                }
              ]
}
{
  'nics' => [
              {
                'recv' => 3059957,
                'name' => 'eth0',
                'sent' => 4838496,
                'ipv6_addr_count' => 1,
                'ipv4_addr_count' => 1,
                'ipv4_addrs' => [
                                  '10.128.101.100'
                                ],
                'ipv6_addrs' => [
                                  'fe80::1031:40ff:fe00:669a'
                                ]
              },
              {
                'recv' => 0,
                'name' => 'dummy0',
                'sent' => 0,
                'ipv6_addr_count' => 0,
                'ipv4_addr_count' => 1,
                'ipv4_addrs' => [
                                  '0.0.0.0'
                                ],
                'ipv6_addrs' => []
              },
              {
                'recv' => 0,
                'name' => 'ifb0',
                'sent' => 0,
                'ipv6_addr_count' => 0,
                'ipv4_addr_count' => 1,
                'ipv4_addrs' => [
                                  '0.0.0.0'
                                ],
                'ipv6_addrs' => []
              },
              {
                'recv' => 0,
                'name' => 'ifb1',
                'sent' => 0,
                'ipv6_addr_count' => 0,
                'ipv4_addr_count' => 1,
                'ipv4_addrs' => [
                                  '0.0.0.0'
                                ],
                'ipv6_addrs' => []
              }
            ]
}

from msgpack-perl.

alexander-potemkin avatar alexander-potemkin commented on May 20, 2024

Thanks. Any way for the streams to be unpacked by using Pure Perl solution? Or, at least, to verify the structure without using C library?

from msgpack-perl.

syohex avatar syohex commented on May 20, 2024

You can use Data::MessagePack::PP::Unpacker(Pure perl implementation of Data::MessagePack::Unpacker).
But author says "Data::MessagePack::Unpacker is deprecated, use Data::MessagePack::Stream instead".

Sample code is following.

use strict;
use warnings;
use Data::MessagePack;
use Data::Dumper;

my $dump_file_name = shift or die "Usage: $0 message_packed_file";

my $dump_content = do {
    local $/;
    open my $fh, "<", $dump_file_name or die "Can't open $dump_file_name: $!";
    <$fh>;
};

local $Data::Dumper::Terse = 1;
my $unpacker = Data::MessagePack::Unpacker->new;

my $limit = length $dump_content;
my $off = 0;
while (1) {
    $off = $unpacker->execute($dump_content, $off);
    print Dumper($unpacker->data);

    $unpacker->reset;
    last if $off >= $limit;
}

output is

% PERL_ONLY=1 perl pp_stream.pl dump.cant_parse
{
  'host_address' => '10.128.101.100',
  'os_arch' => 'x86_64',
  'lib_arch' => '64',
  'os_name' => 'Linux',
  'uptime' => 20396890,
  'host_name' => 'philosopher.zoo.10bees.com',
  'os_release' => '2.6.32-341-ec2'
}
{
  'buffers' => 180372,
  'swap_total' => 0,
  'total' => 650456,
  'swap_used' => 0,
  'free' => 75108,
  'swap_free' => 0,
  'used' => 575348,
  'cached' => 254320
}
{
  'system' => 0,
  'idle' => 100,
  'nice' => 0,
  'irq' => 0,
  'sintr' => 0,
  'steal' => 0,
  'wait' => 0,
  'user' => 0
}
{
  'cpudevours' => [
                    {
                      'uid' => 0,
                      'pid' => 19349,
                      'ppid' => 11884,
                      'cpu_usage' => 1,
                      'cmdline' => './proc_sysinfo-linux-x86_64',
                      'mem_usage' => 932,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 1,
                      'ppid' => 0,
                      'cpu_usage' => 0,
                      'cmdline' => '/sbin/init',
                      'mem_usage' => 1520,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 2,
                      'ppid' => 0,
                      'cpu_usage' => 0,
                      'cmdline' => 'kthreadd',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 3,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'migration/0',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 4,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'ksoftirqd/0',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 5,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'watchdog/0',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 6,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'events/0',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 7,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'cpuset',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 8,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'khelper',
                      'mem_usage' => 0,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 9,
                      'ppid' => 2,
                      'cpu_usage' => 0,
                      'cmdline' => 'netns',
                      'mem_usage' => 0,
                      'username' => 'root'
                    }
                  ],
  'stopped' => 0,
  'zombies' => 0,
  'sleeping' => 66,
  'memdevours' => [
                    {
                      'uid' => 101,
                      'pid' => 408,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => 'rsyslogd',
                      'mem_usage' => 1260,
                      'username' => 'syslog'
                    },
                    {
                      'uid' => 1001,
                      'pid' => 11758,
                      'ppid' => 11689,
                      'cpu_usage' => 0,
                      'cmdline' => 'sshd: alexander@pts/0',
                      'mem_usage' => 1876,
                      'username' => 'alexander'
                    },
                    {
                      'uid' => 0,
                      'pid' => 11689,
                      'ppid' => 401,
                      'cpu_usage' => 0,
                      'cmdline' => 'sshd: alexander [priv]',
                      'mem_usage' => 3432,
                      'username' => 'root'
                    },
                    {
                      'uid' => 1006,
                      'pid' => 24114,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => '10bees-agent',
                      'mem_usage' => 10544,
                      'username' => '10bees'
                    },
                    {
                      'uid' => 0,
                      'pid' => 532,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => '/usr/sbin/console-kit-daemon',
                      'mem_usage' => 3924,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 401,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => '/usr/sbin/sshd',
                      'mem_usage' => 1660,
                      'username' => 'root'
                    },
                    {
                      'uid' => 0,
                      'pid' => 11877,
                      'ppid' => 11759,
                      'cpu_usage' => 0,
                      'cmdline' => 'su',
                      'mem_usage' => 1784,
                      'username' => 'root'
                    },
                    {
                      'uid' => 107,
                      'pid' => 27770,
                      'ppid' => 27767,
                      'cpu_usage' => 0,
                      'cmdline' => 'qmgr',
                      'mem_usage' => 2384,
                      'username' => 'postfix'
                    },
                    {
                      'uid' => 107,
                      'pid' => 18667,
                      'ppid' => 27767,
                      'cpu_usage' => 0,
                      'cmdline' => 'pickup',
                      'mem_usage' => 2200,
                      'username' => 'postfix'
                    },
                    {
                      'uid' => 0,
                      'pid' => 27767,
                      'ppid' => 1,
                      'cpu_usage' => 0,
                      'cmdline' => '/usr/lib/postfix/master',
                      'mem_usage' => 2292,
                      'username' => 'root'
                    }
                  ],
  'running' => 1,
  'total' => 67
}
{
  'mounts' => [
                {
                  'bsize' => 4096,
                  'bfree' => 5284724,
                  'filesystem' => '/dev/sda1',
                  'mounted_on' => '/',
                  'bused' => 2972228,
                  'btotal' => 8256952
                }
              ]
}
{
  'nics' => [
              {
                'recv' => 3059957,
                'name' => 'eth0',
                'sent' => 4838496,
                'ipv6_addr_count' => 1,
                'ipv4_addr_count' => 1,
                'ipv4_addrs' => [
                                  '10.128.101.100'
                                ],
                'ipv6_addrs' => [
                                  'fe80::1031:40ff:fe00:669a'
                                ]
              },
              {
                'recv' => 0,
                'name' => 'dummy0',
                'sent' => 0,
                'ipv6_addr_count' => 0,
                'ipv4_addr_count' => 1,
                'ipv4_addrs' => [
                                  '0.0.0.0'
                                ],
                'ipv6_addrs' => []
              },
              {
                'recv' => 0,
                'name' => 'ifb0',
                'sent' => 0,
                'ipv6_addr_count' => 0,
                'ipv4_addr_count' => 1,
                'ipv4_addrs' => [
                                  '0.0.0.0'
                                ],
                'ipv6_addrs' => []
              },
              {
                'recv' => 0,
                'name' => 'ifb1',
                'sent' => 0,
                'ipv6_addr_count' => 0,
                'ipv4_addr_count' => 1,
                'ipv4_addrs' => [
                                  '0.0.0.0'
                                ],
                'ipv6_addrs' => []
              }
            ]
}

from msgpack-perl.

alexander-potemkin avatar alexander-potemkin commented on May 20, 2024

Lovely, it works now.

Hope the module will keep working as it's the only Pure Perl unpack implementation available.

Thanks syohex, tokuhirom for prompt reply, great help and scripts examples!

from msgpack-perl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.