Skip to content

Commit dc0b95d

Browse files
committed
Prepare for version 2.11
1 parent 46e44d3 commit dc0b95d

File tree

3 files changed

+629
-0
lines changed

3 files changed

+629
-0
lines changed

prev/cgroups_211.h

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// structure containing general info and metrics per cgroup (directory)
2+
//
3+
struct cstat_211 {
4+
// GENERAL INFO
5+
struct cggen_211 {
6+
int structlen; // struct length including rounded name
7+
int sequence; // sequence number in chain/array
8+
int parentseq; // parent sequence number in chain/array
9+
int depth; // cgroup tree depth starting from 0
10+
int nprocs; // number of processes in cgroup
11+
int procsbelow; // number of processes in cgroups below
12+
int namelen; // cgroup name length (at end of struct)
13+
int fullnamelen; // cgroup path length
14+
int ifuture[4];
15+
16+
long namehash; // cgroup name hash of
17+
// full path name excluding slashes
18+
long lfuture[4];
19+
} gen;
20+
21+
// CONFIGURATION INFO
22+
struct cgconf_211 {
23+
int cpuweight; // -1=max, -2=undefined
24+
int cpumax; // -1=max, -2=undefined (perc)
25+
26+
count_t memmax; // -1=max, -2=undefined (pages)
27+
count_t swpmax; // -1=max, -2=undefined (pages)
28+
29+
int dskweight; // -1=max, -2=undefined
30+
31+
int ifuture[5];
32+
count_t cfuture[5];
33+
} conf;
34+
35+
// CPU STATISTICS
36+
struct cgcpu_211 {
37+
count_t utime; // time user text (usec) -1=undefined
38+
count_t stime; // time system text (usec) -1=undefined
39+
40+
count_t somepres; // some pressure (microsec)
41+
count_t fullpres; // full pressure (microsec)
42+
43+
count_t cfuture[5];
44+
} cpu;
45+
46+
// MEMORY STATISTICS
47+
struct cgmem_211 {
48+
count_t current; // current memory (pages) -1=undefined
49+
count_t anon; // anonymous memory (pages) -1=undefined
50+
count_t file; // file memory (pages) -1=undefined
51+
count_t kernel; // kernel memory (pages) -1=undefined
52+
count_t shmem; // shared memory (pages) -1=undefined
53+
54+
count_t somepres; // some pressure (microsec)
55+
count_t fullpres; // full pressure (microsec)
56+
57+
count_t cfuture[5];
58+
} mem;
59+
60+
// DISK I/O STATISTICS
61+
struct cgdsk_211 {
62+
count_t rbytes; // total bytes read on all physical disks
63+
count_t wbytes; // total bytes written on all physical disks
64+
count_t rios; // total read I/Os on all physical disks
65+
count_t wios; // total write I/Os on all physical disks
66+
67+
count_t somepres; // some pressure (microsec)
68+
count_t fullpres; // full pressure (microsec)
69+
70+
count_t cfuture[5];
71+
} dsk;
72+
73+
// cgroup name with variable length
74+
char cgname[];
75+
};

