diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2008-08-07 14:52:17 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2008-08-07 14:52:17 -0300 |
commit | c53373f1645fae123f97c00a846e22b0f5d5cd4e (patch) | |
tree | 9fb4e8812322bf1526815fd26c948f4f5350b7bb | |
parent | ae9b8b50537f77c564426e7668344cd90b2271a0 (diff) | |
download | tuna-c53373f1645fae123f97c00a846e22b0f5d5cd4e.tar.gz |
tuna_gui: Provide instructions on how to use the generated rtctl file
And ask the user if he/she wants to save it in /etc/rtgroups if the user didn't
selected it already.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tuna/tuna_gui.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tuna/tuna_gui.py b/tuna/tuna_gui.py index d63dbf6..d1da3e2 100644 --- a/tuna/tuna_gui.py +++ b/tuna/tuna_gui.py @@ -1146,6 +1146,31 @@ class procview: kthreads = tuna.get_kthread_sched_tunings(self.ps) tuna.generate_rtgroups(filename, kthreads) + if filename != "/etc/rtgroups": + dialog = gtk.MessageDialog(None, + gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, + gtk.MESSAGE_INFO, + gtk.BUTTONS_YES_NO, + "Kernel thread tunings saved!\n\n" + "Now you can use it with rtctl:\n\n" + "rtctl --file %s reset\n\n" + "If you want the changes to be in " + "effect everytime you boot the system " + "please move %s to /etc/rtgroups\n\n" + "Do you want do do that now?" % (filename, filename)) + response = dialog.run() + dialog.destroy() + if response == gtk.RESPONSE_YES: + tuna.generate_rtgroups("/etc/rtgroups", kthreads) + + dialog = gtk.MessageDialog(None, + gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, + gtk.MESSAGE_INFO, + gtk.BUTTONS_OK, + "Kernel thread tunings saved to /etc/rtgroups!") + dialog.run() + dialog.destroy() + def on_processlist_button_press_event(self, treeview, event): if event.type != gtk.gdk.BUTTON_PRESS or event.button != 3: return |