From bbb441ecdc5f58eb81a1706c7d0190b793ef7520 Mon Sep 17 00:00:00 2001 From: Alexey Avramov Date: Thu, 4 Apr 2019 18:03:50 +0900 Subject: [PATCH] update readme --- README.md | 2 +- trash/oom-trigger | 35 ----------------------------------- 2 files changed, 1 insertion(+), 36 deletions(-) diff --git a/README.md b/README.md index 7ec48e6..5a6e983 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ optional arguments: -h, --help show this help message and exit -v, --version print version -t, --test print some tests - --ppt, --print-proc-table + -p, --print-proc-table print table of processes with their badness values -c CONFIG, --config CONFIG path to the config file, default values: diff --git a/trash/oom-trigger b/trash/oom-trigger index 39db963..56881d5 100755 --- a/trash/oom-trigger +++ b/trash/oom-trigger @@ -2,41 +2,6 @@ # интерактивный oom-trigger - - -from ctypes import CDLL - - - - -def mlockall(): - """Lock all memory to prevent swapping nohang process.""" - - MCL_CURRENT = 1 - MCL_FUTURE = 2 - MCL_ONFAULT = 4 - - libc = CDLL('libc.so.6', use_errno=True) - - result = libc.mlockall( - MCL_CURRENT | MCL_FUTURE | MCL_ONFAULT - ) - if result != 0: - result = libc.mlockall( - MCL_CURRENT | MCL_FUTURE - ) - if result != 0: - log('Cannot lock all memory') - else: - log('All memory locked with MCL_CURRENT | MCL_FUTURE') - else: - log('All memory locked with MCL_CURRENT | MCL_FUTURE | MCL_ONFAULT') - - -mlockall() - - - from memco import * # печать показателей на этапах работы