Use these command templates and sample log formats for quick network diagnostics, latency checks, and connectivity documentation.
# Basic ping (Linux/Windows)
ping 8.8.8.8
# Ping with count (Linux)
ping -c 4 google.com
# Continuous ping (Windows)
ping -t 8.8.8.8
# Ping with packet size
ping -s 1000 8.8.8.8 # Linux
ping -l 1000 8.8.8.8 # Windows
# Save output to a file
ping 8.8.8.8 > pinglog.txt
# Ping gateway
ping 192.168.1.1
| Date | Time | Hostname / IP | Location | Avg Response (ms) | Packet Loss | Notes |
| ---------- | -------- | ------------- | ------------- | ----------------- | ----------- | -------------------- |
| 2025-06-20 | 10:30 AM | 8.8.8.8 | Office Router | 32 ms | 0% | Normal latency |
| 2025-06-20 | 10:45 AM | 192.168.1.1 | Gateway | 1 ms | 0% | Stable |
| 2025-06-20 | 11:00 AM | example.com | External Site | 58 ms | 25% | Packet loss detected |
๐ You can maintain logs in .csv, Excel, or Markdown format.
@echo off
set host=8.8.8.8
ping %host% -n 4 >> ping_log.txt
echo Checked %host% at %date% %time% >> ping_log.txt
#!/bin/bash
HOST="8.8.8.8"
DATE=$(date '+%Y-%m-%d %H:%M:%S')
echo "Ping to $HOST at $DATE" >> ~/ping_log.txt
ping -c 4 $HOST >> ~/ping_log.txt
Use multiple targets (gateway, DNS, external server) for end-to-end checks.
Check for high latency (>100ms) or packet loss.
Use tools like mtr, traceroute, or pathping for detailed analysis.