]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/psi-util.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
6 #include "parse-util.h"
9 typedef enum PressureType
{
14 /* Averages are stored in fixed-point with 11 bit fractions */
15 typedef struct ResourcePressure
{
22 /** Upstream 4.20+ format
24 * some avg10=0.22 avg60=0.17 avg300=1.11 total=58761459
25 * full avg10=0.23 avg60=0.16 avg300=1.08 total=58464525
27 int read_resource_pressure(const char *path
, PressureType type
, ResourcePressure
*ret
);
29 /* Was the kernel compiled with CONFIG_PSI=y? 1 if yes, 0 if not, negative on error. */
30 int is_pressure_supported(void);