IO::Socket::Netlink::Taskstats - Object interface to Taskstats generic netlink protocol sockets
IO::Socket::Netlink::Taskstats
Taskstats
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.
$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
AF_NETLINK
Paul Evans <leonerd@leonerd.org.uk>
To install Socket::Netlink::Taskstats, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Socket::Netlink::Taskstats
CPAN shell
perl -MCPAN -e shell install Socket::Netlink::Taskstats
For more information on module installation, please visit the detailed CPAN module installation guide.