weird characters in top(1) output

Alexander Best arundel at freebsd.org
Tue Feb 1 12:24:32 UTC 2011


hi there,

i was doing the following:

top inf > ~/output

when i noticed that this was missing the overall statistics line. so i went
ahead and did:

top -d2 inf > ~/output

funny thing is that for the second output some weird characters seem to get
spammed into the overall statistics line:

last pid: 14320;  load averages:  0.42,  0.44,  0.37  up 1+14:02:02    13:21:05
249 processes: 1 running, 248 sleeping
CPU: ^[[3;6H 7.8% user,  0.0% nice, 10.6% system,  0.6% interrupt, 81.0% idle
Mem: 1271M Active, 205M Inact, 402M Wired, 67M Cache, 212M Buf, 18M Free
Swap: 18G Total, 782M Used, 17G Free, 4% Inuse

this only seems to happen when i redirect the top(1) output to a file. if i do:

top -d2 inf

...everything works fine. i verified the issue under zsh(1) and sh(1).

cheers.
alex

-- 
a13x


More information about the freebsd-hackers mailing list