PageRenderTime 27ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/Unix-Statgrab-0.04/lib/Unix/Statgrab.pm

#
Perl | 747 lines | 605 code | 122 blank | 20 comment | 16 complexity | 80c76ff79afaa6f15af9c3a401370e9c MD5 | raw file
  1. package Unix::Statgrab;
  2. use 5.00503;
  3. use strict;
  4. use Carp;
  5. require Exporter;
  6. require DynaLoader;
  7. use AutoLoader;
  8. use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD);
  9. @ISA = qw(Exporter
  10. DynaLoader);
  11. # Items to export into callers namespace by default. Note: do not export
  12. # names by default without a very good reason. Use EXPORT_OK instead.
  13. # Do not simply export all your public functions/methods/constants.
  14. # This allows declaration use Unix::Statgrab ':all';
  15. # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
  16. # will save memory.
  17. %EXPORT_TAGS = ( 'all' => [ qw(
  18. get_error drop_privileges
  19. get_host_info
  20. get_cpu_stats get_cpu_stats_diff get_cpu_percents
  21. get_disk_io_stats get_disk_io_stats_diff
  22. get_fs_stats
  23. get_load_stats
  24. get_mem_stats
  25. get_swap_stats
  26. get_network_io_stats get_network_io_stats_diff
  27. get_network_iface_stats
  28. get_page_stats get_page_stats_diff
  29. get_user_stats
  30. get_process_stats
  31. sort_procs_by_name
  32. sort_procs_by_pid
  33. sort_procs_by_uid
  34. sort_procs_by_gid
  35. sort_procs_by_size
  36. sort_procs_by_res
  37. sort_procs_by_cpu
  38. sort_procs_by_time
  39. SG_ERROR_ASPRINTF
  40. SG_ERROR_DEVSTAT_GETDEVS
  41. SG_ERROR_DEVSTAT_SELECTDEVS
  42. SG_ERROR_ENOENT
  43. SG_ERROR_GETIFADDRS
  44. SG_ERROR_GETMNTINFO
  45. SG_ERROR_GETPAGESIZE
  46. SG_ERROR_KSTAT_DATA_LOOKUP
  47. SG_ERROR_KSTAT_LOOKUP
  48. SG_ERROR_KSTAT_OPEN
  49. SG_ERROR_KSTAT_READ
  50. SG_ERROR_KVM_GETSWAPINFO
  51. SG_ERROR_KVM_OPENFILES
  52. SG_ERROR_MALLOC
  53. SG_ERROR_NONE
  54. SG_ERROR_OPEN
  55. SG_ERROR_OPENDIR
  56. SG_ERROR_PARSE
  57. SG_ERROR_SETEGID
  58. SG_ERROR_SETEUID
  59. SG_ERROR_SETMNTENT
  60. SG_ERROR_SOCKET
  61. SG_ERROR_SWAPCTL
  62. SG_ERROR_SYSCONF
  63. SG_ERROR_SYSCTL
  64. SG_ERROR_SYSCTLBYNAME
  65. SG_ERROR_SYSCTLNAMETOMIB
  66. SG_ERROR_UNAME
  67. SG_ERROR_UNSUPPORTED
  68. SG_ERROR_XSW_VER_MISMATCH
  69. SG_IFACE_DUPLEX_FULL
  70. SG_IFACE_DUPLEX_HALF
  71. SG_IFACE_DUPLEX_UNKNOWN
  72. SG_PROCESS_STATE_RUNNING
  73. SG_PROCESS_STATE_SLEEPING
  74. SG_PROCESS_STATE_STOPPED
  75. SG_PROCESS_STATE_UNKNOWN
  76. SG_PROCESS_STATE_ZOMBIE
  77. ) ] );
  78. @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
  79. @EXPORT = qw(
  80. get_error drop_privileges
  81. get_host_info
  82. get_cpu_stats get_cpu_stats_diff get_cpu_percents
  83. get_disk_io_stats get_disk_io_stats_diff
  84. get_fs_stats
  85. get_load_stats
  86. get_mem_stats
  87. get_swap_stats
  88. get_network_io_stats get_network_io_stats_diff
  89. get_network_iface_stats
  90. get_page_stats get_page_stats_diff
  91. get_user_stats
  92. get_process_stats
  93. sort_procs_by_name
  94. sort_procs_by_pid
  95. sort_procs_by_uid
  96. sort_procs_by_gid
  97. sort_procs_by_size
  98. sort_procs_by_res
  99. sort_procs_by_cpu
  100. sort_procs_by_time
  101. SG_ERROR_ASPRINTF
  102. SG_ERROR_DEVSTAT_GETDEVS
  103. SG_ERROR_DEVSTAT_SELECTDEVS
  104. SG_ERROR_ENOENT
  105. SG_ERROR_GETIFADDRS
  106. SG_ERROR_GETMNTINFO
  107. SG_ERROR_GETPAGESIZE
  108. SG_ERROR_KSTAT_DATA_LOOKUP
  109. SG_ERROR_KSTAT_LOOKUP
  110. SG_ERROR_KSTAT_OPEN
  111. SG_ERROR_KSTAT_READ
  112. SG_ERROR_KVM_GETSWAPINFO
  113. SG_ERROR_KVM_OPENFILES
  114. SG_ERROR_MALLOC
  115. SG_ERROR_NONE
  116. SG_ERROR_OPEN
  117. SG_ERROR_OPENDIR
  118. SG_ERROR_PARSE
  119. SG_ERROR_SETEGID
  120. SG_ERROR_SETEUID
  121. SG_ERROR_SETMNTENT
  122. SG_ERROR_SOCKET
  123. SG_ERROR_SWAPCTL
  124. SG_ERROR_SYSCONF
  125. SG_ERROR_SYSCTL
  126. SG_ERROR_SYSCTLBYNAME
  127. SG_ERROR_SYSCTLNAMETOMIB
  128. SG_ERROR_UNAME
  129. SG_ERROR_UNSUPPORTED
  130. SG_ERROR_XSW_VER_MISMATCH
  131. SG_IFACE_DUPLEX_FULL
  132. SG_IFACE_DUPLEX_HALF
  133. SG_IFACE_DUPLEX_UNKNOWN
  134. SG_PROCESS_STATE_RUNNING
  135. SG_PROCESS_STATE_SLEEPING
  136. SG_PROCESS_STATE_STOPPED
  137. SG_PROCESS_STATE_UNKNOWN
  138. SG_PROCESS_STATE_ZOMBIE
  139. );
  140. $VERSION = '0.04';
  141. if ($] >= 5.006) {
  142. *sort_procs_by_name = \&_sort_procs_by_name;
  143. *sort_procs_by_pid = \&_sort_procs_by_pid;
  144. *sort_procs_by_uid = \&_sort_procs_by_uid;
  145. *sort_procs_by_gid = \&_sort_procs_by_gid;
  146. *sort_procs_by_size = \&_sort_procs_by_size;
  147. *sort_procs_by_res = \&_sort_procs_by_res;
  148. *sort_procs_by_cpu = \&_sort_procs_by_cpu;
  149. *sort_procs_by_time = \&_sort_procs_by_time;
  150. } else {
  151. no strict 'refs';
  152. my $pkg = caller;
  153. # older perls don't yet know about prototyped sort routines
  154. *sort_procs_by_name = sub { _sort_procs_by_name(${"${pkg}::a"}, ${"${pkg}::b"}) };
  155. *sort_procs_by_pid = sub { _sort_procs_by_pid (${"${pkg}::a"}, ${"${pkg}::b"}) };
  156. *sort_procs_by_uid = sub { _sort_procs_by_uid (${"${pkg}::a"}, ${"${pkg}::b"}) };
  157. *sort_procs_by_gid = sub { _sort_procs_by_gid (${"${pkg}::a"}, ${"${pkg}::b"}) };
  158. *sort_procs_by_size = sub { _sort_procs_by_size(${"${pkg}::a"}, ${"${pkg}::b"}) };
  159. *sort_procs_by_res = sub { _sort_procs_by_res (${"${pkg}::a"}, ${"${pkg}::b"}) };
  160. *sort_procs_by_cpu = sub { _sort_procs_by_cpu (${"${pkg}::a"}, ${"${pkg}::b"}) };
  161. *sort_procs_by_time = sub { _sort_procs_by_time(${"${pkg}::a"}, ${"${pkg}::b"}) };
  162. }
  163. sub AUTOLOAD {
  164. # This AUTOLOAD is used to 'autoload' constants from the constant()
  165. # XS function.
  166. my $constname;
  167. ($constname = $AUTOLOAD) =~ s/.*:://;
  168. croak "&Unix::Statgrab::constant not defined" if $constname eq 'constant';
  169. my ($error, $val) = constant($constname);
  170. if ($error) { croak $error; }
  171. {
  172. no strict 'refs';
  173. # Fixed between 5.005_53 and 5.005_61
  174. #XXX if ($] >= 5.00561) {
  175. #XXX *$AUTOLOAD = sub () { $val };
  176. #XXX }
  177. #XXX else {
  178. *$AUTOLOAD = sub { $val };
  179. #XXX }
  180. }
  181. goto &$AUTOLOAD;
  182. }
  183. bootstrap Unix::Statgrab $VERSION;
  184. # Preloaded methods go here.
  185. # Autoload methods go after =cut, and are processed by the autosplit program.
  186. 1;
  187. __END__
  188. # Below is stub documentation for your module. You'd better edit it!
  189. =head1 NAME
  190. Unix::Statgrab - Perl extension for collecting information about the machine
  191. =head1 SYNOPSIS
  192. use Unix::Statgrab;
  193. local $, = "\n";
  194. my $host = get_host_info or
  195. die get_error;
  196. print $host->os_name,
  197. $host->os_release,
  198. $host->os_version,
  199. ...;
  200. my $disks = get_disk_io_stats or
  201. die get_error;
  202. for (0 .. $disks->num_disks - 1) {
  203. print $disks->disk_name($_),
  204. $disks->read_bytes($_),
  205. ...;
  206. }
  207. =head1 DESCRIPTION
  208. Unix::Statgrab is a wrapper for libstatgrab as available from L<http://www.i-scream.org/libstatgrab/>. It is a reasonably portable attempt to query interesting stats about your computer. It covers information on the operating system, CPU, memory usage, network interfaces, hard-disks etc.
  209. Each of the provided functions follow a simple rule: It never takes any argument and returns either an object (in case of success) or C<undef>. In case C<undef> was returned, check the return value of C<get_error>. Also see L<"ERROR HANDLING"> further below.
  210. =head1 FUNCTIONS
  211. =head2 drop_privileges()
  212. Unix::Statgrab can be told to discard I<setuid> and I<setgid> privileges which is usually a good thing. If your program
  213. doesn't need the elevated privileges somewhere else, call it right after C<use>ing the module.
  214. =head2 get_host_info()
  215. Returns generic information about this machine. The object it returns supports the following methods:
  216. =over 4
  217. =item * B<os_name>
  218. =item * B<os_release>
  219. =item * B<os_version>
  220. =item * B<platform>
  221. =item * B<hostname>
  222. =item * B<uptime>
  223. =back
  224. =head2 get_cpu_stats
  225. Returns information about this machine's usage of the CPU. The object it returns supports the following methods, all of which return the number of ticks the processor has spent in the respective states:
  226. =over 4
  227. =item * B<user>
  228. =item * B<kernel>
  229. =item * B<idle>
  230. =item * B<iowait>
  231. =item * B<swap>
  232. =item * B<nice>
  233. =item * B<total>
  234. =item * B<systime>
  235. The system time in seconds.
  236. =back
  237. =head2 get_cpu_stats_diff
  238. Returns the differences in ticks for each of the states since last time C<get_cpu_stats> or C<get_cpu_stats_diff> was called.
  239. If C<cpu_get_stats_diff> is called for the first time (and C<get_cpu_stats> wasn't called before) its return values will be the same as C<get_cpu_stats>.
  240. Its return value supports the same methods as C<get_cpu_stats>. C<systime> then will be the seconds since the last call of this function.
  241. =head2 get_cpu_percents
  242. Calls C<get_cpu_stats_diff> under the hood but instead of returning ticks, it returns percentages. Its return value provides the same methods as C<get_cpu_stats> and C<get_cpu_stats_diff>.
  243. =head2 get_disk_io_stats
  244. Returns the disk IO per disk stored in the kernel which holds the amount of data transferred since bootup. Unlike most other methods presented in this manpage, the methods you can call on its return value take an additional optional parameter which specifies which disk you want information about. If you do not provide this parameter, 0 (= first disk) is assumed.
  245. =over 4
  246. =item * B<num_disks>
  247. The number of disks that were found on this machine.
  248. =item * B<disk_name($disk)>
  249. =item * B<read_bytes($disk)>
  250. =item * B<write_bytes($disk)>
  251. =item * B<systime($disk)>
  252. The system time in seconds over which C<read_bytes> and C<write_bytes> were transferred.
  253. =back
  254. =head2 get_disk_io_stats_diff
  255. The same as C<get_disk_io_stats> except that it will report the difference to the last call of either C<get_disk_io_stats> or C<get_disk_io_stats_diff>. Provides the same methods as C<get_disk_io_stats>.
  256. =head2 get_fs_stats
  257. Returns statistics about the mounted filesystems, including free space and inode usage. The provided methods again take one optional argument which specifies which partition you want information about. If you do not provide this parameter, 0 (= first mounted filesystem) is assumed:
  258. =over 4
  259. =item * B<num_fs>
  260. The number of mounted filesystems that were found on this machine.
  261. =item * B<device_name($fs)>
  262. =item * B<fs_type($fs)>
  263. =item * B<mnt_point($fs)>
  264. =item * B<size($fs)>
  265. Size in bytes.
  266. =item * B<used($fs)>
  267. =item * B<avail($fs)>
  268. =item * B<total_inodes($fs)>
  269. =item * B<used_inodes($fs)>
  270. =item * B<free_inodes($fs)>
  271. =item * B<avail_inodes($fs)>
  272. =item * B<io_size($fs)>
  273. The recommended size in bytes when doing I/O operations on this device.
  274. =item * B<block_size($fs)>
  275. =item * B<total_blocks($fs)>
  276. =item * B<free_blocks($fs)>
  277. =item * B<used_blocks($fs)>
  278. =item * B<avail_blocks($fs)>
  279. =back
  280. =head2 get_load_stats()
  281. Returns the load average over various span of times. The following methods are provided:
  282. =over 4
  283. =item * B<min1>
  284. Load average over 1 minute.
  285. =item * B<min5>
  286. =item * B<min15>
  287. =back
  288. =head2 get_mem_stats()
  289. Returns statistics about memory usage. The following methods exist:
  290. =over 4
  291. =item * B<total>
  292. Total memory in bytes.
  293. =item * B<free>
  294. =item * B<used>
  295. =item * B<cache>
  296. Amount of cache used in bytes.
  297. =back
  298. =head2 get_swap_stats()
  299. Returns statistics about swap usage. The following methods exist:
  300. =over 4
  301. =item * B<total>
  302. Total swap memory in bytes.
  303. =item * B<used>
  304. =item * B<free>
  305. =back
  306. =head2 get_network_io_stats()
  307. Returns statistics about the network traffic per network interface as stored in the kernel. Again, the provided methods support one optional parameter specifiying which network interface to query. If the parameter is missing, 0 (= first interface) is assumed.
  308. =over 4
  309. =item * B<num_ifaces>
  310. The number of network interfaces found on your machine.
  311. =item * B<interface_name($if)>
  312. =item * B<tx($if)>
  313. The number of bytes transmitted.
  314. =item * B<rx($if)>
  315. The number of bytes received.
  316. =item * B<ipackets($if)>
  317. The number of packets received.
  318. =item * B<opackets($if)>
  319. The number of bytes transmitted.
  320. =item * B<ierrors($if)>
  321. The number of receive errors
  322. =item * B<oerrors($if)>
  323. The number of transmit errors
  324. =item * B<collisions($if)>
  325. =item * B<systime>
  326. The time period over which C<tx> and C<rx> were transferred.
  327. =back
  328. =head2 get_network_io_stats_diff()
  329. The same as C<get_network_io_stats> except that it will report on the difference to the last time C<get_network_io_stats> or C<get_network_io_stats_diff> was called. It supports the same methods as C<get_network_io_stats>.
  330. =head2 get_network_iface_stats()
  331. Returns statistics about each of the found network interfaces in your computer. The provided methods take one optional argument being the interface to query. If this parameter is missing, 0 (= first interface) is assumed.
  332. =over 4
  333. =item * B<num_ifaces>
  334. The number of interfaces found.
  335. =item * B<interface_name($if)>
  336. =item * B<speed($if)>
  337. The speed of the interface, in megabits/sec
  338. =item * B<dup($if)>
  339. One of C<SG_IFACE_DUPLEX_FULL>, C<SG_IFACE_DUPLEX_HALF> and C<SG_IFACE_DUPLEX_UNKNOWN>. Unknown could mean that duplex hasn't been negotiated yet.
  340. =item * B<up($if)>
  341. Whether the interface is up.
  342. =back
  343. =head2 get_page_stats()
  344. Returns the number of pages the system has paged in and out since bootup. It supports the following methods:
  345. =over 4
  346. =item * B<pages_pagein>
  347. =item * B<pages_pageout>
  348. =item * B<systime>
  349. The time period over which pages_pagein and pages_pageout were transferred, in seconds.
  350. =back
  351. =head2 get_page_stats_diff()
  352. The same as C<get_page_stats> except that it will report the difference to the last time C<get_page_stats> or C<get_page_stats_diff> was called. Supports the same methods as C<get_page_stats>.
  353. =head2 get_user_stats()
  354. Returns information about the currently logged in users. It supports the following methods:
  355. =over 4
  356. =item * B<num_entries>
  357. The number of currently logged in users.
  358. =item * B<name_list>
  359. A list of the users currently logged in.
  360. =back
  361. =head2 get_process_stats()
  362. Returns loads of information about the current processes. This function only returns a container. If you want to look at the processes returned, call C<all_procs> on its return value.
  363. The processes can also be sorted by various criteria by using the C<sort_by> method. This will change the internal order of the container. This method returns the container object so you can do some method chaining:
  364. my $procs = get_process_stats;
  365. $procs->sort_by("name");
  366. print $_->proc_name, "\n" foreach $procs->all_procs;
  367. # syntactically sweeter
  368. print $_->proc_name, "\n"
  369. foreach get_process_stats->sort_by("name")->all_procs;
  370. Available sorting methods are I<"name">, I<"pid">, I<"uid">, I<"gid">, I<"size">, I<"res">, I<"cpu"> and I<"time">.
  371. You can also sort the list returned by C<all_procs>. For that you can use one of the eight sorting routines thusly:
  372. my $p = get_process_stats;
  373. my @by_name = sort sort_procs_by_name $p->all_procs;
  374. my @by_pid = sort sort_procs_by_pid $p->all_procs;
  375. my @by_uid = sort sort_procs_by_uid $p->all_procs;
  376. # etc.
  377. Each object returned by C<all_procs> supports the following methods:
  378. =over 4
  379. =item * B<proc_name>
  380. =item * B<proc_title>
  381. The full command line with which the process was started.
  382. =item * B<pid>
  383. =item * B<parent_pid>
  384. =item * B<pgid>
  385. Process ID of process group leader.
  386. =item * B<uid>
  387. =item * B<euid>
  388. Effective user ID.
  389. =item * B<gid>
  390. =item * B<egid>
  391. Effective group ID.
  392. =item * B<proc_size>
  393. In bytes.
  394. =item * B<proc_resident>
  395. In bytes.
  396. =item * B<time_spent>
  397. Time running in seconds.
  398. =item * B<cpu_percent>
  399. =item * B<nice>
  400. =item * B<state>
  401. One of C<SG_PROCESS_STATE_RUNNING>, C<SG_PROCESS_STATE_SLEEPING>, C<SG_PROCESS_STATE_STOPPED>, C<SG_PROCESS_STATE_ZOMBIE> and
  402. C<SG_PROCESS_STATE_UNKNOWN>.
  403. =back
  404. =head1 ERROR HANDLING
  405. One function C<get_error> exists that will return the error encountered during the last operation, if any. Its return value is dual-typed. In string context, it returns a text representation of the error. In numeric context it returns one of the following values:
  406. SG_ERROR_ASPRINTF
  407. SG_ERROR_DEVSTAT_GETDEVS
  408. SG_ERROR_DEVSTAT_SELECTDEVS
  409. SG_ERROR_ENOENT
  410. SG_ERROR_GETIFADDRS
  411. SG_ERROR_GETMNTINFO
  412. SG_ERROR_GETPAGESIZE
  413. SG_ERROR_KSTAT_DATA_LOOKUP
  414. SG_ERROR_KSTAT_LOOKUP
  415. SG_ERROR_KSTAT_OPEN
  416. SG_ERROR_KSTAT_READ
  417. SG_ERROR_KVM_GETSWAPINFO
  418. SG_ERROR_KVM_OPENFILES
  419. SG_ERROR_MALLOC
  420. SG_ERROR_NONE
  421. SG_ERROR_OPEN
  422. SG_ERROR_OPENDIR
  423. SG_ERROR_PARSE
  424. SG_ERROR_SETEGID
  425. SG_ERROR_SETEUID
  426. SG_ERROR_SETMNTENT
  427. SG_ERROR_SOCKET
  428. SG_ERROR_SWAPCTL
  429. SG_ERROR_SYSCONF
  430. SG_ERROR_SYSCTL
  431. SG_ERROR_SYSCTLBYNAME
  432. SG_ERROR_SYSCTLNAMETOMIB
  433. SG_ERROR_UNAME
  434. SG_ERROR_UNSUPPORTED
  435. SG_ERROR_XSW_VER_MISMATCH
  436. Based on the above, you have finer control over the error handling:
  437. my $disks = get_disk_io_stats;
  438. if (! $disks) {
  439. if (get_error == SG_ERROR_PARSE) {
  440. ...
  441. } else if (get_error == SG_ERROR_OPEN) {
  442. ...
  443. }
  444. etc.
  445. }
  446. =head1 EXPORT
  447. B<All> by default. This means all of the above functions plus the following constants:
  448. SG_ERROR_ASPRINTF
  449. SG_ERROR_DEVSTAT_GETDEVS
  450. SG_ERROR_DEVSTAT_SELECTDEVS
  451. SG_ERROR_ENOENT
  452. SG_ERROR_GETIFADDRS
  453. SG_ERROR_GETMNTINFO
  454. SG_ERROR_GETPAGESIZE
  455. SG_ERROR_KSTAT_DATA_LOOKUP
  456. SG_ERROR_KSTAT_LOOKUP
  457. SG_ERROR_KSTAT_OPEN
  458. SG_ERROR_KSTAT_READ
  459. SG_ERROR_KVM_GETSWAPINFO
  460. SG_ERROR_KVM_OPENFILES
  461. SG_ERROR_MALLOC
  462. SG_ERROR_NONE
  463. SG_ERROR_OPEN
  464. SG_ERROR_OPENDIR
  465. SG_ERROR_PARSE
  466. SG_ERROR_SETEGID
  467. SG_ERROR_SETEUID
  468. SG_ERROR_SETMNTENT
  469. SG_ERROR_SOCKET
  470. SG_ERROR_SWAPCTL
  471. SG_ERROR_SYSCONF
  472. SG_ERROR_SYSCTL
  473. SG_ERROR_SYSCTLBYNAME
  474. SG_ERROR_SYSCTLNAMETOMIB
  475. SG_ERROR_UNAME
  476. SG_ERROR_UNSUPPORTED
  477. SG_ERROR_XSW_VER_MISMATCH
  478. SG_IFACE_DUPLEX_FULL
  479. SG_IFACE_DUPLEX_HALF
  480. SG_IFACE_DUPLEX_UNKNOWN
  481. SG_PROCESS_STATE_RUNNING
  482. SG_PROCESS_STATE_SLEEPING
  483. SG_PROCESS_STATE_STOPPED
  484. SG_PROCESS_STATE_UNKNOWN
  485. SG_PROCESS_STATE_ZOMBIE
  486. If you don't want that, use the module thusly:
  487. use Unix::Statgrab ();
  488. or provide a list of those symbols you want:
  489. use Unix::Statgrab qw/get_network_iface_stats
  490. SG_IFACE_DUPLEX_FULL
  491. SG_IFACE_DUPLEX_HALF
  492. SG_IFACE_DUPLEX_UNKNOWN/;
  493. =head1 SEE ALSO
  494. The excellent and very complete manpage of statgrab(3). You can get additional information for each of the above
  495. functions by prefixing the function name with "sg_" and feed it to C<man>:
  496. man sg_get_network_iface_stats
  497. libstatgrab's home is at L<http://www.i-scream.org/libstatgrab/>
  498. =head1 AUTHOR
  499. Tassilo von Parseval, E<lt>tassilo.von.parseval@rwth-aachen.deE<gt>
  500. =head1 COPYRIGHT AND LICENSE
  501. Copyright (C) 2004-2005 by Tassilo von Parseval
  502. This library is free software; you can redistribute it and/or modify it under
  503. the terms of the GNU Lesser General Public License as published by the Free
  504. Software Foundation; either version 2.1 of the License, or (at your option) any
  505. later version.
  506. =cut