-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocdata.h
33 lines (30 loc) · 957 Bytes
/
procdata.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* Author: Mark Musante
* Class: BU MET CS671, Spring 2015
*/
#ifndef _PROCDATA_H
#define _PROCDATA_H
/*
* Struct: per-process data
*/
typedef struct procdata_s {
pid_t pid; // process pid
pid_t ppid; // parent process pid
pid_t pgrp; // process group
unsigned long long starttime; // start time (tv_sec)
double utime; // user-time in seconds
double stime; // system-time in seconds
unsigned long long rss; // rss size in bytes
unsigned long long text; // text size in bytes
unsigned long long data; // data size in bytes
unsigned long long shared; // shared size in bytes
unsigned long long library; // library size in bytes
unsigned long majflt; // major page faults
unsigned long minflt; // minor page faults
uid_t ruid; // real user id
uid_t euid; // effective user id
gid_t rgid; // real group id
gid_t egid; // effective group id
char *command; // full command
} procdata_t;
#endif /* _PROCDATA_H */