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 November 27, 2023 15.Dt PROC_GET_PSINFO 3PROC 16.Os 17.Sh NAME 18.Nm proc_get_psinfo 19.Nd get process ps information 20.Sh LIBRARY 21.Lb libproc 22.Sh SYNOPSIS 23.In libproc.h 24.Ft int 25.Fo proc_get_psinfo 26.Fa "pid_t pid" 27.Fa "psinfo_t *psp" 28.Fc 29.Sh DESCRIPTION 30The 31.Fn proc_get_psinfo 32function is a convenient way to read the /proc psinfo file for the 33process 34.Fa pid . 35The 36.Xr ps 1 37related information of the process will be filled into 38.Fa psp . 39The definition of the 40.Sy psinfo_t 41structure may be found in 42.Xr proc 5 . 43.Sh RETURN VALUES 44Upon successful completion, the 45.Fn proc_get_psinfo 46function returns 47.Sy 0 . 48Otherwise, 49.Sy -1 50is returned to indicate an error occurred. 51.Sh INTERFACE STABILITY 52.Sy Uncommitted 53.Sh MT-LEVEL 54.Sy MT-Safe 55.Sh SEE ALSO 56.Xr libproc 3LIB , 57.Xr proc 5 58