[#BloombergLP-balb-PerformanceMonitor_LinuxProcStatistics]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balb.adoc[balb]::PerformanceMonitor&lowbar;LinuxProcStatistics
:relfileprefix: ../../
:mrdocs:

Describes the fields present in &sol;proc&sol;&lt;pid&gt;&sol;stat&period; For a complete description of each field, see `man proc`&period;

== Synopsis

Declared in `&lt;balb&lowbar;performancemonitor&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct PerformanceMonitor&lowbar;LinuxProcStatistics;
----

== Description

Note that sizes of the data fields are defined in terms of scanf(3) format specifiers, such as %d, %lu or %c&period; There is no good way to know if %lu is 32&hyphen;bit wide or 64&hyphen;bit, because the code can be built in the &hyphen;m32 mode making sizeof(unsigned long)&equals;&equals;4 and executed on a 64bit platform where the kernel thinks that %lu can represent 64&hyphen;bit wide integers&period; Therefore we use `Uint64` regardless of the build configuration&period;

== Type Aliases

[cols="1"]
|===
| Name
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/LdType.adoc[`LdType`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/LluType.adoc[`LluType`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/LuType.adoc[`LuType`] 
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/2constructor.adoc[`PerformanceMonitor&lowbar;LinuxProcStatistics`]         [.small]#[constructor]#
| Default construct all fields in this object&period;
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/parseProcStatString.adoc[`parseProcStatString`] 
| Parse the specified `procStatString` and populate all the fields in this `struct`&period; Check that the specified `pid` matches the `pid` field in the string&period; Return 0 on success and a non&hyphen;zero value otherwise&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/readProcStatString.adoc[`readProcStatString`] 
| For the specified process id `pid`, load the contents of the file `&sol;proc&sol;&lt;pid&gt;&sol;stat` into the specified `buffer`&period; Return 0 on success and a non&hyphen;zero value otherwise&period;
|===


== Data Members

[cols="1"]
|===
| Name
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_cmajflt.adoc[`d&lowbar;cmajflt`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_cminflt.adoc[`d&lowbar;cminflt`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_comm.adoc[`d&lowbar;comm`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_cstime.adoc[`d&lowbar;cstime`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_cutime.adoc[`d&lowbar;cutime`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_flags.adoc[`d&lowbar;flags`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_itrealvalue.adoc[`d&lowbar;itrealvalue`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_majflt.adoc[`d&lowbar;majflt`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_minflt.adoc[`d&lowbar;minflt`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_nice.adoc[`d&lowbar;nice`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_numThreads.adoc[`d&lowbar;numThreads`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_pgrp.adoc[`d&lowbar;pgrp`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_pid.adoc[`d&lowbar;pid`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_ppid.adoc[`d&lowbar;ppid`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_priority.adoc[`d&lowbar;priority`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_rss.adoc[`d&lowbar;rss`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_session.adoc[`d&lowbar;session`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_starttime.adoc[`d&lowbar;starttime`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_state.adoc[`d&lowbar;state`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_stime.adoc[`d&lowbar;stime`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_tpgid.adoc[`d&lowbar;tpgid`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_tty_nr.adoc[`d&lowbar;tty&lowbar;nr`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_utime.adoc[`d&lowbar;utime`] 
| xref:BloombergLP/balb/PerformanceMonitor_LinuxProcStatistics/d_vsize.adoc[`d&lowbar;vsize`] 
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
