| /external/rust/crates/num_cpus/.github/workflows/ |
| D | ci.yml | 6 - master 13 ci-pass: 15 runs-on: ubuntu-latest 17 - msrv 18 - test-linux 19 - test-macos 20 - test-windows 21 - build-cross 22 - test-cgroups 24 - run: exit 0 [all …]
|
| /external/ltp/testcases/kernel/controllers/ |
| D | test_controllers.sh | 18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 24 # This file runs the tests for resource management ie to test cpu # 33 # 20/12/07 Sudhir Kumar <sudhirkumarmalik@in.ibm.com> Created this test # 40 if [ -f /proc/cgroups ] 42 CPU_CONTROLLER=`grep -w cpu /proc/cgroups | cut -f1`; 43 CPU_CONTROLLER_VALUE=`grep -w cpu /proc/cgroups | cut -f4`; 44 MEM_CONTROLLER=`grep -w memory /proc/cgroups | cut -f1`; 45 MEM_CONTROLLER_VALUE=`grep -w memory /proc/cgroups | cut -f4`; 46 IOTHROTTLE_CONTROLLER=`grep -w blockio /proc/cgroups | cut -f1`; 47 IOTHROTTLE_CONTROLLER_VALUE=`grep -w blockio /proc/cgroups | cut -f4`; [all …]
|
| /external/ltp/testcases/kernel/controllers/memcg/stress/ |
| D | memcg_stress_test.sh | 2 # SPDX-License-Identifier: GPL-2.0-or-later 4 # Copyright (c) 2018-2019 ARM Ltd. All Rights Reserved. 5 # Copyright (c) 2019-2022 Petr Vorel <pvorel@suse.cz> 11 TST_TESTFUNC=test 18 # Each test case runs for 900 secs when everything fine 32 tst_res TINFO "test starts with cgroup version $cgroup_version" 53 # $1 Number of cgroups 56 # $4 Test duration (sec) 59 local cgroups="$1" 65 tst_res TINFO "Testing $cgroups cgroups, using $mem_size MB, interval $interval" [all …]
|
| /external/ltp/include/ |
| D | tst_cgroup.h | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (c) 2020-2021 SUSE LLC <rpalethorpe@suse.com> 10 * The LTP CGroups API tries to present a consistent interface to the 15 * it is not possible unless no CGroups are currently active and 16 * almost all of our users will have CGroups active. Even if 24 * exists and creats a test group for the current test. In the worst 26 * existing system-manager-created CGroups have been omitted. 32 * (drain) (test-n) (drain) (test-n) ... (drain) (test-n) 49 * The user may pre-create the CGroup hierarchies and the ltp CGroup, 54 * Because the test may not have access to the CGroup root(s), the [all …]
|
| /external/ltp/testcases/kernel/controllers/cgroup_fj/ |
| D | cgroup_fj_function.sh | 2 # SPDX-License-Identifier: GPL-2.0-or-later 5 # Copyright (c) 2015-2016 Cyril Hrubis <chrubis@suse.cz> 9 TST_TESTFUNC=test 26 if [ "$#" -ne "1" ]; then 33 # mv'ing cgroups is not available in cgroup2 35 tst_res TCONF "Controller mounted on cgroup2 hierarchy, skipping test" 55 # mv'ing cgroups is not available in cgroup2 57 tst_res TCONF "Controller mounted on cgroup2 hierarchy, skipping test" 80 # mv'ing cgroups is not available in cgroup2 82 tst_res TCONF "Controller mounted on cgroup2 hierarchy, skipping test" [all …]
|
| /external/linux-kselftest/tools/testing/selftests/cgroup/ |
| D | test_kmem.c | 1 // SPDX-License-Identifier: GPL-2.0 38 "/something-non-existent-with-a-long-name-%64lu-%d", in alloc_dcache() 47 * This test allocates 100000 of negative dentries with long names. 101 int ret = -1; in alloc_kmem_smp() 105 return -1; in alloc_kmem_smp() 111 return -1; in alloc_kmem_smp() 135 return -1; in cg_run_in_subcgroups() 140 return -1; in cg_run_in_subcgroups() 146 return -1; in cg_run_in_subcgroups() 157 * The test creates and destroys a large number of cgroups. In each cgroup it [all …]
|
| D | test_freezer.c | 1 /* SPDX-License-Identifier: GPL-2.0 */ 32 return -1; in cg_check_frozen() 40 return -1; in cg_check_frozen() 62 int fd, ret = -1; in cg_enter_and_wait_for_frozen() 95 int fd, ret = -1; in cg_freeze_wait() 119 * re-parented. 132 * A simple test for the cgroup freezer: populated the cgroup with 100 174 * The test creates the following hierarchy: 246 * corresponding cgroups. in test_cgfreezer_tree() 329 for (i = 9; i >= 0 && cgroup[i]; i--) { in test_cgfreezer_tree() [all …]
|
| /external/ltp/lib/ |
| D | tst_cgroup.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (c) 2020-2021 SUSE LLC <rpalethorpe@suse.com> 27 * This is actually a single-linked list not a tree. We only need to 39 * this field. So it may be different from root->css_field. 61 /* CGroup hierarchy: mnt -> ltp -> {drain, test -> ??? } We 62 * keep a flat reference to ltp, drain and test for 68 /* LTP CGroup directory, contains drain and test dirs */ 72 /* CGroup for current test. Which may have children. */ 80 /* Controller sub-systems */ 153 * populated with the test's CGroup. [all …]
|
| /external/bcc/docs/ |
| D | special_filtering.md | 7 ## Filtering by cgroups 15 # ./opensnoop --cgroupmap /sys/fs/bpf/test01 16 # ./execsnoop --cgroupmap /sys/fs/bpf/test01 17 # ./tcpconnect --cgroupmap /sys/fs/bpf/test01 18 # ./tcpaccept --cgroupmap /sys/fs/bpf/test01 19 # ./tcptracer --cgroupmap /sys/fs/bpf/test01 23 of the cgroups whose id, returned by `bpf_get_current_cgroup_id()`, is in the 36 # systemd-run --pty --unit test bash 40 `/sys/fs/cgroup/unified/system.slice/test.service`. 49 # ./cgroupid hex /sys/fs/cgroup/unified/system.slice/test.service [all …]
|
| /external/ltp/testcases/kernel/controllers/freezer/ |
| D | run_freezer.sh | 17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 #set -x 21 P='ltp-cgroup-freezer' 24 export EXIT_TERMINATE=-1 53 if [ -z "${LTPROOT}" ]; then 61 ## Initialize some LTP variables -- Set _COUNT and _TOTAL to fake values 67 TMPDIR="${TMPDIR:-/tmp}" 78 cat /proc/filesystems | grep -E '\bcgroup\b' > /dev/null 2>&1 || { 79 tst_resm TINFO "Kernel does not support cgroups. Skipping." 84 if [ ! -f /proc/cgroups ]; then [all …]
|
| D | README | 2 Test Suite for the Control Group Freezer and Signal Subsystems 9 ------ 15 freeze tasks in cgroups before doing a suspend. 17 The common case is embodied in the freeze_thaw.sh test file. However, 18 the scripts are also designed to test a few obscure cases such as: 19 freeze self -- freeze the control group that the current process is 21 freeze cancellation -- freeze but then backout of the freeze processing 23 signalling freezing/frozen tasks -- this should delay delivery of the 25 vfork -- The vfork system call introduces an obscure special case for 26 the freezer kernel code. This test case attempts to trigger any [all …]
|
| /external/ltp/testcases/kernel/controllers/cgroup_xattr/ |
| D | cgroup_xattr.c | 2 * Copyright (c) 2013-2015 Oracle and/or its affiliates. All Rights Reserved. 16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 21 * Test checks following preconditions: 38 #include "test.h" 43 static const char subdir_name[] = "test"; 68 { .name = "trusted.test", .good = 1, }, 87 * When test breaks, all open dirs should be closed 94 /* test options */ 136 printf(" -n x Write x bytes to xattr value, default is %d\n", in help() 138 printf(" -s Skip cleanup\n"); in help() [all …]
|
| /external/rust/crates/num_cpus/src/ |
| D | linux.rs | 32 pub fn get_num_cpus() -> usize { in get_num_cpus() 39 fn logical_cpus() -> usize { in logical_cpus() 59 pub fn get_num_physical_cpus() -> usize { in get_num_physical_cpus() 103 /// Cached CPUs calculated from cgroups. 110 fn cgroups_num_cpus() -> Option<usize> { in cgroups_num_cpus() 146 fn load_cgroups<P1, P2>(cgroup_proc: P1, mountinfo_proc: P2) -> Option<usize> in load_cgroups() 180 fn new(version: CgroupVersion, dir: PathBuf) -> Cgroup { in new() 184 fn translate(mntinfo: MountInfo, subsys: Subsys) -> Option<Cgroup> { in translate() 201 fn cpu_quota(&self) -> Option<usize> { in cpu_quota() 213 // the available CPUs, and flooring would leave a CPU un-utilized. in cpu_quota() [all …]
|
| /external/ltp/lib/newlib_tests/ |
| D | tst_cgroup01.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 11 {"v", &only_mount_v1, "-v\tOnly try to mount CGroups V1"}, 12 {"n", &no_cleanup, "-n\tLeave CGroups created by test"}, 45 static struct tst_test test = { variable
|
| D | tst_cgroup02.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 12 {"v", &only_mount_v1, "-v\tOnly try to mount CGroups V1"}, 13 {"n", &no_cleanup, "-n\tLeave CGroups created by test"}, 36 "%zu", (1UL << 24) - 1); in do_test() 47 SAFE_CG_PRINTF(tst_cg, "memory.max", "%zu", (1UL << 24) - 1); in do_test() 81 static struct tst_test test = { variable
|
| /external/ltp/testcases/kernel/controllers/cpuset/ |
| D | cpuset_funcs.sh | 3 # functions for cpuset test 21 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## 27 . test.sh 32 if [ -f "/sys/devices/system/node/has_high_memory" ]; then 42 if [ "${item#*-*}" != "$item" ]; then 43 delta=$((${item#*-*} - ${item%*-*} + 1)) 45 final_node=${item#*-*} 54 final_cpu=${item#*-*} 84 if [ $NR_CPUS -lt $1 ]; then 87 # check online cpus whether match 0-num [all …]
|
| D | cpuset_regression_test.sh | 2 # SPDX-License-Identifier: GPL-2.0-or-later 3 # Copyright (c) Linux Test Project, 2016-2022 7 # This is a regression test for commit: 15 TST_TESTFUNC=test 32 find ${root_cpuset_dir} -mindepth 1 -type d -exec echo 1 \; -quit 41 find . -mindepth 2 -name ${what} | 43 sort -n | cut -d " " -f 2- 52 find . -mindepth 2 -name ${what} | 54 sort -nr | cut -d " " -f 2- 67 local cpu_max=$((cpu_num - 1)) [all …]
|
| /external/bcc/man/man8/ |
| D | capable.8 | 1 .TH capable 8 "2020-03-08" "USER COMMANDS" 3 capable \- Trace security capability checks (cap_capable()). 5 .B capable [\-h] [\-v] [\-p PID] [\-K] [\-U] [\-x] [\-\-cgroupmap MAPPATH] 6 [\-\-mntnsmap MAPPATH] [--unique] 16 \-h 19 \-v 20 Include non-audit capability checks. These are those deemed not interesting and 24 \-K 27 \-U 28 Include user-space stack traces to the output. [all …]
|
| D | tcptracer.8 | 1 .TH tcptracer 8 "2020-02-20" "USER COMMANDS" 3 tcptracer \- Trace TCP established connections. Uses Linux eBPF/bcc. 5 .B tcptracer [\-h] [\-v] [\-p PID] [\-N NETNS] [\-\-cgroupmap MAPPATH] [--mntnsmap MAPPATH] [\-4 | … 20 \-h 23 \-v 26 \-p PID 27 Trace this process ID only (filtered in-kernel). 29 \-N NETNS 30 Trace this network namespace only (filtered in-kernel). 32 \-\-cgroupmap MAPPATH [all …]
|
| D | tcpaccept.8 | 1 .TH tcpaccept 8 "2020-02-20" "USER COMMANDS" 3 tcpaccept \- Trace TCP passive connections (accept()). Uses Linux eBPF/bcc. 5 .B tcpaccept [\-h] [\-T] [\-t] [\-p PID] [\-P PORTS] [\-4 | \-6] [\-\-cgroupmap MAPPATH] [\-\-mntns… 22 \-h 25 \-T 28 \-t 31 \-p PID 32 Trace this process ID only (filtered in-kernel). 34 \-P PORTS 35 Comma-separated list of local ports to trace (filtered in-kernel). [all …]
|
| D | opensnoop.8 | 1 .TH opensnoop 8 "2020-02-20" "USER COMMANDS" 3 opensnoop \- Trace open() syscalls. Uses Linux eBPF/bcc. 5 .B opensnoop.py [\-h] [\-T] [\-U] [\-x] [\-p PID] [\-t TID] [\-u UID] 6 [\-d DURATION] [\-n NAME] [\-e] [\-f FLAG_FILTER] 7 [--cgroupmap MAPPATH] [--mntnsmap MAPPATH] 26 \-h 29 \-T 32 \-U 35 \-x 38 \-p PID [all …]
|
| D | execsnoop.8 | 1 .TH execsnoop 8 "2020-02-20" "USER COMMANDS" 3 execsnoop \- Trace new processes via exec() syscalls. Uses Linux eBPF/bcc. 5 .B execsnoop [\-h] [\-T] [\-t] [\-x] [\-\-cgroupmap CGROUPMAP] [\-\-mntnsmap MAPPATH] 6 .B [\-u USER] [\-q] [\-n NAME] [\-l LINE] [\-U] [\-\-max-args MAX_ARGS] 12 This catches new processes that follow the fork->exec sequence, as well as 13 processes that re-exec() themselves. Some applications fork() but do not 25 \-h 28 \-T 31 \-U 34 \-t [all …]
|
| D | tcptop.8 | 1 .TH tcptop 8 "2020-03-08" "USER COMMANDS" 3 tcptop \- Summarize TCP send/recv throughput by host. Top for TCP. 5 .B tcptop [\-h] [\-C] [\-S] [\-p PID] [\-\-cgroupmap MAPPATH] 6 [--mntnsmap MAPPATH] [interval] [count] [\-4 | \-6] 11 refreshes, along other system-wide metrics. 17 per-packet functions, and therefore have lower overhead. The traced data is 18 summarized in-kernel using a BPF map to further reduce overhead. At very high 27 \-h 30 \-C 33 \-S [all …]
|
| D | tcpconnect.8 | 1 .TH tcpconnect 8 "2020-02-20" "USER COMMANDS" 3 tcpconnect \- Trace TCP active connections (connect()). Uses Linux eBPF/bcc. 5 .B tcpconnect [\-h] [\-c] [\-t] [\-p PID] [-P PORT] [\-4 | \-6] [\-L] [-u UID] [-U] [\-\-cgroupmap … 17 When provided with the \-d or \-\-dns option, this tool will also correlate 26 If using the \-d or \-\-dns option, you must have the 28 apt on Ubuntu 18.04+ using the python3\-dnslib and python3\-cachetools packages. 31 \-h 34 \-t 37 \-c 40 \-p PID [all …]
|
| /external/ltp/testcases/kernel/controllers/cgroup/ |
| D | cgroup_regression_test.sh | 2 # SPDX-License-Identifier: GPL-2.0-or-later 3 # Copyright (c) 2019-2022 Petr Vorel <pvorel@suse.cz> 7 TST_TESTFUNC=test 19 if [ ! -f /proc/cgroups ]; then 23 dmesg -c > /dev/null 24 NR_BUG=`dmesg | grep -c "kernel BUG"` 25 NR_NULL=`dmesg | grep -c "kernel NULL pointer dereference"` 26 NR_WARNING=`dmesg | grep -c "^WARNING"` 27 NR_LOCKDEP=`dmesg | grep -c "possible recursive locking detected"` 32 if mountpoint -q cgroup/; then [all …]
|