Print this page




 696 holds the fault number that caused the stop.
 697 .It Sy PR_SYSENTRY
 698 .It Sy PR_SYSEXIT
 699 indicate a stop on entry to or exit from a system call (see
 700 .Sx PCSENTRY
 701 and
 702 .Sx PCSEXIT ) ;
 703 .Sy pr_what
 704 holds the system call number.
 705 .It Sy PR_JOBCONTROL
 706 indicates that the lwp stopped due to the default action of a job control stop
 707 signal (see
 708 .Xr sigaction 2 ) ;
 709 .Sy pr_what
 710 holds the stopping signal number.
 711 .It Sy PR_SUSPENDED
 712 indicates that the lwp stopped due to internal synchronization of lwps within
 713 the process.
 714 .Sy pr_what
 715 is unused in this case.











 716 .El
 717 .Pp
 718 .Sy pr_cursig
 719 names the current signal, that is, the next signal to be delivered to the lwp,
 720 if any.
 721 .Sy pr_info ,
 722 when the lwp is in a
 723 .Sy PR_SIGNALLED
 724 or
 725 .Sy PR_FAULTED
 726 stop, contains additional information pertinent to the particular signal or
 727 fault (see
 728 .In sys/siginfo.h ) .
 729 .Pp
 730 .Sy pr_lwppend
 731 identifies any synchronous or directed signals pending for the lwp.
 732 .Sy pr_lwphold
 733 identifies those signals whose delivery is being blocked by the lwp (the
 734 signal mask).
 735 .Pp


1007 Applications currently relying on the
1008 .Sy SSYS
1009 bit in
1010 .Sy pr_flag
1011 should migrate to checking
1012 .Sy PR_ISSYS
1013 in the
1014 .Sy pstatus
1015 structure's
1016 .Sy pr_flags
1017 field.
1018 .Pp
1019 .Sy pr_pctcpu
1020 and
1021 .Sy pr_pctmem
1022 are 16-bit binary fractions in the range 0.0 to 1.0 with the binary point to
1023 the right of the high-order bit (1.0 == 0x8000).
1024 .Sy pr_pctcpu
1025 is the summation over all lwps in the process.
1026 .Pp














