fix --version
This commit is contained in:
parent
42fe5da421
commit
34b35bf7ef
53
nohang
53
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:
|
||||
|
Loading…
Reference in New Issue
Block a user