GNOME Bugzilla – Bug 364901
system monitor should convert minutes to hours at 60 ala prstat and taskmgr
Last modified: 2006-11-01 14:09:42 UTC
gnome-system-monitor 2.14.1 with a fairly small font on a large lcd. in the processes view, i see: Process Name # Status # Resident Memory # CPU Time # Nice # ID # Arguments genxref # Running # 1.1 GiB # 385:39.02 # 16 # 29252 # /usr/bin/perl /export/home/www/html/genxref /export/home/svn/lxr-root/lxr-data/ being used to (windows)taskmgr and (solaris)prstat, i expected to see output in the form: HH:MM:SS for my long process. I'm also vaguely familiar with top style (MMMM:SS). Instead I got something MMM:SS.cc where cc is fractional seconds The cutoff imo sould be 60minutes. result: i immediately assumed that system-monitor was buggy because it looked like it said my process had been running for 15 days. for comparison (numbers are not from the same precise instant...): swift% uptime 8:34am up 5 day(s), 2:10, 3 users, load average: 1.31, 1.37, 1.39 swift% prstat -p 29252 PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 29252 timeless 1080M 1078M cpu2 0 16 6:26:46 24% genxref/1 Total: 1 processes, 1 lwps, load averages: 1.35, 1.38, 1.39
OK, i'll stole GNU top code in order to do it :) So it will look like GNU top. Fine ?
gnu top output is not ideal: 1973 timeless 14 0 1108 1032 724 R 10.5 0.2 2045:08 top it does at least omit centi-secs, but i'd much prefer that minutes be converted to hours instead of: 385:39.02 show: 6:25:39 [dropping the .02]
if (weeks) /* xgettext: weeks, days */ return g_strdup_printf(_("%uw%ud"), weeks, days); "3w1d" if (days) /* xgettext: days, hours (0 -> 23) */ return g_strdup_printf(_("%ud%02uh"), days, hours); "4d07h" if (hours) /* xgettext: hours (0 -> 23), minutes, seconds */ return g_strdup_printf(_("%u:%02u:%02u"), hours, minutes, seconds); "5:01:03" /* xgettext: minutes, seconds, centiseconds */ return g_strdup_printf(_("%u:%02u.%02u"), minutes, seconds, centiseconds); "42:01.66" Likes this ?
that sounds great :)
OK, i've commited this new formatting. It would be nice if you could try it :) Thanks. Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.