fixed. Support building in one binary
This commit is contained in:
parent
7d0207ace2
commit
33b89e64da
38 changed files with 285 additions and 163 deletions
45
libmu/proc_parser.h
Normal file
45
libmu/proc_parser.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
#ifndef _PROC_PARSER
|
||||
#define _PROC_PARSER
|
||||
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#include <limits.h>
|
||||
|
||||
struct mu_proc {
|
||||
/* from status */
|
||||
char prog[PATH_MAX + 1];
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
|
||||
/* from stat */
|
||||
pid_t pid;
|
||||
char cmdline[PATH_MAX + 1];
|
||||
char state;
|
||||
int ppid;
|
||||
int pgrp;
|
||||
int sid;
|
||||
int tty;
|
||||
int tpgid;
|
||||
unsigned flags;
|
||||
unsigned long minflt;
|
||||
unsigned long cminflt;
|
||||
unsigned long majflt;
|
||||
unsigned long cmajflt;
|
||||
unsigned long utime;
|
||||
unsigned long stime;
|
||||
long cutime;
|
||||
long cstime;
|
||||
long priority;
|
||||
long nice;
|
||||
long num_threads;
|
||||
long itrealvalue;
|
||||
unsigned long long starttime;
|
||||
unsigned long vsize;
|
||||
long rss;
|
||||
long rsslim;
|
||||
};
|
||||
|
||||
int mu_proc_status(const char *prog_name, const pid_t pid, struct mu_proc *proc_s);
|
||||
int mu_proc_stat(const char *prog_name, const pid_t pid, struct mu_proc *proc_s);
|
||||
int mu_proc_parser(const char *prog_name, const pid_t pid, struct mu_proc *proc_s);
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue