# ---------- check your size first ----------
nproc ; free -h

# ---------- CPU load (all cores, 2 minutes) ----------
stress-ng --cpu $(nproc) --timeout 120s
#   watch: CPU utilisation query rises to ~100%, node_load1 climbs

# ---------- memory load (60% of RAM, 2 minutes) ----------
stress-ng --vm 1 --vm-bytes 60% --timeout 120s
#   watch: MemAvailable falls, % used rises   (keep it at 60% or less so your system stays usable)

# ---------- disk I/O load ----------
stress-ng --hdd 2 --hdd-bytes 1G --timeout 90s
# or without stress-ng:
dd if=/dev/zero of=/tmp/big.bin bs=1M count=3000 oflag=direct ; rm -f /tmp/big.bin
#   watch: node_disk_written_bytes_total rate, disk busy %, iowait mode

# ---------- web traffic with ApacheBench (HTTP load on Apache) ----------
ab -n 100000 -c 100 http://localhost/
ab -n 200000 -c 200 -k http://localhost/          # keep-alive, heavier
#   watch: CPU rises (apache workers), node_load1, network on device="lo"
#   NOTE: traffic to localhost goes over the loopback "lo" interface, so the
#   query with device!="lo" will not move. For the demo use device="lo".

# ---------- network receive on the real interface (needs internet) ----------
ip -br link                                        # find your interface name (eth0 / wlan0 / enp3s0)
curl -o /dev/null https://proof.ovh.net/files/1Gb.dat
# or:
wget -O /dev/null https://proof.ovh.net/files/1Gb.dat
#   watch: rate(node_network_receive_bytes_total{device!="lo"}[1m]) jumps

# ---------- combined (CPU + memory + disk + web) ----------
stress-ng --cpu 2 --vm 1 --vm-bytes 40% --hdd 1 --timeout 120s &
ab -n 100000 -c 100 http://localhost/

# ---------- target down (shows up == 0) ----------
sudo systemctl stop prometheus-node-exporter
#   wait 30 s: query "up" shows 0, http://localhost:9090/targets shows DOWN
sudo systemctl start prometheus-node-exporter

# ---------- stop all load ----------
pkill stress-ng ; pkill ab
