! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-taskmanager doesn't work on Solaris
Status:
RESOLVED: FIXED
Product:
Xfce4-taskmanager
Component:
General

Comments

Description Peter Tribble 2009-09-02 15:32:49 CEST
As the subject says, xfce4-taskmanager is pretty linux-specific.

I've a version that works on Solaris here:

http://www.petertribble.co.uk/Solaris/xfce4-taskmanager-0.3.2-solaris.tar.bz2

I'm happy to work with someone (who knows far more about autoconf than I do) to get this integrated properly.
Comment 1 Mike Massonnet editbugs 2009-09-03 17:44:14 CEST
Can you have a look at the two missing functions:
void		send_signal_to_task(gint task_id, gint signal);
void		set_priority_to_task(gint task_id, gint prio);

They are used to send KILL/TERM/etc signals and set the priority. I added the ones from Linux, they should actually to be the same.

The code is now in git. You can test it and let me know if it works for you. You will need the xfce4-dev-tools package and execute the ./autogen.sh script that will build the configure script and run it automatically.

http://git.xfce.org/apps/xfce4-taskmanager

To clone:
git clone git://git.xfce.org/apps/xfce4-taskmanager
Comment 2 Peter Tribble 2009-09-04 18:37:58 CEST
Created attachment 2526 
Updated Solaris support

This patch is against the git repository.

Brings my initial port into line with the version in git, which has changed a little since the released tarball I started from

Makefile.am needs to select Solaris correctly
Makefile needs -lkstat adding to libraries (not sure how best to do that)
taskmanager-solaris.c defines kc and includes the headers it needs
interface.c - %cpu has two decimal places (on fast machines, or multicore, you need higher precision)
%cpu scales properly with the Solaris code
%cpu calculated on Solaris - percentage is #ifdef'd out, and the calculation I use is slightly different to get higher precision
Implemented set_priority_to_task for Solaris
Solaris needs a different list of priorities (must be a better way to do that)
Fixed error message in send_signal_to_task (all platforms)
Comment 3 Mike Massonnet editbugs 2009-09-05 16:26:53 CEST
I have one quick remark, do you really think we need that much precision for the cpu usage? I really don't think. Keep in mind that this taskmgr is a very simple tool, that gives you a quick view over running processes but I don't believe it will be used for precise measurements.

Otherwise I'm gonna push the patch, of course I will have to take a look for interface.c and functions.c afterwards. I also looked around the Makefile and moved the kstat lib requirement into the autoconf script with the AC_CHECK_LIB macro.
Comment 4 Peter Tribble 2009-09-06 11:32:07 CEST
(In reply to comment #3)
> I have one quick remark, do you really think we need that much precision for
> the cpu usage? I really don't think. Keep in mind that this taskmgr is a very
> simple tool, that gives you a quick view over running processes but I don't
> believe it will be used for precise measurements.

On my system(s), with just the integer percentage, essentially every process sits stubbornly at zero. Even with 2 decimal places most processes only have one significant figure showing, so it's not to get precision but to actually show some useful data.

That said, there may be a case for different displays for different operating systems? While Solaris gives you data with nanosecond precision (although typically you only get useful microseconds), I'm not sure whether the Linux code gets you better than 0.01s accuracy - although even there once you've divided by the number of cpus the numbers can get quite small.
Comment 5 Mike Massonnet editbugs 2009-09-08 13:06:46 CEST
(In reply to comment #4)
> (In reply to comment #3)
> > I have one quick remark, do you really think we need that much precision for
> > the cpu usage? I really don't think. Keep in mind that this taskmgr is a very
> > simple tool, that gives you a quick view over running processes but I don't
> > believe it will be used for precise measurements.
> 
> On my system(s), with just the integer percentage, essentially every process
> sits stubbornly at zero. Even with 2 decimal places most processes only have
> one significant figure showing, so it's not to get precision but to actually
> show some useful data.
> 
> That said, there may be a case for different displays for different operating
> systems? While Solaris gives you data with nanosecond precision (although
> typically you only get useful microseconds), I'm not sure whether the Linux
> code gets you better than 0.01s accuracy - although even there once you've
> divided by the number of cpus the numbers can get quite small.

I'm still not convinced. I don't see it as important to display processes that don't do much. I can take as example an h264 decoder, you will have a use between 20 to 60% depending of the amount of data to decode (even up to 100% if the CPU is not powerful enough). For MP3 decoding you see generally something between 5 and 15%. And to get to the point the taskmgr lets you figure which application is burning up the CPU. I at least don't think it's worth monitoring the CPU usage of third applications that always sit around. And finally regarding the number of CPUs, it really needs to be a *lot* of CPU installed if you see a process that is at 100% on only one CPU that shows up with 1%.

The only inclusion would be through a settings dialog (if not a hidden option). As currently there isn't any such dialog, I simply suggest we keep this in the TODO file. I hope it is fine this way :)?
Comment 6 Mike Massonnet editbugs 2009-09-08 22:35:40 CEST
I pushed a new commit e05fff2. It should be fine by now. Regarding the CPU precision I moved that into the TODO list with a possible settings dialog. If there are other issues with the patch reopen but otherwise file a new bug, thank you for the contribution :)

Bug #5723

Reported by:
Peter Tribble
Reported on: 2009-09-02
Last modified on: 2009-09-08

People

Assignee:
Mike Massonnet
CC List:
0 users

Version

Version:
unspecified

Attachments

Updated Solaris support (7.55 KB, patch)
2009-09-04 18:37 CEST , Peter Tribble
no flags

Additional information