fix --version
This commit is contained in:
parent
42fe5da421
commit
34b35bf7ef
53
nohang
53
nohang
@ -62,25 +62,18 @@ stat_dict = dict()
|
|||||||
# define functions
|
# define functions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def print_version():
|
def print_version():
|
||||||
try:
|
try:
|
||||||
v = rline1('/etc/nohang/version')
|
v = rline1('/etc/nohang/version')
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
v = None
|
v = None
|
||||||
if v is None:
|
if v is None:
|
||||||
print('nohang unknown version')
|
print('Nohang unknown version')
|
||||||
else:
|
else:
|
||||||
print(v)
|
print('Nohang ' + v)
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def test():
|
def test():
|
||||||
|
|
||||||
print(sys.version)
|
print(sys.version)
|
||||||
@ -111,7 +104,6 @@ def test():
|
|||||||
print("pid_to_state('2')")
|
print("pid_to_state('2')")
|
||||||
print(pid_to_state('2'))
|
print(pid_to_state('2'))
|
||||||
|
|
||||||
|
|
||||||
'''
|
'''
|
||||||
print(hr)
|
print(hr)
|
||||||
print("update_stat_dict_and_print('key')")
|
print("update_stat_dict_and_print('key')")
|
||||||
@ -1247,11 +1239,6 @@ def calculate_percent(arg_key):
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if len(argv) == 1:
|
if len(argv) == 1:
|
||||||
if os.path.exists('./nohang.conf'):
|
if os.path.exists('./nohang.conf'):
|
||||||
config = cd = os.getcwd() + '/nohang.conf'
|
config = cd = os.getcwd() + '/nohang.conf'
|
||||||
@ -1282,14 +1269,6 @@ else:
|
|||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
|
|
||||||
@ -1365,7 +1344,6 @@ uid_re_list = []
|
|||||||
etc_dict = dict()
|
etc_dict = dict()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(config) as f:
|
with open(config) as f:
|
||||||
|
|
||||||
@ -1733,30 +1711,6 @@ if max_sleep_time < min_sleep_time:
|
|||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Get KiB levels if it's possible.
|
# Get KiB levels if it's possible.
|
||||||
|
|
||||||
# получ кб. если не кб - то процент. Если процент - находим кб ниже на
|
# получ кб. если не кб - то процент. Если процент - находим кб ниже на
|
||||||
@ -1960,9 +1914,6 @@ if print_mem_check_results:
|
|||||||
report0 = 0
|
report0 = 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|
||||||
if psi_support and not ignore_psi:
|
if psi_support and not ignore_psi:
|
||||||
|
Loading…
Reference in New Issue
Block a user