Changeset View
Changeset View
Standalone View
Standalone View
lib/libprocstat/libprocstat.3
Show All 18 Lines | |||||||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||||||
.\" | .\" | ||||||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||||||
.\" | .\" | ||||||||
.Dd November 26, 2020 | .Dd April 3, 2022 | ||||||||
.Dt LIBPROCSTAT 3 | .Dt LIBPROCSTAT 3 | ||||||||
.Os | .Os | ||||||||
.Sh NAME | .Sh NAME | ||||||||
.Nm procstat_close , | .Nm procstat_close , | ||||||||
.Nm procstat_freeadvlock , | |||||||||
.Nm procstat_freeargv , | .Nm procstat_freeargv , | ||||||||
.Nm procstat_freeauxv , | .Nm procstat_freeauxv , | ||||||||
.Nm procstat_freeenvv , | .Nm procstat_freeenvv , | ||||||||
.Nm procstat_freefiles , | .Nm procstat_freefiles , | ||||||||
.Nm procstat_freegroups , | .Nm procstat_freegroups , | ||||||||
.Nm procstat_freekstack , | .Nm procstat_freekstack , | ||||||||
.Nm procstat_freeprocs , | .Nm procstat_freeprocs , | ||||||||
.Nm procstat_freeptlwpinfo , | .Nm procstat_freeptlwpinfo , | ||||||||
.Nm procstat_freevmmap , | .Nm procstat_freevmmap , | ||||||||
.Nm procstat_get_pipe_info , | .Nm procstat_get_pipe_info , | ||||||||
.Nm procstat_get_pts_info , | .Nm procstat_get_pts_info , | ||||||||
.Nm procstat_get_sem_info , | .Nm procstat_get_sem_info , | ||||||||
.Nm procstat_get_shm_info , | .Nm procstat_get_shm_info , | ||||||||
.Nm procstat_get_socket_info , | .Nm procstat_get_socket_info , | ||||||||
.Nm procstat_get_vnode_info , | .Nm procstat_get_vnode_info , | ||||||||
.Nm procstat_getadvlock , | |||||||||
.Nm procstat_getargv , | .Nm procstat_getargv , | ||||||||
.Nm procstat_getauxv , | .Nm procstat_getauxv , | ||||||||
.Nm procstat_getenvv , | .Nm procstat_getenvv , | ||||||||
.Nm procstat_getfiles , | .Nm procstat_getfiles , | ||||||||
.Nm procstat_getgroups , | .Nm procstat_getgroups , | ||||||||
.Nm procstat_getkstack , | .Nm procstat_getkstack , | ||||||||
.Nm procstat_getosrel , | .Nm procstat_getosrel , | ||||||||
.Nm procstat_getpathname , | .Nm procstat_getpathname , | ||||||||
Show All 11 Lines | |||||||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||||||
.In sys/param.h | .In sys/param.h | ||||||||
.In sys/queue.h | .In sys/queue.h | ||||||||
.In sys/socket.h | .In sys/socket.h | ||||||||
.In libprocstat.h | .In libprocstat.h | ||||||||
.Ft void | .Ft void | ||||||||
.Fn procstat_close "struct procstat *procstat" | .Fn procstat_close "struct procstat *procstat" | ||||||||
.Ft void | .Ft void | ||||||||
.Fn procstat_freeadvlock "struct procstat *procstat" "struct advlock_list *list" | |||||||||
.Ft void | |||||||||
.Fo procstat_freeargv | .Fo procstat_freeargv | ||||||||
.Fa "struct procstat *procstat" | .Fa "struct procstat *procstat" | ||||||||
.Fc | .Fc | ||||||||
.Ft void | .Ft void | ||||||||
.Fo procstat_freeauxv | .Fo procstat_freeauxv | ||||||||
.Fa "struct procstat *procstat" | .Fa "struct procstat *procstat" | ||||||||
.Fa "Elf_Auxinfo *auxv" | .Fa "Elf_Auxinfo *auxv" | ||||||||
.Fc | .Fc | ||||||||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||||||
.Fc | .Fc | ||||||||
.Ft int | .Ft int | ||||||||
.Fo procstat_get_vnode_info | .Fo procstat_get_vnode_info | ||||||||
.Fa "struct procstat *procstat" | .Fa "struct procstat *procstat" | ||||||||
.Fa "struct filestat *fst" | .Fa "struct filestat *fst" | ||||||||
.Fa "struct vnstat *vn" | .Fa "struct vnstat *vn" | ||||||||
.Fa "char *errbuf" | .Fa "char *errbuf" | ||||||||
.Fc | .Fc | ||||||||
.Ft "struct advlock_list *" | |||||||||
.Fo procstat_getadvlock | |||||||||
.Fa "struct procstat *procstat" | |||||||||
.Fc | |||||||||
.Ft "char **" | .Ft "char **" | ||||||||
.Fo procstat_getargv | .Fo procstat_getargv | ||||||||
.Fa "struct procstat *procstat" | .Fa "struct procstat *procstat" | ||||||||
.Fa "const struct kinfo_proc *kp" | .Fa "const struct kinfo_proc *kp" | ||||||||
.Fa "size_t nchr" | .Fa "size_t nchr" | ||||||||
.Fc | .Fc | ||||||||
.Ft "Elf_Auxinfo *" | .Ft "Elf_Auxinfo *" | ||||||||
.Fo procstat_getauxv | .Fo procstat_getauxv | ||||||||
▲ Show 20 Lines • Show All 325 Lines • ▼ Show 20 Lines | |||||||||
.Vt kinfo_proc | .Vt kinfo_proc | ||||||||
structure, and returns VM layout of the process as a dynamically allocated | structure, and returns VM layout of the process as a dynamically allocated | ||||||||
array of | array of | ||||||||
.Vt kinfo_vmentry | .Vt kinfo_vmentry | ||||||||
structures. | structures. | ||||||||
The caller is responsible to free the allocated memory with a subsequent | The caller is responsible to free the allocated memory with a subsequent | ||||||||
.Fn procstat_freevmmap | .Fn procstat_freevmmap | ||||||||
function call. | function call. | ||||||||
.Pp | |||||||||
The | |||||||||
.Fn procstat_getadvlock | |||||||||
function returns the dynamically allocated list of the | |||||||||
markjUnsubmitted Done Inline Actions
markj: | |||||||||
Done Inline Actions
markj: | |||||||||
.Va struct advlock | |||||||||
structures providing the snapshot information of the currently | |||||||||
markjUnsubmitted Done Inline Actions
markj: | |||||||||
Done Inline Actions
missed it before, sorry markj: missed it before, sorry | |||||||||
acquired advisory locks in the system. | |||||||||
Both locally acquired POSIX ( | |||||||||
.Xr fcntl 2 ) | |||||||||
and BSD-style ( | |||||||||
.Xr flock 2 ) | |||||||||
locks are reported, as well as locks established by the remote file | |||||||||
markjUnsubmitted Done Inline Actions
markj: | |||||||||
system protocols. | |||||||||
For each lock, file identification information about mount point and | |||||||||
inode number is guaranteed to be provided. | |||||||||
markjUnsubmitted Done Inline ActionsMaybe, "For each lock, unique identifiers for the locked file and its mount point are guaranteed to be provided." markj: Maybe, "For each lock, unique identifiers for the locked file and its mount point are… | |||||||||
If a path for the locked file can be reconstructed, it is provided | |||||||||
as well. | |||||||||
The returned list must be freed with the | |||||||||
.Fn procstat_freeadvlock | |||||||||
function. | |||||||||
.Pp | .Pp | ||||||||
The | The | ||||||||
.Fn procstat_get_pipe_info , | .Fn procstat_get_pipe_info , | ||||||||
.Fn procstat_get_pts_info , | .Fn procstat_get_pts_info , | ||||||||
.Fn procstat_get_sem_info , | .Fn procstat_get_sem_info , | ||||||||
.Fn procstat_get_shm_info , | .Fn procstat_get_shm_info , | ||||||||
.Fn procstat_get_socket_info | .Fn procstat_get_socket_info | ||||||||
and | and | ||||||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |