Diagnostics, Monitoring and Troubleshooting
Diagnostics, Monitoring and Troubleshooting
Section titled “Diagnostics, Monitoring and Troubleshooting”RouterOS provides a comprehensive suite of diagnostic and monitoring tools to help network administrators identify issues, analyze traffic, and maintain optimal router performance. This guide covers all major diagnostic tools available in RouterOS.
Overview
Section titled “Overview”MikroTik routers include built-in tools for:
- System resource monitoring
- Hardware health monitoring
- Network connectivity testing
- Traffic analysis and packet capture
- Network discovery
System Resource Monitoring
Section titled “System Resource Monitoring”The Resource menu displays overall system statistics including uptime, memory usage, disk space, and CPU information.
Viewing Resource Information
Section titled “Viewing Resource Information”/system resource printExample output:
uptime: 29s version: 7.11.2 (stable) build-time: Aug/31/2023 13:55:47 factory-software: 7.6 free-memory: 94.2MiB total-memory: 224.0MiB cpu: ARM cpu-count: 2 cpu-frequency: 800MHz cpu-load: 2% free-hdd-space: 93.5MiB total-hdd-space: 128.5MiB write-sect-since-reboot: 85 bad-blocks: 0% architecture-name: arm board-name: hAP ax lite LTE6 platform: MikroTikResource Properties
Section titled “Resource Properties”| Property | Description |
|---|---|
| uptime | Time elapsed since last boot |
| version | Installed RouterOS version |
| cpu | CPU model |
| cpu-count | Number of CPU cores |
| cpu-load | Current CPU utilization percentage |
| free-memory | Available RAM |
| total-memory | Total installed RAM |
| free-hdd-space | Available NAND/SSD storage |
| total-hdd-space | Total storage capacity |
| bad-blocks | Percentage of defective NAND blocks |
Per-CPU Monitoring
Section titled “Per-CPU Monitoring”View individual CPU core usage on multi-core systems:
/system resource cpu printOutput:
CPU LOAD IRQ DISK0 5% 0% 0%1 3% 0% 0%IRQ Monitoring
Section titled “IRQ Monitoring”View interrupt request (IRQ) distribution:
/system resource irq printThis helps identify hardware conflicts or overloaded interrupt handlers.
PCI Device Information
Section titled “PCI Device Information”View all PCI devices installed in the router:
/system resource pci printUSB Device Information
Section titled “USB Device Information”View connected USB devices:
/system resource usb printHardware Health Monitoring
Section titled “Hardware Health Monitoring”The Health menu displays real-time hardware sensor data including temperature, voltage, fan speed, and power consumption.
Viewing Health Information
Section titled “Viewing Health Information”/system health printExample output on CCR1072-1G-8S+:
Columns: NAME, VALUE, TYPE # NAME VALUE TYPE 0 power-consumption 50.8 W 1 cpu-temperature 43 C 2 fan1-speed 5654 RPM 3 fan3-speed 5800 RPM 4 board-temperature1 29 C 5 psu1-voltage 0 V 6 psu2-voltage 12.1 VTemperature Monitoring
Section titled “Temperature Monitoring”Routers with temperature sensors display:
- cpu-temperature: Processor temperature
- pcb-temperature: Printed circuit board temperature
- sfp-temperature: SFP module temperature
Voltage Monitoring
Section titled “Voltage Monitoring”View input voltage and power supply status:
Columns: NAME, VALUE, TYPE# NAME VALUE TYPE0 voltage 23.8 V1 temperature 39 CFan Control Configuration
Section titled “Fan Control Configuration”For devices with configurable fans:
/system health set fan-target-temp=55 fan-min-speed-percent=10| Property | Description |
|---|---|
| fan-target-temp | Target temperature for fan speed adjustment (default: 58°C) |
| fan-full-speed-temp | Temperature triggering maximum fan speed (default: 65°C) |
| fan-min-speed-percent | Minimum fan speed percentage |
| fan-control-interval | Temperature reading interval in seconds (5-30) |
| cpu-overtemp-check | Enable CPU overtemperature protection (ARM devices) |
| cpu-overtemp-threshold | Maximum temperature before shutdown |
Fan Speed Behavior
Section titled “Fan Speed Behavior”Fan speed automatically adjusts based on:
| PoE-out Load | Fan Speed |
|---|---|
| 0-24% | 0% (off) |
| 25-46% | 25% |
| 47-70% | 50% |
| 71-92% | 75% |
| 93%+ | 100% |
The Ping tool uses ICMP Echo messages to test network connectivity and measure round-trip delay between the router and target hosts.
See Ping for comprehensive documentation covering:
- Basic and advanced ping parameters
- MAC ping, multicast ping, and broadcast ping
- Troubleshooting techniques and result interpretation
- Script integration and automation
Traceroute
Section titled “Traceroute”Traceroute displays the path packets take to reach a destination, helping identify where network delays or failures occur.
Basic Usage
Section titled “Basic Usage”/tool traceroute 10.0.0.1Output:
ADDRESS STATUS 1 10.0.1.17 2ms 1ms 1ms 2 10.255.255.1 5ms 1ms 1msHow Traceroute Works
Section titled “How Traceroute Works”Traceroute exploits the TTL (Time-To-Live) field in IP packets:
- First packet sent with TTL=1 - first router replies with ICMP Time Exceeded
- Second packet with TTL=2 - second router replies
- Continues incrementing until destination reached
This reveals each hop in the path and response times.
Traceroute Options
Section titled “Traceroute Options”| Parameter | Description |
|---|---|
| address | Target destination |
| max-hops | Maximum number of hops (default: 30) |
| timeout | Wait time for responses |
| count | Probes per hop |
Interpreting Results
Section titled “Interpreting Results”- High latency at a specific hop: That router or link is congested
- Request timeout: Packet loss or firewall blocking ICMP
- ** asterisks (*)**: No response received
Torch is a real-time traffic monitoring tool that displays active traffic flows through an interface.
Running Torch
Section titled “Running Torch”/tool torch interface=ether1Traffic Classification
Section titled “Traffic Classification”Torch can monitor traffic by:
- Source/destination IP address (IPv4 and IPv6)
- Port numbers
- Protocol (TCP, UDP, ICMP, etc.)
- MAC protocol
- VLAN ID
- DSCP
Torch Options
Section titled “Torch Options”| Parameter | Description |
|---|---|
| interface | Interface to monitor |
| address | Filter by IP address |
| port | Filter by port |
| protocol | Filter by protocol |
| src-address | Filter by source IP |
| dst-address | Filter by destination IP |
Limitations
Section titled “Limitations”- Unicast traffic between wireless clients with client-to-client forwarding enabled is not visible
- Traffic processed with hardware offloading on bridges may not appear
Packet Sniffer
Section titled “Packet Sniffer”The packet sniffer captures network packets for detailed analysis, useful for troubleshooting and security auditing.
Basic Sniffing
Section titled “Basic Sniffing”/tool sniffer start interface=ether1/tool sniffer stop/tool sniffer save file-name=capture.pcapThe captured file can be analyzed with Wireshark.
Quick Mode
Section titled “Quick Mode”For immediate results without saving:
/tool sniffer quick ip-protocol=icmpFiltering Options
Section titled “Filtering Options”The sniffer supports extensive filtering:
| Filter | Description |
|---|---|
| filter-ip-address | Filter by IP address |
| filter-src-ip-address | Filter by source IP |
| filter-dst-ip-address | Filter by destination IP |
| filter-port | Filter by port |
| filter-src-port | Filter by source port |
| filter-dst-port | Filter by destination port |
| filter-ip-protocol | Filter by protocol (tcp, udp, icmp, etc.) |
| filter-mac-address | Filter by MAC address |
| filter-vlan | Filter by VLAN ID |
| filter-direction | Filter by direction (rx, tx) |
Configuration Properties
Section titled “Configuration Properties”/tool sniffer set file-name=capture.pcap file-limit=5000KiB \ filter-ip-protocol=tcp filter-dst-port=80,443| Property | Description |
|---|---|
| file-name | Save capture to file |
| file-limit | Maximum file size (10-4294967295 KiB) |
| memory-limit | Buffer size for captured packets |
| memory-scroll | Overwrite old data when buffer full |
| only-headers | Capture headers only, not payload |
| streaming-enabled | Stream to remote server |
Viewing Sniffer Statistics
Section titled “Viewing Sniffer Statistics”After capturing, view results:
/tool sniffer protocol print # Protocol distribution/tool sniffer host print # Host statistics/tool sniffer connection print # Active connectionsIP Scan
Section titled “IP Scan”IP Scan discovers devices on your network, collecting IP addresses, MAC addresses, DNS names, and SNMP information.
See IP Scan for complete documentation.
Logging
Section titled “Logging”RouterOS logging provides detailed system event records essential for troubleshooting.
Viewing Logs
Section titled “Viewing Logs”/log printLog Categories
Section titled “Log Categories”/system logging add topics=info/system logging add topics=error/system logging add topics=warning/system logging add topics=criticalLog Actions
Section titled “Log Actions”Configure where logs are stored:
| Action | Description |
|---|---|
| memory | RAM buffer (default) |
| disk | NAND/SD card storage |
| remote | Remote syslog server |
| echo | Display in terminal |
Remote Syslog Configuration
Section titled “Remote Syslog Configuration”Send logs to a remote server:
/system logging action set remote remote=192.168.1.100/system logging add action=remote topics=infoLog Topics
Section titled “Log Topics”Essential topics for troubleshooting:
/system logging add topics=firewall action=memory/system logging add topics=interface action=memory/system logging add topics=error action=memory/system logging add topics=critical action=memoryMultiple Topics: AND vs OR Logic
Section titled “Multiple Topics: AND vs OR Logic”When specifying multiple topics in a logging rule, the behavior depends on how topics are combined:
- Multiple topics in one rule (AND logic): When you specify
topics=firewall,info, the rule matches only if BOTH conditions are true—the log entry must have both thefirewalltopic AND theinfotopic.
# Log entries that have BOTH 'firewall' AND 'info' topics/system logging add topics=firewall,info action=memory- Multiple rules (OR logic): When you have separate logging rules, a log entry matches if it matches ANY of the rules:
# Log entries that have 'firewall' topic OR 'error' topic/system logging add topics=firewall action=memory/system logging add topics=error action=memoryPractical Examples
Section titled “Practical Examples”# Log all firewall events (any severity)/system logging add topics=firewall action=memory
# Log only critical firewall events (AND logic)/system logging add topics=firewall,critical action=memory
# Log all critical events regardless of topic (separate rules = OR)/system logging add topics=firewall action=memory/system logging add topics=interface action=memory/system logging add topics=critical action=memoryCommon Troubleshooting Scenarios
Section titled “Common Troubleshooting Scenarios”High CPU Usage
Section titled “High CPU Usage”- Check CPU usage by process:
/system resource cpu print - Review IRQ distribution:
/system resource irq print - Check for interface storms
- Review firewall rules for excessive logging
High Memory Usage
Section titled “High Memory Usage”- Check memory with
/system resource print - Review active connections
- Check for routing table issues
- Look for memory leaks in packages
Network Connectivity Issues
Section titled “Network Connectivity Issues”- Verify interface status:
/interface print - Test basic connectivity:
/ping - Trace path:
/tool traceroute - Check firewall rules:
/ip firewall filter print - Review NAT rules:
/ip firewall nat print
Interface Errors
Section titled “Interface Errors”- Check interface statistics:
/interface ethernet print - Look for CRC errors, frame errors
- Verify cable and link status
- Check speed/duplex settings
Temperature Issues
Section titled “Temperature Issues”- Monitor health:
/system health print - Check fan operation
- Verify environmental conditions
- Review CPU/overtemp settings
Monitoring Best Practices
Section titled “Monitoring Best Practices”- Regular monitoring: Check resource usage periodically
- Set up logging: Enable appropriate log topics
- Use profiles: Create threshold alerts for critical metrics
- Baseline performance: Document normal values for comparison
- Document issues: Keep records of problems and resolutions
Related Resources
Section titled “Related Resources”- Official MikroTik Diagnostics Documentation
- RouterOS Resource Management
- Health Monitoring
- Wireshark - Packet analysis tool