GNOME Bugzilla – Bug 543347
Add a Process Properties dialog in GNOME System Monitor
Last modified: 2012-03-20 22:32:11 UTC
Add a "Process Properties" dialog to GNOME System Monitor, that shows all information about a process. It should be reachable by right-clicking on a process, and selecting "Properties" from the context menu. This way you can see all the details of a specific process when you want, without having to enable all the columns. Conceptual mockup; * http://launchpadlibrarian.net/16099226/process_properties.png
A bit late for 2.24, i'll see what i can do.
This is a popular requested feature in Ubuntu Brainstorm: http://brainstorm.ubuntu.com/idea/25887/
It may also be a nice idea to have some of this information for the selected process below the process list so that is more discoverable. You could then have a "more information" button that would open a dialog with less-frequently required information.
Benoît, if you don't have the time for this I am willing to mentor anyone who would like to work on it.
Robert, I have got a skeletal patch in place. I would need some help on getting the GUI part of'Process Properties' dialog. With some pointers, I should be in a position to work on my own. I was thinking if I could 'copy' some stuff from 'Open Files' dialog's implementation. Let me know what would be the best way to proceed.
Created attachment 175921 [details] [review] This is a skeleton patch This patch has a place holder for the "Process Properties" option in context menu.
Hi Krishnan. Fast work! I just had a quick look, and I would agree the Open Files dialog is probably some good code to base your patch on.
I am more or less done with the 'view' of the UI. We need process memory info to fill in some of the process' properties. I found that there is already a function that exactly does this, get_process_memory_info. But that is defined to local to proctable.cpp. Should I 'copy' the same function local to process properties dialog implementation or make the function globally available for future reuse?
I'm not sure, but since the function is small, copy it for now and it can always be refactored later if there's a better method.
Hi Krishnan, Can you use ProcInfo object passed into the create dialog? It should have the memory info ... gulong vmsize; gulong memres; gulong memshared; gulong memwritable; gulong mem; ...
Hi Derek, For filling out values for the first time we can use the ProcInfo object passed on selection of the process from the Processes list. In the event that the user keeps the 'Process Properties' dialog open for some amount of time, we need to keep the fields updated with the latest memory information. For this we need to 'query' libgtop to get the latest memory usage values. You can see a similar possibility handled in 'Open Files' dialog, where a process can open/close file(s) after the dialog had been opened.
Created attachment 176115 [details] Screenshot of 'current' state The screenshot attached shows how the "Process Properties" dialog would look. Hope to complete the patch as soon as possible.
Looks really good! Good job! Maybe add a button to "Memory Maps" and "Open Files" too, or integrate them into the dialog.
Hi Moo, Thank you. Adding buttons for Memory maps and Open Files would mean, user ends up with multiple nested dialog windows. So, I would prefer we have the context menu as the single point from which we can choose based on what about a process the user wants to inspect. Of course, I am no UI expert and I am open for a discussion :)
Created attachment 176229 [details] [review] patch for "process properties" dialog feature Let the review of the patch begin :-)
Review of attachment 176229 [details] [review]: Strings are "Shared memory" and "Security Context". Should either be ("Shared memory" and "Security context") or ("Shared Memory" and "Security Context").
Moo, Currently I don't have a personal PC/laptop :( This makes it difficult for me to work on this patch. If the final set of review comments are not too many, I suggest someone else could make the necessary changes and commit the patch.
Maybe 'Waiting Channel' could be added too?
{ "Command Line", g_strdup_printf("%s", info->wchan)}
Add: { "Waiting Channel", g_strdup_printf("%s", info->arguments)} in function fill_proc_properties()
Created attachment 176518 [details] [review] patch for "process properties" dialog feature Updated patch with spelling corrections and whitespace fixes
Robert, The udpated patch seems to have the following changes missing in it. src/Makefile.am | 1 + src/callbacks.cpp | 8 ++ src/callbacks.h | 1 + src/interface.cpp | 9 ++- Thanks for updating the patch with the suggested changes.
Created attachment 176562 [details] [review] patch for "process properties" dialog feature Fixup up patch. Also made it so properties table is not deleted and rebuilt on refresh.
Created attachment 176568 [details] Screenshot of behaviour with latest patch
Could the ID be changed to PID? That would be more consistent with cli tools.
The ID matches the column in the system monitor main window. It's probably worth opening a separate bug about that.
Created attachment 176576 [details] [review] patch for "process properties" dialog feature Added "Waiting Channel". Make titles translatable
Looks like your ping got swallowed by the bugzilla issues the other day. I'll give this a closer look once gnome 3 is out. I generally think this would be a nice feature though.
I took the time to manually apply this but it still didn't compile cleanly. I'd like to add this but need an updated patch. Please add a copyright header to the newly created files also. I promise to get it this applied quickly once its in a satisfactory state.
*** Bug 347489 has been marked as a duplicate of this bug. ***
Created attachment 204716 [details] [review] Updated patch Updated patch to compile cleanly, with Priority field added, also added procproperties to POTFILES.in to be translatable, added headers to new added files, and removed redundant code for formatting memory sizes and process state.
Thanks. I've applied this to master and did a few fix ups.
Hi! (In reply to comment #32) > Thanks. I've applied this to master and did a few fix ups. This patch causes a build failure on our kfreebsd ports due to the usage of asm/param.h https://buildd.debian.org/status/fetch.php?pkg=gnome-system-monitor&arch=kfreebsd-amd64&ver=3.3.92-1&stamp=1332280913&file=log