Skip to content
This repository has been archived by the owner. It is now read-only.

--freespace always outputs: "Terminal width too small, trimming output." #98

Closed
trinitronx opened this issue Nov 25, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@trinitronx
Copy link
Contributor

commented Nov 25, 2015

Whenever I try to use the freespace plugin to show disk usage, it always says terminal is too small:

$ sudo dstat --freespace
Terminal width too small, trimming output.

I've tried this on a very wide HDTV, with or without tmux, and always the same result.

Screenshot

On a 1920 x 1080 (1080p) HDTV screen, error still shows:

dstat-freespace-wide-hdtv-screenshot-2015-11-24-18 15 38

Reproducible: Always

Dstat Version

$ dstat --version
Dstat 0.7.2
Written by Dag Wieers <dag@wieers.com>
Homepage at http://dag.wieers.com/home-made/dstat/

Platform posix/linux2
Kernel 3.10.0-229.20.1.el7.x86_64
Python 2.7.5 (default, Jun 24 2015, 00:41:19)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]

Terminal type: xterm-256color (color support)
Terminal size: 63 lines, 238 columns

Processors: 2
Pagesize: 4096
Clock ticks per secs: 100

internal:
  aio, cpu, cpu24, disk, disk24, disk24old, epoch, fs, int, int24, io, ipc, load, lock, mem, net, page, page24, proc, raw, socket, swap, swapold, sys, tcp, time, udp, unix, vm
/usr/share/dstat:
  battery, battery-remain, cpufreq, dbus, disk-tps, disk-util, dstat, dstat-cpu, dstat-ctxt, dstat-mem, fan, freespace, gpfs, gpfs-ops, helloworld, innodb-buffer, innodb-io, innodb-ops, lustre, memcache-hits, mysql-io, mysql-keys,
  mysql5-cmds, mysql5-conn, mysql5-io, mysql5-keys, net-packets, nfs3, nfs3-ops, nfsd3, nfsd3-ops, ntp, postfix, power, proc-count, qmail, rpc, rpcd, sendmail, snooze, squid, test, thermal, top-bio, top-bio-adv, top-childwait,
  top-cpu, top-cpu-adv, top-cputime, top-cputime-avg, top-int, top-io, top-io-adv, top-latency, top-latency-avg, top-mem, top-oom, utmp, vm-memctl, vmk-hba, vmk-int, vmk-nic, vz-cpu, vz-io, vz-ubc, wifi

dstat was installed via RPM package on CentOS 7:

$ rpm -qi dstat
Name        : dstat
Version     : 0.7.2
Release     : 12.el7
Architecture: noarch
Install Date: Mon 09 Nov 2015 11:38:29 PM UTC
Group       : System Environment/Base
Size        : 769542
License     : GPLv2
Signature   : RSA/SHA256, Fri 04 Jul 2014 01:10:28 AM UTC, Key ID 24c6a8a7f4a80eb5
Source RPM  : dstat-0.7.2-12.el7.src.rpm
Build Date  : Tue 10 Jun 2014 02:45:28 AM UTC
Build Host  : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://dag.wieers.com/home-made/dstat/
Summary     : Versatile resource statistics tool
Description :
Dstat is a versatile replacement for vmstat, iostat, netstat and ifstat.
Dstat overcomes some of their limitations and adds some extra features,
more counters and flexibility. Dstat is handy for monitoring systems
during performance tuning tests, benchmarks or troubleshooting.

Dstat allows you to view all of your system resources instantly, you
can eg. compare disk usage in combination with interrupts from your
IDE controller, or compare the network bandwidth numbers directly
with the disk throughput (in the same interval).

Dstat gives you detailed selective information in columns and clearly
indicates in what magnitude and unit the output is displayed. Less
confusion, less mistakes.

$ cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
$ uname -a
Linux ec2-12-34-56-78.us-east-1.compute-1.amazonaws.com 3.10.0-229.20.1.el7.x86_64 #1 SMP Tue Nov 3 19:10:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ python --version
Python 2.7.5
@trinitronx

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2015

D'oh! Looks like iTerm2 settings are to blame:

$ tput cols
238

# After pressing ⌘+ a couple times...
$ tput cols
318

$ dstat --freespace
-----/----------/dev-----/security------/shm--------/run------/cgroup-----/systemd----/pstore-----/cpuset---/cpu,cpuacc---/memory-----/devices----/freezer----/net_cls-----/blkio---/perf_event---/hugetlb----/config--------/------/rpc_pipefs---/selinux--/binfmt_mis--/hugepages----/debug-----/mqueue-----/postfix-
 used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free: used  free
2930M 5251M:   0  1785M:   0     0 :   0  1802M: 192M 1609M:   0  1802M:   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :2930M 5251M:   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :2526M 44.7G
2930M 5251M:   0  1785M:   0     0 :   0  1802M: 192M 1609M:   0  1802M:   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :2930M 5251M:   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :2526M 44.7G
2930M 5251M:   0  1785M:   0     0 :   0  1802M: 192M 1609M:   0  1802M:   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :2930M 5251M:   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :2526M 44.7G
2930M 5251M:   0  1785M:   0     0 :   0  1802M: 192M 1609M:   0  1802M:   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :2930M 5251M:   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :2526M 44.7G
2930M 5251M:   0  1785M:   0     0 :   0  1802M: 192M 1609M:   0  1802M:   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :2930M 5251M:   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :2526M 44.7G
2930M 5251M:   0  1785M:   0     0 :   0  1802M: 192M 1609M:   0  1802M:   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :2930M 5251M:   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :2526M 44.7G

Perhaps the real question to come out of this issue is:

How can I whitelist / blacklist some mountpoints when using --freespace on systems that either have a lot of mounts or show lots of SystemD cgroups?

@scottchiefbaker

This comment has been minimized.

Copy link
Collaborator

commented Mar 16, 2016

This is a known limitation of the current freespace plugin. I've already blacklisted several types of partitions which should help. See c475684 for more details. We'll also be addressing specific mounts points in #93.

Closing this, so we can focus on #93.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.