1027 .Sy pr_lwp
1028 contains the
1029 .Xr ps 1
1030 information for the representative lwp.
1031 If the process is a
1032 .Em zombie ,
1033 .Sy pr_nlwp ,
1034 .Sy pr_nzomb ,
1035 and
1036 .Sy pr_lwp.pr_lwpid
1037 are zero and the other fields of
1038 .Sy pr_lwp
1039 are undefined:
1040 .Bd -literal -offset 2
1041 typedef struct lwpsinfo {
1042     int pr_flag;             /* lwp flags (DEPRECATED: see below) */
1043     id_t pr_lwpid;           /* lwp id */
1044     uintptr_t pr_addr;       /* internal address of lwp */
1045     uintptr_t pr_wchan;      /* wait addr for sleeping lwp */
1046     char pr_stype;           /* synchronization event type */


1161 .Sy PRSECFLAGS_VERSION_1 .
1162 .Ss sigact
1163 Contains an array of
1164 .Sy sigaction structures
1165 describing the current dispositions of all signals associated with the traced
1166 process (see
1167 .Xr sigaction 2 ) .
1168 Signal numbers are displaced by 1 from array indices, so that the action for
1169 signal number
1170 .Va n
1171 appears in position
1172 .Va n Ns -1
1173 of the array.
1174 .Ss auxv
1175 Contains the initial values of the process's aux vector in an array of
1176 .Sy auxv_t
1177 structures (see
1178 .In sys/auxv.h ) .
1179 The values are those that were passed by the operating system as startup
1180 information to the dynamic linker.









1181 .Ss ldt
1182 This file exists only on x86-based machines.
1183 It is non-empty only if the process has established a local descriptor table
1184 .Pq Sy LDT .
1185 If non-empty, the file contains the array of currently active
1186 .Sy LDT
1187 entries in an array of elements of type
1188 .Vt struct ssd ,
1189 defined in
1190 .In sys/sysi86.h ,
1191 one element for each active
1192 .Sy LDT
1193 entry.
1194 .Ss map, xmap
1195 Contain information about the virtual address map of the process.
1196 The map file contains an array of
1197 .Sy prmap
1198 structures while the xmap file contains an
1199 array of
1200 .Sy prxmap


3196 .Xr ps 1
3197 info
3198 .It Pa /proc/ Ns Em pid Ns Pa /lpsinfo
3199 array of lwp
3200 .Xr ps 1
3201 info structs
3202 .It Pa /proc/ Ns Em pid Ns Pa /map
3203 address space map
3204 .It Pa /proc/ Ns Em pid Ns Pa /xmap
3205 extended address space map
3206 .It Pa /proc/ Ns Em pid Ns Pa /rmap
3207 reserved address map
3208 .It Pa /proc/ Ns Em pid Ns Pa /cred
3209 process credentials
3210 .It Pa /proc/ Ns Em pid Ns Pa /priv
3211 process privileges
3212 .It Pa /proc/ Ns Em pid Ns Pa /sigact
3213 process signal actions
3214 .It Pa /proc/ Ns Em pid Ns Pa /auxv
3215 process aux vector


3216 .It Pa /proc/ Ns Em pid Ns Pa /ldt
3217 process
3218 .Sy LDT
3219 (x86 only)
3220 .It Pa /proc/ Ns Em pid Ns Pa /usage
3221 process usage
3222 .It Pa /proc/ Ns Em pid Ns Pa /lusage
3223 array of lwp usage structs
3224 .It Pa /proc/ Ns Em pid Ns Pa /path
3225 symbolic links to process open files
3226 .It Pa /proc/ Ns Em pid Ns Pa /pagedata
3227 process page data
3228 .It Pa /proc/ Ns Em pid Ns Pa /watch
3229 active watchpoints
3230 .It Pa /proc/ Ns Em pid Ns Pa /cwd
3231 alias for the current working directory
3232 .It Pa /proc/ Ns Em pid Ns Pa /root
3233 alias for the root directory
3234 .It Pa /proc/ Ns Em pid Ns Pa /fd
3235 directory (list of open files)




 696 holds the fault number that caused the stop.
 697 .It Sy PR_SYSENTRY
 698 .It Sy PR_SYSEXIT
 699 indicate a stop on entry to or exit from a system call (see
 700 .Sx PCSENTRY
 701 and
 702 .Sx PCSEXIT ) ;
 703 .Sy pr_what
 704 holds the system call number.
 705 .It Sy PR_JOBCONTROL
 706 indicates that the lwp stopped due to the default action of a job control stop
 707 signal (see
 708 .Xr sigaction 2 ) ;
 709 .Sy pr_what
 710 holds the stopping signal number.
 711 .It Sy PR_SUSPENDED
 712 indicates that the lwp stopped due to internal synchronization of lwps within
 713 the process.
 714 .Sy pr_what
 715 is unused in this case.
 716 .It Sy PR_BRAND
 717 indicates that the lwp stopped for a brand-specific reason.
 718 Interpretation of the value of
 719 .Sy pr_what
 720 depends on which zone brand is in use.
 721 It is not generally expected that an lwp stopped in this state will be
 722 restarted by native
 723 .\" mandoc(1) doesn't like .Xr macros referring to itself, so this is
 724 .\" a bit of a hack.
 725 .Nm Ns Pq 4
 726 consumers.
 727 .El
 728 .Pp
 729 .Sy pr_cursig
 730 names the current signal, that is, the next signal to be delivered to the lwp,
 731 if any.
 732 .Sy pr_info ,
 733 when the lwp is in a
 734 .Sy PR_SIGNALLED
 735 or
 736 .Sy PR_FAULTED
 737 stop, contains additional information pertinent to the particular signal or
 738 fault (see
 739 .In sys/siginfo.h ) .
 740 .Pp
 741 .Sy pr_lwppend
 742 identifies any synchronous or directed signals pending for the lwp.
 743 .Sy pr_lwphold
 744 identifies those signals whose delivery is being blocked by the lwp (the
 745 signal mask).
 746 .Pp


1018 Applications currently relying on the
1019 .Sy SSYS
1020 bit in
1021 .Sy pr_flag
1022 should migrate to checking
1023 .Sy PR_ISSYS
1024 in the
1025 .Sy pstatus
1026 structure's
1027 .Sy pr_flags
1028 field.
1029 .Pp
1030 .Sy pr_pctcpu
1031 and
1032 .Sy pr_pctmem
1033 are 16-bit binary fractions in the range 0.0 to 1.0 with the binary point to
1034 the right of the high-order bit (1.0 == 0x8000).
1035 .Sy pr_pctcpu
1036 is the summation over all lwps in the process.
1037 .Pp
1038 The
1039 .Sy pr_fname
1040 and
1041 .Sy pr_psargs
1042 are writable by the owner of the process.
1043 To write to them, the
1044 .Sy psinfo
1045 file should be open for writing and the desired value for the field should be
1046 written at the file offset that corresponds to the member of structure.
1047 No other entry may be written to; if a write is attempted to an offset that
1048 does not represent one of these two memers, or if the size of the write is not
1049 exactly the size of the member being written, no bytes will be written and
1050 zero will be returned.
1051 .Pp
1052 .Sy pr_lwp
1053 contains the
1054 .Xr ps 1
1055 information for the representative lwp.
1056 If the process is a
1057 .Em zombie ,
1058 .Sy pr_nlwp ,
1059 .Sy pr_nzomb ,
1060 and
1061 .Sy pr_lwp.pr_lwpid
1062 are zero and the other fields of
1063 .Sy pr_lwp
1064 are undefined:
1065 .Bd -literal -offset 2
1066 typedef struct lwpsinfo {
1067     int pr_flag;             /* lwp flags (DEPRECATED: see below) */
1068     id_t pr_lwpid;           /* lwp id */
1069     uintptr_t pr_addr;       /* internal address of lwp */
1070     uintptr_t pr_wchan;      /* wait addr for sleeping lwp */
1071     char pr_stype;           /* synchronization event type */


1186 .Sy PRSECFLAGS_VERSION_1 .
1187 .Ss sigact
1188 Contains an array of
1189 .Sy sigaction structures
1190 describing the current dispositions of all signals associated with the traced
1191 process (see
1192 .Xr sigaction 2 ) .
1193 Signal numbers are displaced by 1 from array indices, so that the action for
1194 signal number
1195 .Va n
1196 appears in position
1197 .Va n Ns -1
1198 of the array.
1199 .Ss auxv
1200 Contains the initial values of the process's aux vector in an array of
1201 .Sy auxv_t
1202 structures (see
1203 .In sys/auxv.h ) .
1204 The values are those that were passed by the operating system as startup
1205 information to the dynamic linker.
1206 .Ss argv
1207 Contains the concatenation of each of the argument strings, including their
1208 .Sy NUL
1209 terminators, in the argument vector
1210 .Pq Va argv
1211 for the process.
1212 If the process has modified either its argument vector, or the contents of
1213 any of the strings referenced by that vector, those changes will be visible
1214 here.
1215 .Ss ldt
1216 This file exists only on x86-based machines.
1217 It is non-empty only if the process has established a local descriptor table
1218 .Pq Sy LDT .
1219 If non-empty, the file contains the array of currently active
1220 .Sy LDT
1221 entries in an array of elements of type
1222 .Vt struct ssd ,
1223 defined in
1224 .In sys/sysi86.h ,
1225 one element for each active
1226 .Sy LDT
1227 entry.
1228 .Ss map, xmap
1229 Contain information about the virtual address map of the process.
1230 The map file contains an array of
1231 .Sy prmap
1232 structures while the xmap file contains an
1233 array of
1234 .Sy prxmap


3230 .Xr ps 1
3231 info
3232 .It Pa /proc/ Ns Em pid Ns Pa /lpsinfo
3233 array of lwp
3234 .Xr ps 1
3235 info structs
3236 .It Pa /proc/ Ns Em pid Ns Pa /map
3237 address space map
3238 .It Pa /proc/ Ns Em pid Ns Pa /xmap
3239 extended address space map
3240 .It Pa /proc/ Ns Em pid Ns Pa /rmap
3241 reserved address map
3242 .It Pa /proc/ Ns Em pid Ns Pa /cred
3243 process credentials
3244 .It Pa /proc/ Ns Em pid Ns Pa /priv
3245 process privileges
3246 .It Pa /proc/ Ns Em pid Ns Pa /sigact
3247 process signal actions
3248 .It Pa /proc/ Ns Em pid Ns Pa /auxv
3249 process aux vector
3250 .It Pa /proc/ Ns Em pid Ns Pa /argv
3251 process argument vector
3252 .It Pa /proc/ Ns Em pid Ns Pa /ldt
3253 process
3254 .Sy LDT
3255 (x86 only)
3256 .It Pa /proc/ Ns Em pid Ns Pa /usage
3257 process usage
3258 .It Pa /proc/ Ns Em pid Ns Pa /lusage
3259 array of lwp usage structs
3260 .It Pa /proc/ Ns Em pid Ns Pa /path
3261 symbolic links to process open files
3262 .It Pa /proc/ Ns Em pid Ns Pa /pagedata
3263 process page data
3264 .It Pa /proc/ Ns Em pid Ns Pa /watch
3265 active watchpoints
3266 .It Pa /proc/ Ns Em pid Ns Pa /cwd
3267 alias for the current working directory
3268 .It Pa /proc/ Ns Em pid Ns Pa /root
3269 alias for the root directory
3270 .It Pa /proc/ Ns Em pid Ns Pa /fd
3271 directory (list of open files)