xref: /illumos-gate/usr/src/man/man3proc/proc_get_psinfo.3proc (revision 4c28a617e3922d92a58e813a5b955eb526b9c386)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2015 Joyent, Inc.
13.\"
14.Dd May 11, 2016
15.Dt PROC_GET_PSINFO 3PROC
16.Os
17.Sh NAME
18.Nm proc_get_psinfo
19.Nd get process ps information
20.Sh SYNOPSIS
21.Lb libproc
22.In libproc.h
23.Ft int
24.Fo proc_get_psinfo
25.Fa "pid_t pid"
26.Fa "psinfo_t *psp"
27.Fc
28.Sh DESCRIPTION
29The
30.Fn proc_get_psinfo
31function is a convenient way to read the /proc psinfo file for the
32process
33.Fa pid .
34The
35.Xr ps 1
36related information of the process will be filled into
37.Fa psp .
38The definition of the
39.Sy psinfo_t
40structure may be found in
41.Xr proc 4 .
42.Sh RETURN VALUES
43Upon successful completion, the
44.Fn proc_get_psinfo
45function returns
46.Sy 0 .
47Otherwise,
48.Sy -1
49is returned to indicate an error occurred.
50.Sh INTERFACE STABILITY
51.Sy Uncommitted
52.Sh MT-LEVEL
53.Sy MT-Safe
54.Sh SEE ALSO
55.Xr libproc 3LIB ,
56.Xr proc 4
57