3

In Linux I think there is a mechanism to kill the application.

I want to know what is in the condition that will cause an application to be killed?

For example, I think that there are insufficient memory, a certain number of application launches, and so on.

Control group (cgroups) which supported by Linux kernel permitting to limit resource used for an application. (memory, bandwidth, disk, …). Once a particular app exceeds the permitted resource, it will be automatically killed.

How to enable it?

1 Answer 1

1

Make following modification to do_configure_append() in linux-kernel.bb.

# cgroups
kernel_configure_variable CGROUPS y
kernel_configure_variable CGROUP_FREEZER y
kernel_configure_variable CGROUP_PIDS y
kernel_configure_variable CGROUP_DEVICE y
kernel_configure_variable CPUSETS y
kernel_configure_variable PROC_PID_CPUSET y
kernel_configure_variable CGROUP_CPUACCT y
kernel_configure_variable PAGE_COUNTER y
kernel_configure_variable MEMCG y
kernel_configure_variable CGROUP_SCHED y

kernel_configure_variable NAMESPACES y

# overlay fs
kernel_configure_variable OVERLAY_FS y

enter image description here

References:

https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/resource_management_guide

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.