Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
mxq
Public
Notifications
You must be signed in to change notification settings
Fork
3
Star
3
Code
Issues
20
Pull requests
3
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
b636630
helper
manpages
mysql
web
.gitignore
.vimrc
Doxyfile
LICENSE
Makefile
README.md
keywordset.c
keywordset.h
mx_flock.c
mx_flock.h
mx_getopt.c
mx_getopt.h
mx_log.c
mx_log.h
mx_mysql.c
mx_mysql.h
mx_proc.c
mx_proc.h
mx_util.c
mx_util.h
mxq.h
mxq_daemon.c
mxq_daemon.h
mxq_group.c
mxq_group.h
mxq_job.c
mxq_job.h
mxq_log.c
mxq_reaper.c
mxqadmin.c
mxqd.c
mxqd.h
mxqd_control.c
mxqd_control.h
mxqdctl-hostconfig.sh
mxqdump.c
mxqkill.c
mxqps.c
mxqset.c
mxqsub.c
os-release
parser.y
ppidcache.c
ppidcache.h
test_keywordset.c
test_mx_log.c
test_mx_mysql.c
test_mx_util.c
test_mxqd_control.c
test_parser.c
xmalloc.h
Breadcrumbs
mxq
/
mx_proc.h
Blame
Blame
Latest commit
History
History
89 lines (74 loc) · 3.01 KB
Breadcrumbs
mxq
/
mx_proc.h
Top
File metadata and controls
Code
Blame
89 lines (74 loc) · 3.01 KB
Raw
#ifndef __MX_PROC_H__ #define __MX_PROC_H__ 1 #include <sys/types.h> struct mx_proc_info { struct mx_proc_pid_stat *pstat; unsigned long long int sum_rss_anon; }; struct mx_proc_tree { struct mx_proc_tree_node *root; int nentries; }; struct mx_proc_tree_node { struct mx_proc_tree_node *parent; struct mx_proc_tree_node *next; struct mx_proc_info pinfo; unsigned long long int nchilds; struct mx_proc_tree_node *childs; }; struct mx_proc_pid_stat { long long int pid; /* 1 */ char *comm; /* 2 (comm) */ char state; /* 3 "RSDZTW" */ long long int ppid; /* 4 */ long long int pgrp; /* 5 */ long long int session; /* 6 */ long long int tty_nr; /* 7 */ long long int tpgid; /* 8 */ unsigned long long int flags; /* 9 */ unsigned long long int minflt; /* 10 */ unsigned long long int cminflt; /* 11 */ unsigned long long int majflt; /* 12 */ unsigned long long int cmajflt; /* 13 */ unsigned long long int utime; /* 14 */ unsigned long long int stime; /* 15 */ long long int cutime; /* 16 */ long long int cstime; /* 17 */ long long int priority; /* 18 */ long long int nice; /* 19 */ long long int num_threads; /* 20 */ long long int itrealvalue; /* 21 */ unsigned long long int starttime; /* 22 */ unsigned long long int vsize; /* 23 */ long long int rss; /* 24 */ unsigned long long int rsslim; /* 25 */ unsigned long long int startcode; /* 26 */ unsigned long long int endcode; /* 27 */ unsigned long long int startstack; /* 28 */ unsigned long long int kstkesp; /* 29 */ unsigned long long int kstkeip; /* 30 */ unsigned long long int signal; /* 31 */ unsigned long long int blocked; /* 32 */ unsigned long long int sigignore; /* 33 */ unsigned long long int sigcatch; /* 34 */ unsigned long long int wchan; /* 35 */ unsigned long long int nswap; /* 36 */ unsigned long long int cnswap; /* 37 */ long long int exit_signal; /* 38 */ long long int processor; /* 39 */ unsigned long long int rt_priority; /* 40 */ unsigned long long int policy; /* 41 */ unsigned long long int delayacct_blkio_ticks; /* 42 */ unsigned long long int guest_time; /* 43 */ long long int cguest_time; /* 44 */ unsigned long long int rss_anon; /* from /proc/PID/status. may be null (kernel thread). unit: bytes */ }; int mx_proc_pid_stat_read(struct mx_proc_pid_stat *pps, char *fmt, ...); int mx_proc_pid_stat(struct mx_proc_pid_stat **pps, pid_t pid); void mx_proc_pid_stat_free_content(struct mx_proc_pid_stat *pps); int mx_proc_tree(struct mx_proc_tree **newtree); int mx_proc_tree_free(struct mx_proc_tree **tree); struct mx_proc_info *mx_proc_tree_proc_info(struct mx_proc_tree *tree, pid_t pid); pid_t mx_proc_get_parent(pid_t pid); char *mx_proc_get_comm(pid_t pid, char *buf); #endif
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
You can’t perform that action at this time.