Some additional command-line tools that I use to install and use on my client Systems
To stress a Web Server
Reports file access events from all running processes in real time.
discard unused blocks on a mounted filesystem (local or remote). Is useful for freeing blocks no longer used in ZFS zvols. That can also be achieved by mount -o discard
An improved top
To set the metrics of all IPV4 routes attached to a given network interface
To watch metrics for a network interface (or wireless)
CPU and IO devices stats. I modified some collectors for telegraf and influxdb consumed by grafana for fetching the Write KB/s, Read KB/s, Bandwidth of the Magnetic Spinning drives and SSD during declustered rebuild.
Perform network throughput tests
java (jre Oracle and OpenJDK)
According to manpages, the opposite of more. :)
What it does is display a file, and you can scroll up/down, you can search for patterns…
cat /etc/passwd | less
# -n doesn’t count the lines, to save time
# For a specific Offset
less -n +500000000P /var/log/apache2/giant.log
# For 50% point
less -n +50p /var/log/apache2/giant.log
To trace library calls.
To see in real time queries and slow queries to mysql
Show the space used by any directory and subdirectory
nginx (fpm-php) and apache
Offers monitoring of different aspects: Network, Disk, Processes…
perf stat ls
PHP + curl + mysql (hhvm)
python-pip and pypy
Utility for dealing with the S.M.A.R.T. features of the disks, knowing errors…
Split a file into several, based by text lines, or binary: number of bytes per file.
SSH without typing the password. -f for reading it from a file.
sshpass -p “mypassword” ssh -o StrictHostKeyChecking=no firstname.lastname@example.org
In this sample passing the command ls, so this will be executed, and logout.
sshpass -p “mypassword” ssh -o StrictHostKeyChecking=no email@example.com ls
A poor’s man VPN through SSH that is available for Linux and Mac OS X.
E.g.: sudo sshuttle -r firstname.lastname@example.org:8275 172.30.0.0/16
Sshuttle forwards TCP and DNS but does not forward UDP or ICMP. So ping or ipmi protocol won’t work. But it does work for http, https, ssh…
To trace the system calls and signals.
To redirect the output to another process use:
strace zpool status 2>&1 | less
systemd-cgtop and systemd-analyze
To see the traffic to your NIC
Reads from sdtin and sends to a file and outputs to stdout as well.
find . -mtime -1 -print | grep -v "/logs/" 2>&1 | tee /var/log/results.log
Just like cat, but for compressed filed.
zcat logs.tar.gz | grep "Error" zcat logs.tar.gz | less
Sergey Davidoff stumbled upon a project called compcache that creates a RAM based block device which acts as a swap disk, but is compressed and stored in memory instead of swap disk (which is slow), allowing very fast I/O and increasing the amount of memory available before the system starts swapping to disk. compcache was later re-written under the name zRam and is now integrated into the Linux kernel.