Tags 517097 patch
thanks

Yes, this bug may annoyed greatly. Also if PID has length 8 chars,
it becomes difficult to select it by mouse by doubleclick (for ex.
for killing thread).

    There is a patch removing these problems in attache.

On 17:01 Wed 25 Feb     , Henrik Christian Grove wrote:
HCG> Package: mytop
HCG> Version: 1.6-5
HCG> Severity: minor

HCG> With a heavily loaded mysql server that has been running for a long
HCG> time, the id's can easily be larger than 10^8 (on the server I'm looking
HCG> at right now, new id's are around 1.5*10^8, and that has only been
HCG> running for 69 days).

HCG> But mytop is hardcoded (line 908) to a column width of 8 chars for the
HCG> id. But as printf prints the whole id (and that's how it should be),
HCG> the width calculation for the "Query or State" column is wrong,
HCG> which causes one char too much to be printed which makes the line wrap,
HCG> that looks quite bad, and with many queries it can cause the headers and
HCG> topmost queries to scroll off the screen.

HCG> (The problem is seen on a server having mytop 1.4-1 - the version in
HCG> etch - from which I can't run reportbug, but I apt-get'ed the source
HCG> for 1.6-5 on this machine and checked the code)

HCG> -- System Information:
HCG> Debian Release: 5.0
HCG> APT prefers stable
HCG> APT policy: (700, 'stable'), (600, 'testing'), (500, 'oldstable'), (20, 
'unstable'), (10, 'experimental')
HCG> Architecture: amd64 (x86_64)

HCG> Kernel: Linux 2.6.26-1-amd64 (SMP w/1 CPU core)
HCG> Locale: LANG=da_DK.ISO-8859-15, LC_CTYPE=da_DK.ISO-8859-15 
(charmap=ISO-8859-15)
HCG> Shell: /bin/sh linked to /bin/bash
--
... mpd is off

. ''`.                               Dmitry E. Oboukhov
: :’  :   email: [email protected] jabber://[email protected]
`. `~’              GPGKey: 1024D / F8E26537 2006-11-21
  `- 1B23 D4F8 8EC0 D902 0555  E438 AB8C 00CF F8E2 6537
--- mytop       2009-02-25 20:59:50.000000000 +0300
+++ mytop       2009-02-25 20:59:45.000000000 +0300
@@ -938,13 +938,13 @@
 
     { local $\; print BOLD(); }
 
-    printf "%8s %9s %15s %10s %9s %6s %-${free}s",
+    printf " %10s %7s %13s %12s %8s %6s %-${free}s",
         'Id','User','Host/IP','DB','Time', 'Cmd', 'Query or State';
 
     { local $\; print RESET(); }
 
     ##      Id User Host DB
-    printf "%8s %9s %15s %10s %9s %6s %-${free}s",
+    printf " %10s %7s %13s %12s %8s %6s %-${free}s",
         '--','----','-------','--','----', '---', '----------';
 
     $lines_left -= 2;
@@ -1078,7 +1078,7 @@
             print GREEN()  if $thread->{Command} eq 'Connect';
         }
 
-        printf "%8d %9.9s %15.15s %10.10s %9d %6.6s %-${free}.${free}s",
+        printf " %10d %7.7s %13.13s %12.12s %8d %6.6s %-${free}.${free}s",
             $thread->{Id}, $thread->{User}, $thread->{Host}, $thread->{db},
             $thread->{Time}, $thread->{Command}, $smInfo;
 

Attachment: signature.asc
Description: Digital signature

Reply via email to