Bash
# Get space usage
du -chs ./* | sort -rh
du -kh --max-depth=1 | sort -rh
# find files
find [path] -name "lost+found" -prune -o -name "abc*.log.gz" -print0
Cpp
# cpp debugs
## cpp heap memory checking
sudo cat /proc/18594/maps |grep heap # cat the process memory
55da5171a000-55da5178a000 rw-p 00000000 00:00 0 [heap]
55da5178a000-55db1c7c3000 rw-p 00000000 00:00 0 [heap]
55db1c7c3000-55da5178a000= 3,406,008,320 around 3G mem.
## Then dump the heap memory to a file(example from UAT):
dd if=/proc/29619/mem bs=1 skip=$((0x55db1c7c3000)) count=$((0x55db1c7c3000-0x55da5178a000)) status=none | strings > /tmp/heap_log.txt
Docker Compose
# up and run in background
docker-compose up -d
# stop --- will keep the data
docker-compose stop
# shutdown --- will remove the data
docker-compose down -v
# check service environment variables
docker-compose run web env
# check config --- this can print the real value of the variable
docker-compose config