Random Information ...others might find it interesting too.

Cheat sheet

FreeBSD

Display current I/O load
gstat
systat -iostat 1

Display current network ip stats
systat -ip 1

Display current network tcp stats
systat -tcp 1

Display current network utilization
systat -ifstat 1

Display HDD information
camcontrol identify ada0

Display mbuf stats
netstat -m

Search string within files
grep -lr --include "*.txt" 'searchstring' /some/dir

Serial terminal
cu -l /dev/cuau0 -s 115200

Toggle AAM (HDDs)
Enable camcontrol cmd ada0 -a "EF 05 00 00 00 00 00 00 00 00 xx 00"
Disable camcontrol cmd ada0 -a "EF 85 00 00 00 00 00 00 00 00 00 00"

Toggle APM (HDDs)
Enable camcontrol cmd ada0 -a "EF 42 00 00 00 00 00 00 00 00 xx 00"
Disable camcontrol cmd ada0 -a "EF C2 00 00 00 00 00 00 00 00 00 00"

ZFS - Enforce 4k alignment (without gnop and friends) sysctl vfs.zfs.min_auto_ashift=12

ffmpeg

Split a segment without re-encoding
ffmpeg -ss 00:00:00 -t 00:50:00 -i largefile.mp4 -acodec copy -vcodec copy smallfile.mp4

rsync

Full sync (destructive)
rsync -rlptgoDvhP --delete 192.168.10.10::fulldrive/ /array0/smbpubshare/

Sync, verify checksums and limit bandwidth
rsync -a -c --bwlimit=150 192.168.20.11::smbpubshare/ ./

Sync, verify checksums, verbose and limit bandwidth
rsync -a -c -h --progress -v --bwlimit=150 192.168.20.11::smbpubshare/ ./