2 * collectd - src/utils_taskstats.h
3 * Copyright (C) 2017 Florian octo Forster
7 * Permission to use, copy, modify, and/or distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 * Florian octo Forster <octo at collectd.org>
23 #ifndef UTILS_TASKSTATS_H
24 #define UTILS_TASKSTATS_H 1
28 #include "utils_time.h"
31 typedef struct ts_s ts_t;
37 uint64_t freepages_ns;
40 ts_t *ts_create(void);
41 void ts_destroy(ts_t *);
43 /* ts_delay_by_tgid returns Linux delay accounting information for the task
44 * identified by tgid. Returns zero on success and an errno otherwise. */
45 int ts_delay_by_tgid(ts_t *ts, uint32_t tgid, ts_delay_t *out);
47 #endif /* UTILS_TASKSTATS_H */