
IO::Socket::Netlink::Taskstats - Object interface to Taskstats generic netlink protocol sockets

use IO::Socket::Netlink::Taskstats;
my $sock = IO::Socket::Netlink::Taskstats->new;
my $stats = $sock->get_process_info_by_pid( $$ );
printf "So far, %s has consumed %d usec in userland and %d in kernel\n",
$stats->{ac_comm},
$stats->{ac_utime},
$stats->{ac_stime};

This subclass of IO::Socket::Netlink::Generic implements the Taskstats generic netlink protocol. This protocol allows detailed statistics gathering of resource usage on a per-process basis, and notification of resources used by processes at the time they exit.
This module is currently a work-in-progress, and this documentation is fairly minimal. The reader is expected to be familiar with Taskstats, only a fairly minimal description of the Perl-level wrapping is given here.

Returns an information structure containing the statistics about the process with the given PID.
Register or deregister this socket to receive process exit notifications, for processes exiting on CPUs given by the $mask.

Provides the following netlink attributes

Taskstats generic netlink socket protocolAF_NETLINK domain sockets
Paul Evans <leonerd@leonerd.org.uk>