-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathread_cgroup.sh
executable file
·84 lines (80 loc) · 1.69 KB
/
read_cgroup.sh
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
#!/bin/bash
# Specify the path to your cgroup directory
CGROUP_PATH="/sys/fs/cgroup/fukumu"
# List of files to read
FILES=(
"cgroup.controllers"
"cgroup.type"
"cpuset.mems.effective"
"io.pressure"
"memory.min"
"memory.swap.peak"
"cgroup.events"
"cpu.idle"
"cpu.stat"
"io.prio.class"
"memory.numa_stat"
"memory.zswap.current"
"cgroup.freeze"
"cpu.max"
"cpu.stat.local"
"io.stat"
"memory.oom.group"
"memory.zswap.max"
"cgroup.kill"
"cpu.max.burst"
"cpu.uclamp.max"
"io.weight"
"memory.peak"
"memory.zswap.writeback"
"cgroup.max.depth"
"cpu.pressure"
"cpu.uclamp.min"
"irq.pressure"
"memory.pressure"
"pids.current"
"cgroup.max.descendants"
"cpuset.cpus"
"cpu.weight"
"memory.current"
"memory.reclaim"
"pids.events"
"cgroup.pressure"
"cpuset.cpus.effective"
"cpu.weight.nice"
"memory.events"
"memory.stat"
"pids.max"
"cgroup.procs"
"cpuset.cpus.exclusive"
"io.bfq.weight"
"memory.events.local"
"memory.swap.current"
"pids.peak"
"cgroup.stat"
"cpuset.cpus.exclusive.effective"
"io.latency"
"memory.high"
"memory.swap.events"
"cgroup.subtree_control"
"cpuset.cpus.partition"
"io.low"
"memory.low"
"memory.swap.high"
"cgroup.threads"
"cpuset.mems"
"io.max"
"memory.max"
"memory.swap.max"
)
# Loop through each file and print its contents
for FILE in "${FILES[@]}"; do
FILE_PATH="${CGROUP_PATH}/${FILE}"
if [ -f "$FILE_PATH" ]; then
echo "Contents of $FILE:"
cat "$FILE_PATH"
echo
else
echo "File $FILE does not exist."
fi
done