Archive | July 22, 2014

ncdu and its Awesomeness

Today I discovered ncdu while trying to find a script that would display all files on a Linux system sorted by size.

ncdu is Absolutely Amazing!

When you first run ncdu, it scans the current directory and any sub directories and calculates disk space used. It then sorts the output so you can easily find files that are the largest and taking up the most space.

Here is what it looks like when run under the /var/lib directory:

var-lib

 

Navigating further into /var/lib/libvirt/images shows the individual files sorted by size.

 

var-lib-libvirt-images

This entry was posted on July 22, 2014, in Linux and tagged .

List of software that should be installed on all Linux Systems:

  1. screen – for terminal multiplexing
  2. tmux – alternative terminal multiplexing
  3. weechat (if IRC is required)
  4. vim – my editor of choice
  5. ncdu – to display disk usage in a nice ncurses terminal
  6. openvpn – for all VPN needs
  7. x2go – remote desktop NX style
  8. xrdp – alternative remote desktop RDP style
  9. sar / sysstat – system performance monitoring tool

Verify NTP Status on Linux

1
2
3
4
5
6
7
# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+name1.glorb.com 128.10.19.24     2 u  729 1024  377   64.538    3.350   1.540
+142.54.181.202  64.113.32.5      2 u   78 1024  377   46.030    2.374   1.829
*ntp.glorb.com   128.10.19.24     2 u 1003 1024  377   83.714   -2.968   1.872
-mailserv1.phoen LOCAL(0)         2 u  437 1024  377   13.746   -4.769   3.006

Display File System Types using df -T

1
2
3
4
5
6
7
8
9
10
root@x61:~# df -T
Filesystem               Type     1K-blocks     Used Available Use% Mounted on
/dev/mapper/x61--vg-root ext4     149399852 18707700 123079944  14% /
none                     tmpfs            4        0         4   0% /sys/fs/cgroup
udev                     devtmpfs   1975452        4   1975448   1% /dev
tmpfs                    tmpfs       397332     1216    396116   1% /run
none                     tmpfs         5120        0      5120   0% /run/lock
none                     tmpfs      1986644      144   1986500   1% /run/shm
none                     tmpfs       102400       28    102372   1% /run/user
/dev/sda1                ext2        240972    36912    191619  17% /boot
This entry was posted on July 22, 2014, in Linux and tagged , .