From 34b35bf7ef39784f7d2e39e32d1e5fad1c4e0f20 Mon Sep 17 00:00:00 2001 From: Alexey Avramov Date: Wed, 6 Mar 2019 02:38:32 +0900 Subject: [PATCH] fix --version --- nohang | 53 ++--------------------------------------------------- 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/nohang b/nohang index 181b6ce..5aa96cb 100755 --- a/nohang +++ b/nohang @@ -62,25 +62,18 @@ stat_dict = dict() # define functions - def print_version(): try: v = rline1('/etc/nohang/version') except FileNotFoundError: v = None if v is None: - print('nohang unknown version') + print('Nohang unknown version') else: - print(v) + print('Nohang ' + v) exit() - - - - - - def test(): print(sys.version) @@ -111,7 +104,6 @@ def test(): print("pid_to_state('2')") print(pid_to_state('2')) - ''' print(hr) print("update_stat_dict_and_print('key')") @@ -1247,11 +1239,6 @@ def calculate_percent(arg_key): ########################################################################## - - - - - if len(argv) == 1: if os.path.exists('./nohang.conf'): config = cd = os.getcwd() + '/nohang.conf' @@ -1282,14 +1269,6 @@ else: exit(1) - - - - - - - - ########################################################################## @@ -1365,7 +1344,6 @@ uid_re_list = [] etc_dict = dict() - try: with open(config) as f: @@ -1733,30 +1711,6 @@ if max_sleep_time < min_sleep_time: ########################################################################## - - - - - - - - - - - - - - - - - - - - - - - - # Get KiB levels if it's possible. # получ кб. если не кб - то процент. Если процент - находим кб ниже на @@ -1960,9 +1914,6 @@ if print_mem_check_results: report0 = 0 - - - while True: if psi_support and not ignore_psi: