remove CLI options

This commit is contained in:
Alexey Avramov
2019-01-14 20:49:03 +09:00
parent e62629d57d
commit dc1bdddb6f
3 changed files with 28 additions and 41 deletions

19
nohang
View File

@@ -2,13 +2,18 @@
"""A daemon that prevents OOM in Linux systems."""
from time import sleep, time
start_time = time()
# start_time = time()
import os
from operator import itemgetter
'''
# this is most slow import
from argparse import ArgumentParser
'''
from sys import stdout
from signal import SIGKILL, SIGTERM, SIGSTOP, SIGCONT
@@ -26,8 +31,8 @@ else:
wait_time = 14
max_sleep_time = 1
min_sleep_time = 0.02
max_sleep_time = 2
min_sleep_time = 0.1
notify_helper_path = '/usr/bin/nohang_notify_helper'
@@ -37,7 +42,7 @@ psi_support = os.path.exists(psi_path)
debug = False
stop_cont = True
stop_cont = False
print_states_debug = False
@@ -1035,7 +1040,7 @@ except ValueError:
##########################################################################
'''
# Configurations
@@ -1088,9 +1093,11 @@ else:
print("File {} doesn't exists{}".format(
arg_config, conf_err_mess))
exit()
'''
config = '/etc/nohang/nohang.conf'
print('The path to the config:', config)
print('Config:', config)
##########################################################################