prev/photoproc_211.h

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
/*
2+
** structure containing only relevant process-info extracted
3+
** from kernel's process-administration
4+
*/
5+
struct tstat_211 {
6+
/* GENERAL TASK INFO */
7+
struct gen_211 {
8+
int tgid; /* threadgroup identification */
9+
int pid; /* process identification */
10+
int ppid; /* parent process identification*/
11+
int ruid; /* real user identification */
12+
int euid; /* eff. user identification */
13+
int suid; /* saved user identification */
14+
int fsuid; /* fs user identification */
15+
int rgid; /* real group identification */
16+
int egid; /* eff. group identification */
17+
int sgid; /* saved group identification */
18+
int fsgid; /* fs group identification */
19+
int nthr; /* number of threads in tgroup */
20+
char name[PNAMLEN+1];/* process name string */
21+
char isproc; /* boolean: process level? */
22+
char state; /* process state ('E' = exited) */
23+
int excode; /* process exit status */
24+
time_t btime; /* process start time (epoch) */
25+
time_t elaps; /* process elaps time (hertz) */
26+
char cmdline[CMDLEN+1];/* command-line string */
27+
int nthrslpi; /* # threads in state 'S' */
28+
int nthrslpu; /* # threads in state 'D' */
29+
int nthrrun; /* # threads in state 'R' */
30+
int nthridle; /* # threads in state 'I' */
31+
32+
int ctid; /* OpenVZ container ID */
33+
int vpid; /* OpenVZ virtual PID */
34+
35+
int wasinactive; /* boolean: task inactive */
36+
37+
char utsname[UTSLEN+1];/* UTS name container or pod */
38+
39+
int cgroupix; /* index in devchain -1=invalid */
40+
/* lazy filling (parsable/json) */
41+
int ifuture[4]; /* reserved for future use */
42+
} gen;
43+
44+
/* CPU STATISTICS */
45+
struct cpu_211 {
46+
count_t utime; /* time user text (ticks) */
47+
count_t stime; /* time system text (ticks) */
48+
int nice; /* nice value */
49+
int prio; /* priority */
50+
int rtprio; /* realtime priority */
51+
int policy; /* scheduling policy */
52+
int curcpu; /* current processor */
53+
int sleepavg; /* sleep average percentage */
54+
int ifuture[6]; /* reserved for future use */
55+
char wchan[16]; /* wait channel string */
56+
count_t rundelay; /* schedstat rundelay (nanosec) */
57+
count_t blkdelay; /* blkio delay (ticks) */
58+
count_t nvcsw; /* voluntary cxt switch counts */
59+
count_t nivcsw; /* involuntary csw counts */
60+
count_t cfuture[3]; /* reserved for future use */
61+
} cpu;
62+
63+
/* DISK STATISTICS */
64+
struct dsk_211 {
65+
count_t rio; /* number of read requests */
66+
count_t rsz; /* cumulative # sectors read */
67+
count_t wio; /* number of write requests */
68+
count_t wsz; /* cumulative # sectors written */
69+
count_t cwsz; /* cumulative # written sectors */
70+
/* being cancelled */
71+
count_t cfuture[4]; /* reserved for future use */
72+
} dsk;
73+
74+
/* MEMORY STATISTICS */
75+
struct mem_211 {
76+
count_t minflt; /* number of page-reclaims */
77+
count_t majflt; /* number of page-faults */
78+
count_t vexec; /* virtmem execfile (Kb) */
79+
count_t vmem; /* virtual memory (Kb) */
80+
count_t rmem; /* resident memory (Kb) */
81+
count_t pmem; /* resident memory (Kb) */
82+
count_t vgrow; /* virtual growth (Kb) */
83+
count_t rgrow; /* resident growth (Kb) */
84+
count_t vdata; /* virtmem data (Kb) */
85+
count_t vstack; /* virtmem stack (Kb) */
86+
count_t vlibs; /* virtmem libexec (Kb) */
87+
count_t vswap; /* swap space used (Kb) */
88+
count_t vlock; /* virtual locked (Kb) */
89+
count_t cfuture[7]; /* reserved for future use */
90+
} mem;
91+
92+
/* NETWORK STATISTICS */
93+
struct net_211 {
94+
count_t tcpsnd; /* number of TCP-packets sent */
95+
count_t tcpssz; /* cumulative size packets sent */
96+
count_t tcprcv; /* number of TCP-packets recved */
97+
count_t tcprsz; /* cumulative size packets rcvd */
98+
count_t udpsnd; /* number of UDP-packets sent */
99+
count_t udpssz; /* cumulative size packets sent */
100+
count_t udprcv; /* number of UDP-packets recved */
101+
count_t udprsz; /* cumulative size packets sent */
102+
count_t avail1; /* */
103+
count_t avail2; /* */
104+
count_t cfuture[4]; /* reserved for future use */
105+
} net;
106+
107+
struct gpu_211 {
108+
char state; // A - active, E - Exit, '\0' - no use
109+
char bfuture[3]; //
110+
short nrgpus; // number of GPUs for this process
111+
int32_t gpulist; // bitlist with GPU numbers
112+
113+
int gpubusy; // gpu busy perc process lifetime -1 = n/a
114+
int membusy; // memory busy perc process lifetime -1 = n/a
115+
count_t timems; // milliseconds accounting -1 = n/a
116+
// value 0 for active process,
117+
// value > 0 after termination
118+
119+
count_t memnow; // current memory consumption in KiB
120+
count_t memcum; // cumulative memory consumption in KiB
121+
count_t sample; // number of samples
122+
count_t cfuture[3]; //
123+
} gpu;
124+
};

0 commit comments

Comments
 (0)