NAME
OpenBSD::KvmFiles - OpenBSD kvm_getfiles.
VERSION
Version 0.02
SYNOPSIS
Use kvm_getfiles to extract number of openend file of a process.
use OpenBSD::KvmFiles;
my $opened_file = KvmGetFilesAmount($pid);
...
# some const here to define #define DTYPE_VNODE 1 /* file */ #define DTYPE_SOCKET 2 /* communications endpoint */ #define DTYPE_PIPE 3 /* pipe */ #define DTYPE_KQUEUE 4 /* event queue */ #define DTYPE_DMABUF 5 /* DMA buffer (for DRM) */
EXPORT
KvmGetFiles
SUBROUTINES/METHODS
KvmGetFilesAmount
Return the count of opened FD for a process or all if PID is -1
KvmGetFilesInfo
Return an array ref of opened FD for a process or all if PID = -1
[ { "type" => type of fd "usecount" => referenced and use fd count "read_bytes" => read bytes "write_bytes" => written bytes if type is a file (DTYPE_VNODE) "path" => path of fd },... ]
AUTHOR
Dohnuts, <dohnuts at no-reply.github.org>
BUGS
Please report any bugs or feature requests to https://github.com/systemVII/OpenBSD-KvmFiles/issues. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc OpenBSD::KvmFiles
You can also look for information at:
github: a code repository
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2020 Dohnuts.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.