28 #include <sys/types.h> 49 #ifdef SA_PROCESS_STATE 52 #ifdef SA_PROCESS_USER_TIME // TODO Explain these better 55 #ifdef SA_PROCESS_SYS_TIME 58 #ifdef SA_PROCESS_THREADS 61 #ifdef SA_PROCESS_VM_SIZE 82 #ifdef SA_PROCESS_FILENAME 83 char filename[SA_PROCESS_FILENAME];
85 #ifdef SA_PROCESS_CMDLINE 86 char cmdline[SA_PROCESS_CMDLINE];
88 #ifdef SA_PROCESS_PARENT_PID 91 #ifdef SA_PROCESS_PGRP 100 #ifdef SA_PROCESS_NICE 103 #ifdef SA_PROCESS_START_TIME 109 #ifdef SA_OPEN_PROCESS 118 #ifdef SA_CLOSE_PROCESS 142 int sa_get_processes_ids(pid_t* dst, uint32_t dst_size, uint32_t* written) SA_EXPORT SA_NONNULL;
int sa_get_process(pid_t pid, struct sa_process *dst) SA_EXPORT SA_NONNULL
sa_process_state
Definition: process.h:33
pid_t pgrp
The group id the process.
Definition: process.h:92
int sa_count_processes(uint32_t *number) SA_EXPORT SA_NONNULL
The state is unknown.
Definition: process.h:34
The process is running.
Definition: process.h:35
int sa_open_process() SA_EXPORT
uint64_t sys_time
Kernel mode jiffies.
Definition: process.h:56
gid_t gid
Id of the user's group running this process.
Definition: process.h:80
uint64_t start_time
Process start time in hundredths of second since system boot.
Definition: process.h:104
pid_t tty
The id of the tty this process is running on.
Definition: process.h:98
pid_t pid
The id of the process.
Definition: process.h:47
pid_t pid
The id of the process.
Definition: process.h:74
int sa_get_process_activity(pid_t pid, struct sa_process_activity *dst) SA_EXPORT SA_NONNULL
uint32_t rss
Resident Set memory Size.
Definition: process.h:65
The process is sleeping.
Definition: process.h:36
The process is an uninterruptible sleep.
Definition: process.h:37
int sa_close_process() SA_EXPORT
uint32_t vm_size
Virtual memory size.
Definition: process.h:62
uint32_t threads
Number of threads.
Definition: process.h:59
uint64_t user_time
User mode jiffies.
Definition: process.h:53
enum sa_process_state state
The current state of the process.
Definition: process.h:50
int8_t nice
Priority of this process.
Definition: process.h:101
int sa_get_processes_ids(pid_t *dst, uint32_t dst_size, uint32_t *written) SA_EXPORT SA_NONNULL
pid_t parent_pid
The id of its parent.
Definition: process.h:89
It has completed execution but still has an entry in the process table.
Definition: process.h:38
uid_t uid
The id of the user running this process.
Definition: process.h:77
pid_t sid
Session id of this process.
Definition: process.h:95
The process is traced or stopped.
Definition: process.h:39