fixes
This commit is contained in:
		| @@ -309,7 +309,7 @@ $ETC apache2 /// systemctl restart apache2 | ||||
|     See also wiki.archlinux.org/index.php/Desktop_notifications | ||||
|     Valid values are True and False. | ||||
|  | ||||
| gui_notifications = True | ||||
| gui_notifications = False | ||||
|  | ||||
|     Enable GUI notifications about the low level of available memory. | ||||
|     Valid values are True and False. | ||||
| @@ -358,7 +358,7 @@ print_mem_check_results = False | ||||
|     0 - печатать все проверки памяти. | ||||
|     Неотрицательное число. | ||||
|  | ||||
| min_mem_report_interval = 10 | ||||
| min_mem_report_interval = 60 | ||||
|  | ||||
|     Print sleep periods between memory checks. | ||||
|     Valid values are True and False. | ||||
|   | ||||
| @@ -7,8 +7,8 @@ Documentation=man:nohang(1) https://github.com/hakavlad/nohang | ||||
| ExecStart=/usr/sbin/nohang --config /etc/nohang/nohang.conf | ||||
| Slice=nohang.slice | ||||
| Restart=always | ||||
| MemoryMax=20M | ||||
| TasksMax=10 | ||||
| MemoryMax=50M | ||||
| TasksMax=20 | ||||
| OOMScoreAdjust=-5 | ||||
| Nice=-20 | ||||
| IOSchedulingClass=1 | ||||
|   | ||||
| @@ -1,7 +1,4 @@ | ||||
| #!/usr/bin/env python3 | ||||
| # | ||||
| # Usage: | ||||
| #   ./nohang_notify_helper "title" "body" | ||||
|  | ||||
| from os import listdir, path | ||||
| from subprocess import Popen, TimeoutExpired | ||||
| @@ -122,6 +119,7 @@ if list_len > 0: | ||||
|         display_value = display_tuple[2] | ||||
|         dbus_value = dbus_tuple[2] | ||||
|  | ||||
|         try: | ||||
|             with Popen([ | ||||
|                 'sudo', '-u', username, | ||||
|                 'env', | ||||
| @@ -137,6 +135,8 @@ if list_len > 0: | ||||
|                 except TimeoutExpired: | ||||
|                     proc.kill() | ||||
|                     print('TimeoutExpired: notify user:' + username) | ||||
|         except BlockingIOError: | ||||
|             print('nohang_notify_helper: BlockingIOError') | ||||
| else: | ||||
|     print( | ||||
|         'Not send GUI notification: [', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alexey Avramov
					Alexey Avramov