1Sys::Statistics::Linux:U:sSeorckCSotnattrsi(b3uptme)d PeSryls:D:oSctuamteinsttaitciso:n:Linux::SockStats(3pm)
2
3
4

NAME

6       Sys::Statistics::Linux::SockStats - Collect linux socket statistics.
7

SYNOPSIS

9           use Sys::Statistics::Linux::SockStats;
10
11           my $lxs  = Sys::Statistics::Linux::SockStats->new;
12           my $stat = $lxs->get;
13

DESCRIPTION

15       Sys::Statistics::Linux::SockStats gathers socket statistics from the
16       virtual /proc filesystem (procfs).
17
18       For more information read the documentation of the front-end module
19       Sys::Statistics::Linux.
20

SOCKET STATISTICS

22       Generated by /proc/net/sockstat.
23
24           used    -  Total number of used sockets.
25           tcp     -  Number of tcp sockets in use.
26           udp     -  Number of udp sockets in use.
27           raw     -  Number of raw sockets in use.
28           ipfrag  -  Number of ip fragments in use (only available by kernels > 2.2).
29

METHODS

31   new()
32       Call new() to create a new object.
33
34           my $lxs = Sys::Statistics::Linux::SockStats->new;
35
36       It's possible to set the path to the proc filesystem.
37
38            Sys::Statistics::Linux::SockStats->new(
39               files => {
40                   # This is the default
41                   path => '/proc',
42                   sockstat => 'net/sockstat',
43               }
44           );
45
46   get()
47       Call get() to get the statistics. get() returns the statistics as a
48       hash reference.
49
50           my $stat = $lxs->get;
51

EXPORTS

53       No exports.
54

SEE ALSO

56       proc(5)
57

REPORTING BUGS

59       Please report all bugs to <jschulz.cpan(at)bloonix.de>.
60

AUTHOR

62       Jonny Schulz <jschulz.cpan(at)bloonix.de>.
63
65       Copyright (c) 2006, 2007 by Jonny Schulz. All rights reserved.
66
67       This program is free software; you can redistribute it and/or modify it
68       under the same terms as Perl itself.
69
70
71
72perl v5.38.0                      2023-07S-y2s1::Statistics::Linux::SockStats(3pm)
Impressum