IO::Socket::Netlink::Taskstats - Object interface to Taskstats generic netlink protocol sockets
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",
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
pid => INT
tgid => INT
stats => HASH
aggr_pid => HASH
aggr_tgid => HASH
Socket::Netlink::Taskstats - interface to Linux's Taskstats generic netlink socket protocol
IO::Socket::Netlink - Object interface to AF_NETLINK domain sockets
Paul Evans <firstname.lastname@example.org>
To install Socket::Netlink::Taskstats, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.