2018-06-04 03:11:21 -07:00
|
|
|
#ifndef __PROC_H__
|
|
|
|
#define __PROC_H__
|
|
|
|
|
|
|
|
#include <Eina.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#if !defined(PID_MAX)
|
|
|
|
# define PID_MAX 99999
|
|
|
|
#endif
|
|
|
|
|
2020-04-16 14:03:25 -07:00
|
|
|
typedef struct _Proc_Info
|
2018-06-04 03:11:21 -07:00
|
|
|
{
|
|
|
|
pid_t pid;
|
2020-08-11 03:49:49 -07:00
|
|
|
pid_t ppid;
|
2018-06-04 03:11:21 -07:00
|
|
|
uid_t uid;
|
|
|
|
int8_t nice;
|
|
|
|
int8_t priority;
|
|
|
|
int cpu_id;
|
|
|
|
int32_t numthreads;
|
2020-08-13 05:36:51 -07:00
|
|
|
int64_t cpu_time;
|
2020-05-31 10:43:16 -07:00
|
|
|
double cpu_usage;
|
2020-08-16 05:49:06 -07:00
|
|
|
int64_t start;
|
2020-04-22 07:08:16 -07:00
|
|
|
|
2020-07-09 15:39:15 -07:00
|
|
|
uint64_t mem_size;
|
|
|
|
uint64_t mem_virt;
|
|
|
|
uint64_t mem_rss;
|
|
|
|
uint64_t mem_shared;
|
2020-04-22 07:08:16 -07:00
|
|
|
|
2020-04-22 02:10:02 -07:00
|
|
|
char *command;
|
|
|
|
char *arguments;
|
2018-06-04 03:11:21 -07:00
|
|
|
const char *state;
|
|
|
|
|
2020-05-15 13:17:00 -07:00
|
|
|
int tid;
|
|
|
|
char *thread_name;
|
|
|
|
|
2020-05-12 12:34:07 -07:00
|
|
|
Eina_List *threads;
|
2020-10-03 06:19:29 -07:00
|
|
|
Eina_List *children;
|
2020-04-16 14:03:25 -07:00
|
|
|
} Proc_Info;
|
2018-06-04 03:11:21 -07:00
|
|
|
|
|
|
|
Eina_List *
|
2020-05-13 13:13:01 -07:00
|
|
|
proc_info_all_get(void);
|
2018-06-04 03:11:21 -07:00
|
|
|
|
2020-04-16 14:03:25 -07:00
|
|
|
Proc_Info *
|
2020-05-13 13:13:01 -07:00
|
|
|
proc_info_by_pid(int pid);
|
2018-06-04 03:11:21 -07:00
|
|
|
|
2020-04-22 02:10:02 -07:00
|
|
|
void
|
2020-05-13 13:13:01 -07:00
|
|
|
proc_info_free(Proc_Info *proc);
|
2020-04-22 02:10:02 -07:00
|
|
|
|
2020-07-31 11:13:23 -07:00
|
|
|
void
|
|
|
|
proc_info_kthreads_show_set(Eina_Bool enabled);
|
|
|
|
|
|
|
|
Eina_Bool
|
|
|
|
proc_info_kthreads_show_get(void);
|
|
|
|
|
2020-10-03 06:19:29 -07:00
|
|
|
Eina_List *
|
|
|
|
proc_info_all_children_get(void);
|
|
|
|
|
|
|
|
Eina_List *
|
|
|
|
proc_info_pid_children_get(pid_t pid);
|
|
|
|
|
|
|
|
void
|
|
|
|
proc_info_pid_children_free(Proc_Info *procs);
|
2018-06-04 03:11:21 -07:00
|
|
|
|
|
|
|
#endif
|