PingPlotter Feuilles de chaleur
- :material-content-copy: **[Copier sur le presse-papiers] (__LINK_0__)**
- **[Télécharger PDF](__LINK_0__)**
Aperçu général
PingPlotter est un puissant outil de dépannage et de surveillance réseau qui combine la fonctionnalité de ping et traceroute avec des capacités de visualisation avancées. Il permet de surveiller la performance du réseau en temps réel, de cerner les problèmes de réseau, les goulets d'étranglement et les problèmes intermittents que les outils traditionnels pourraient manquer.
Caractéristiques principales
- Visual Traceroute: Représentation graphique des chemins de réseau et des performances
- Surveillance continue: Suivi à long terme des performances du réseau
- Détection de perte de paquets: Identifier les problèmes de connectivité intermittents
- ** Analyse des latences** : mesures détaillées du temps aller-retour
- Données historiques: stocker et analyser les performances du réseau dans le temps
- ** Système d'accréditation**: Notifications pour les problèmes de réseau et les seuils
- Surveillance multi-objectifs: Surveiller simultanément plusieurs destinations
- Rapport: produire des rapports détaillés sur la performance du réseau
Installation
Installation de Windows
# Download PingPlotter from official website
# https://www.pingplotter.com/download
# Silent installation (Pro/Professional versions)
PingPlotterSetup.exe /S /v"/qn"
# Standard installation
# 1. Download installer
# 2. Run as administrator
# 3. Follow installation wizard
# 4. Enter license key (for paid versions)
# Verify installation
Get-Process | Where-Object {$_.ProcessName -eq "PingPlotter"}
# Check installation directory
Get-ChildItem "C:\Program Files\PingPlotter Pro"
Installation de la ligne de commande
# Using Chocolatey (Windows)
choco install pingplotter
# Using Winget (Windows)
winget install PingPlotter.PingPlotter
# Verify installation
pingplotter --version
```_
### Configuration de la licence
```powershell
# Configure license (Pro/Professional)
# Help → Enter License Key
# Or via command line:
pingplotter.exe -license "YOUR-LICENSE-KEY"
# Check license status
pingplotter.exe -license-info
# Offline activation (air-gapped systems)
# 1. Generate activation request
pingplotter.exe -activation-request > activation_request.txt
# 2. Submit request to PingPlotter support
# 3. Apply activation response
pingplotter.exe -activation-response activation_response.txt
```_
## Utilisation de base
### Début de la surveillance du réseau
```bash
# Launch PingPlotter GUI
pingplotter.exe
# Command line monitoring
pingplotter.exe -target google.com -samples 100
# Monitor specific IP address
pingplotter.exe -target 8.8.8.8 -interval 2.5
# Monitor with custom packet size
pingplotter.exe -target example.com -packetsize 1024
# Save results to file
pingplotter.exe -target google.com -samples 50 -output results.pp2
GUI Opérations de base
# Basic monitoring setup
# 1. Enter target address in "Address to trace" field
# 2. Click "Start" button
# 3. Monitor real-time results in timeline graph
# Configure monitoring parameters
# Edit → Preferences → Trace Options
# - Trace Interval: 2.5 seconds (default)
# - Packet Size: 32 bytes (default)
# - Timeout: 3000ms (default)
# - Max Hops: 30 (default)
# Multiple target monitoring
# File → New Target
# Enter additional target addresses
# Each target gets separate timeline
# Save monitoring session
# File → Save As → session.pp2
# Load previous session
# File → Open → session.pp2
Configuration de la cible
# DNS name resolution
pingplotter.exe -target www.example.com
# IPv4 address
pingplotter.exe -target 192.168.1.1
# IPv6 address
pingplotter.exe -target 2001:4860:4860::8888
# Custom port (for TCP traces)
pingplotter.exe -target example.com:80 -protocol tcp
# Multiple targets in batch file
echo "google.com" > targets.txt
echo "cloudflare.com" >> targets.txt
echo "8.8.8.8" >> targets.txt
pingplotter.exe -targetfile targets.txt
Configuration avancée
Options de traçage
# Advanced trace configuration
# Edit → Preferences → Trace Options
# Packet settings
$traceConfig = @{
PacketSize = 64 # Bytes (32-1472)
TraceInterval = 1.0 # Seconds (0.5-3600)
Timeout = 5000 # Milliseconds
MaxHops = 25 # Maximum trace hops
Protocol = "ICMP" # ICMP, UDP, TCP
}
# DNS settings
$dnsConfig = @{
ReverseDNS = $true # Resolve IP to hostname
DNSTimeout = 2000 # DNS resolution timeout
PreferIPv4 = $true # IPv4 preference
UseSystemDNS = $true # Use system DNS servers
}
# Performance settings
$perfConfig = @{
HighResolution = $true # High-resolution timing
CPUPriority = "Normal" # Process priority
NetworkBuffer = 8192 # Network buffer size
MaxSamples = 10000 # Maximum samples to store
}
Configuration d'alerte
# Configure alerts
# Tools → Alerts
# Latency alert
$latencyAlert = @{
Name = "High Latency Alert"
Condition = "Average latency > 200ms"
Duration = "5 minutes"
Action = "Email notification"
Recipients = "admin@company.com"
}
# Packet loss alert
$packetLossAlert = @{
Name = "Packet Loss Alert"
Condition = "Packet loss > 5%"
Duration = "2 minutes"
Action = "SNMP trap"
Community = "public"
Target = "192.168.1.100"
}
# Outage alert
$outageAlert = @{
Name = "Network Outage"
Condition = "100% packet loss"
Duration = "30 seconds"
Action = "Run script"
Script = "C:\Scripts\network_outage.bat"
}
# Email configuration
$emailConfig = @{
SMTPServer = "smtp.company.com"
Port = 587
Username = "alerts@company.com"
Password = "encrypted_password"
SSL = $true
From = "pingplotter@company.com"
}
Surveillance multi-objectifs
# Configure multiple targets
# File → Multi-Target List
# Create target list file
cat > monitoring_targets.txt << EOF
# Critical Infrastructure
google.com,Primary DNS
8.8.8.8,Google DNS
cloudflare.com,CDN Provider
192.168.1.1,Gateway Router
10.0.0.1,Internal Server
EOF
# Load target list
pingplotter.exe -targetfile monitoring_targets.txt
# Automated target management
pingplotter.exe -target-add "new-server.com"
pingplotter.exe -target-remove "old-server.com"
pingplotter.exe -target-list
# Group targets by category
# Infrastructure group
pingplotter.exe -group "Infrastructure" -target-add "router.company.com"
pingplotter.exe -group "Infrastructure" -target-add "switch.company.com"
# External services group
pingplotter.exe -group "External" -target-add "api.service.com"
pingplotter.exe -group "External" -target-add "cdn.provider.com"
Analyse et visualisation des données
Analyse chronologique
# Timeline graph interpretation
# Green bars: Good performance (low latency)
# Yellow bars: Moderate latency
# Red bars: High latency or packet loss
# Black bars: Complete packet loss
# Timeline navigation
# Zoom in: Ctrl + Mouse wheel up
# Zoom out: Ctrl + Mouse wheel down
# Pan: Click and drag timeline
# Reset view: Ctrl + 0
# Time range selection
$timeRanges = @{
"Last Hour" = "1h"
"Last 4 Hours" = "4h"
"Last Day" = "24h"
"Last Week" = "7d"
"Custom Range" = "Select start/end times"
}
# Statistical analysis
# View → Statistics Window
# Shows min/max/average latency per hop
# Packet loss percentage
# Standard deviation
# Jitter measurements
Analyse de la route
# Analyze network path
# Focus on specific hops showing issues
# Right-click hop → Properties
# Hop analysis metrics
echo "Hop Analysis Checklist:"
echo "1. Latency consistency"
echo "2. Packet loss patterns"
echo "3. DNS resolution time"
echo "4. Route stability"
echo "5. Geographic location"
# Identify problem areas
# High latency at specific hop = bottleneck
# Packet loss at multiple hops = upstream issue
# Intermittent issues = congestion or hardware problems
# Route changes = routing instability
Mesure des performances
# Key performance indicators
$performanceMetrics = @{
# Latency metrics
MinLatency = "Minimum round-trip time"
MaxLatency = "Maximum round-trip time"
AvgLatency = "Average round-trip time"
Jitter = "Latency variation (standard deviation)"
# Reliability metrics
PacketLoss = "Percentage of lost packets"
Availability = "Percentage of successful pings"
MTBF = "Mean time between failures"
MTTR = "Mean time to recovery"
# Quality metrics
MOS = "Mean Opinion Score (VoIP quality)"
RTT = "Round-trip time consistency"
Throughput = "Effective bandwidth utilization"
Stability = "Route consistency over time"
}
# Generate performance report
# Tools → Summary Report
# Select time range and metrics
# Export to PDF, HTML, or CSV
Automatisation et écriture
Automatisation de la ligne de commande
#!/bin/bash
# pingplotter_automation.sh
# Configuration
TARGET_LIST="targets.txt"
OUTPUT_DIR="/var/log/pingplotter"
REPORT_EMAIL="admin@company.com"
ALERT_THRESHOLD=200 # ms
# Create output directory
mkdir -p "$OUTPUT_DIR"
# Function to monitor single target
monitor_target() {
local target=$1
local duration=$2
local output_file="$OUTPUT_DIR/${target}_$(date +%Y%m%d_%H%M%S).pp2"
echo "Starting monitoring for $target..."
# Start PingPlotter monitoring
pingplotter.exe \
-target "$target" \
-samples "$duration" \
-interval 2.5 \
-output "$output_file" \
-autostart \
-minimize
# Wait for completion
while pgrep -f "pingplotter.*$target" > /dev/null; do
sleep 10
done
echo "Monitoring completed for $target"
# Analyze results
analyze_results "$output_file" "$target"
}
# Function to analyze results
analyze_results() {
local file=$1
local target=$2
# Extract statistics (requires PingPlotter Pro)
pingplotter.exe -analyze "$file" -export-csv "$OUTPUT_DIR/${target}_stats.csv"
# Check for alerts
local avg_latency=$(awk -F',' 'NR>1 {sum+=$3; count++} END {print sum/count}' "$OUTPUT_DIR/${target}_stats.csv")
if (( $(echo "$avg_latency > $ALERT_THRESHOLD" | bc -l) )); then
send_alert "$target" "$avg_latency"
fi
}
# Function to send alerts
send_alert() {
local target=$1
local latency=$2
local subject="Network Alert: High latency to $target"
local body="Average latency to $target: ${latency}ms (threshold: ${ALERT_THRESHOLD}ms)"
echo "$body" | mail -s "$subject" "$REPORT_EMAIL"
# Log alert
echo "$(date): ALERT - $target latency: ${latency}ms" >> "$OUTPUT_DIR/alerts.log"
}
# Main monitoring loop
main() {
echo "Starting automated PingPlotter monitoring..."
# Read targets from file
while IFS= read -r target; do
# Skip comments and empty lines
[[ "$target" =~ ^#.*$ ]] && continue
[[ -z "$target" ]] && continue
# Start monitoring in background
monitor_target "$target" 1440 & # 24 hours of monitoring
# Prevent overwhelming the system
sleep 5
done < "$TARGET_LIST"
# Wait for all monitoring to complete
wait
echo "All monitoring tasks completed"
# Generate summary report
generate_summary_report
}
# Function to generate summary report
generate_summary_report() {
local report_file="$OUTPUT_DIR/summary_$(date +%Y%m%d).html"
cat > "$report_file" << EOF
<!DOCTYPE html>
<html>
<head>
<title>PingPlotter Summary Report</title>
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
th { background-color: #f2f2f2; }
.alert { color: red; font-weight: bold; }
.good { color: green; }
.warning { color: orange; }
</style>
</head>
<body>
<h1>Network Performance Summary</h1>
<p>Generated: $(date)</p>
<h2>Target Performance</h2>
<table>
<tr>
<th>Target</th>
<th>Avg Latency (ms)</th>
<th>Packet Loss (%)</th>
<th>Status</th>
</tr>
EOF
# Process each target's results
for csv_file in "$OUTPUT_DIR"/*_stats.csv; do
if [[ -f "$csv_file" ]]; then
local target=$(basename "$csv_file" _stats.csv)
local avg_latency=$(awk -F',' 'NR>1 {sum+=$3; count++} END {print sum/count}' "$csv_file")
local packet_loss=$(awk -F',' 'NR>1 {sum+=$4; count++} END {print sum/count}' "$csv_file")
local status_class="good"
local status="Good"
if (( $(echo "$avg_latency > $ALERT_THRESHOLD" | bc -l) )); then
status_class="alert"
status="High Latency"
elif (( $(echo "$packet_loss > 1" | bc -l) )); then
status_class="warning"
status="Packet Loss"
fi
cat >> "$report_file" << EOF
<tr>
<td>$target</td>
<td>$(printf "%.2f" "$avg_latency")</td>
<td>$(printf "%.2f" "$packet_loss")</td>
<td class="$status_class">$status</td>
</tr>
EOF
fi
done
cat >> "$report_file" << EOF
</table>
<h2>Recent Alerts</h2>
<pre>$(tail -20 "$OUTPUT_DIR/alerts.log" 2>/dev/null || echo "No recent alerts")</pre>
</body>
</html>
EOF
echo "Summary report generated: $report_file"
# Email the report
if command -v mutt >/dev/null; then
mutt -s "PingPlotter Summary Report" -a "$report_file" -- "$REPORT_EMAIL" < /dev/null
fi
}
# Run main function
main "$@"
Intégration PowerShell
# PingPlotter PowerShell automation
# PingPlotter-Automation.ps1
param(
[string[]]$Targets = @("google.com", "cloudflare.com"),
[int]$Duration = 60, # minutes
[string]$OutputPath = "C:\PingPlotter\Reports",
[string]$AlertEmail = "admin@company.com"
)
# Ensure output directory exists
if (!(Test-Path $OutputPath)) {
New-Item -ItemType Directory -Path $OutputPath -Force
}
# Function to start PingPlotter monitoring
function Start-PingPlotterMonitoring {
param(
[string]$Target,
[int]$DurationMinutes,
[string]$OutputFile
)
$arguments = @(
"-target", $Target,
"-samples", ($DurationMinutes * 24), # 2.5s interval = 24 samples/minute
"-interval", "2.5",
"-output", $OutputFile,
"-autostart",
"-minimize"
)
Write-Host "Starting monitoring for $Target..."
$process = Start-Process -FilePath "pingplotter.exe" -ArgumentList $arguments -PassThru
return $process
}
# Function to analyze PingPlotter results
function Analyze-PingPlotterResults {
param(
[string]$ResultFile,
[string]$Target
)
# Export statistics to CSV
$csvFile = $ResultFile -replace "\.pp2$", "_stats.csv"
$arguments = @("-analyze", $ResultFile, "-export-csv", $csvFile)
Start-Process -FilePath "pingplotter.exe" -ArgumentList $arguments -Wait
if (Test-Path $csvFile) {
# Import and analyze CSV data
$data = Import-Csv $csvFile
$stats = @{
Target = $Target
AvgLatency = ($data | Measure-Object -Property Latency -Average).Average
MaxLatency = ($data | Measure-Object -Property Latency -Maximum).Maximum
MinLatency = ($data | Measure-Object -Property Latency -Minimum).Minimum
PacketLoss = ($data | Measure-Object -Property PacketLoss -Average).Average
SampleCount = $data.Count
}
return $stats
}
return $null
}
# Function to send email alerts
function Send-Alert {
param(
[string]$Target,
[hashtable]$Stats,
[string]$ToEmail
)
$subject = "PingPlotter Alert: Issues detected for $Target"
$body = @"
Network performance alert for target: $Target
Statistics:
- Average Latency: $($Stats.AvgLatency) ms
- Maximum Latency: $($Stats.MaxLatency) ms
- Minimum Latency: $($Stats.MinLatency) ms
- Packet Loss: $($Stats.PacketLoss)%
- Sample Count: $($Stats.SampleCount)
Please investigate network connectivity to this target.
Generated by PingPlotter automation script.
"@
try {
Send-MailMessage -To $ToEmail -Subject $subject -Body $body -SmtpServer "smtp.company.com"
Write-Host "Alert sent for $Target"
}
catch {
Write-Error "Failed to send alert: $_"
}
}
# Function to generate HTML report
function Generate-HTMLReport {
param(
[hashtable[]]$AllStats,
[string]$OutputPath
)
$reportFile = Join-Path $OutputPath "PingPlotter_Report_$(Get-Date -Format 'yyyyMMdd_HHmmss').html"
$html = @"
<!DOCTYPE html>
<html>
<head>
<title>PingPlotter Performance Report</title>
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
table { border-collapse: collapse; width: 100%; margin: 20px 0; }
th, td { border: 1px solid #ddd; padding: 12px; text-align: left; }
th { background-color: #f2f2f2; font-weight: bold; }
.good { background-color: #d4edda; }
.warning { background-color: #fff3cd; }
.alert { background-color: #f8d7da; }
.summary { background-color: #e7f3ff; padding: 15px; border-radius: 5px; margin: 20px 0; }
</style>
</head>
<body>
<h1>PingPlotter Performance Report</h1>
<div class="summary">
<h3>Report Summary</h3>
<p><strong>Generated:</strong> $(Get-Date)</p>
<p><strong>Monitoring Duration:</strong> $Duration minutes</p>
<p><strong>Targets Monitored:</strong> $($AllStats.Count)</p>
</div>
<h2>Performance Results</h2>
<table>
<tr>
<th>Target</th>
<th>Avg Latency (ms)</th>
<th>Max Latency (ms)</th>
<th>Min Latency (ms)</th>
<th>Packet Loss (%)</th>
<th>Samples</th>
<th>Status</th>
</tr>
"@
foreach ($stat in $AllStats) {
$statusClass = "good"
$status = "Good"
if ($stat.PacketLoss -gt 1) {
$statusClass = "alert"
$status = "Packet Loss"
}
elseif ($stat.AvgLatency -gt 200) {
$statusClass = "warning"
$status = "High Latency"
}
$html += @"
<tr class="$statusClass">
<td>$($stat.Target)</td>
<td>$([math]::Round($stat.AvgLatency, 2))</td>
<td>$([math]::Round($stat.MaxLatency, 2))</td>
<td>$([math]::Round($stat.MinLatency, 2))</td>
<td>$([math]::Round($stat.PacketLoss, 2))</td>
<td>$($stat.SampleCount)</td>
<td>$status</td>
</tr>
"@
}
$html += @"
</table>
<h2>Performance Recommendations</h2>
<ul>
<li>Latency < 50ms: Excellent performance</li>
<li>Latency 50-150ms: Good performance</li>
<li>Latency 150-300ms: Acceptable performance</li>
<li>Latency > 300ms: Poor performance - investigate</li>
<li>Packet Loss > 1%: Network issues - investigate</li>
</ul>
</body>
</html>
"@
$html | Out-File -FilePath $reportFile -Encoding UTF8
Write-Host "HTML report generated: $reportFile"
return $reportFile
}
# Main execution
Write-Host "Starting PingPlotter automation for $($Targets.Count) targets..."
$processes = @()
$resultFiles = @()
# Start monitoring for each target
foreach ($target in $Targets) {
$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
$outputFile = Join-Path $OutputPath "${target}_${timestamp}.pp2"
$process = Start-PingPlotterMonitoring -Target $target -DurationMinutes $Duration -OutputFile $outputFile
$processes += @{
Process = $process
Target = $target
OutputFile = $outputFile
}
$resultFiles += $outputFile
# Small delay to prevent overwhelming the system
Start-Sleep -Seconds 2
}
# Wait for all monitoring to complete
Write-Host "Waiting for monitoring to complete..."
foreach ($item in $processes) {
$item.Process.WaitForExit()
Write-Host "Monitoring completed for $($item.Target)"
}
# Analyze results
Write-Host "Analyzing results..."
$allStats = @()
foreach ($item in $processes) {
if (Test-Path $item.OutputFile) {
$stats = Analyze-PingPlotterResults -ResultFile $item.OutputFile -Target $item.Target
if ($stats) {
$allStats += $stats
# Check for alerts
if ($stats.AvgLatency -gt 200 -or $stats.PacketLoss -gt 1) {
Send-Alert -Target $item.Target -Stats $stats -ToEmail $AlertEmail
}
}
}
}
# Generate report
if ($allStats.Count -gt 0) {
$reportFile = Generate-HTMLReport -AllStats $allStats -OutputPath $OutputPath
# Display summary
Write-Host "`nMonitoring Summary:"
Write-Host "==================="
foreach ($stat in $allStats) {
$status = if ($stat.PacketLoss -gt 1) { "ALERT" } elseif ($stat.AvgLatency -gt 200) { "WARNING" } else { "OK" }
Write-Host "$($stat.Target): Avg $([math]::Round($stat.AvgLatency, 2))ms, Loss $([math]::Round($stat.PacketLoss, 2))% - $status"
}
Write-Host "`nReport saved to: $reportFile"
}
else {
Write-Warning "No results to analyze. Check PingPlotter installation and target accessibility."
}
Write-Host "PingPlotter automation completed."
Intégration avec d'autres outils
SNMP Intégration
# SNMP monitoring integration
# Requires SNMP tools and PingPlotter Pro
# Configure SNMP alerts
$snmpConfig = @{
Community = "public"
Version = "2c"
Target = "192.168.1.100"
Port = 162
}
# SNMP trap for network alerts
function Send-SNMPTrap {
param(
[string]$Target,
[string]$Message,
[hashtable]$Config
)
$oid = "1.3.6.1.4.1.12345.1.1" # Custom OID for PingPlotter alerts
snmptrap -v $Config.Version -c $Config.Community $Config.Target:$Config.Port $oid s "$Message"
}
# Integration script
$alertMessage = "High latency detected: $Target - $($stats.AvgLatency)ms"
Send-SNMPTrap -Target $target -Message $alertMessage -Config $snmpConfig
Intégration Syslog
#!/bin/bash
# Syslog integration for PingPlotter alerts
SYSLOG_SERVER="192.168.1.50"
SYSLOG_PORT=514
FACILITY="local0"
SEVERITY="warning"
# Function to send syslog message
send_syslog() {
local target=$1
local latency=$2
local packet_loss=$3
local message="PingPlotter Alert: Target=$target, Latency=${latency}ms, PacketLoss=${packet_loss}%"
# Send to remote syslog server
logger -n "$SYSLOG_SERVER" -P "$SYSLOG_PORT" -p "${FACILITY}.${SEVERITY}" "$message"
# Also log locally
logger -t "pingplotter" "$message"
}
# Example usage
send_syslog "google.com" "250" "2.5"
Intégration des bases de données
#!/usr/bin/env python3
# Database integration for PingPlotter data
import sqlite3
import csv
import datetime
import os
class PingPlotterDB:
def __init__(self, db_path="pingplotter.db"):
self.db_path = db_path
self.init_database()
def init_database(self):
"""Initialize database schema"""
conn = sqlite3.connect(self.db_path)
cursor = conn.cursor()
cursor.execute('''
CREATE TABLE IF NOT EXISTS network_performance (
id INTEGER PRIMARY KEY AUTOINCREMENT,
target TEXT NOT NULL,
timestamp DATETIME NOT NULL,
hop_number INTEGER,
hop_ip TEXT,
hop_hostname TEXT,
latency REAL,
packet_loss REAL,
jitter REAL
)
''')
cursor.execute('''
CREATE TABLE IF NOT EXISTS alerts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
target TEXT NOT NULL,
alert_type TEXT NOT NULL,
message TEXT,
timestamp DATETIME NOT NULL,
resolved BOOLEAN DEFAULT FALSE
)
''')
cursor.execute('''
CREATE INDEX IF NOT EXISTS idx_target_timestamp
ON network_performance(target, timestamp)
''')
conn.commit()
conn.close()
def import_csv_data(self, csv_file, target):
"""Import PingPlotter CSV export data"""
conn = sqlite3.connect(self.db_path)
cursor = conn.cursor()
with open(csv_file, 'r') as f:
reader = csv.DictReader(f)
for row in reader:
cursor.execute('''
INSERT INTO network_performance
(target, timestamp, hop_number, hop_ip, hop_hostname, latency, packet_loss, jitter)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
''', (
target,
datetime.datetime.now(),
row.get('Hop', 0),
row.get('IP', ''),
row.get('Hostname', ''),
float(row.get('Latency', 0)),
float(row.get('PacketLoss', 0)),
float(row.get('Jitter', 0))
))
conn.commit()
conn.close()
print(f"Imported data from {csv_file} for target {target}")
def log_alert(self, target, alert_type, message):
"""Log network alert"""
conn = sqlite3.connect(self.db_path)
cursor = conn.cursor()
cursor.execute('''
INSERT INTO alerts (target, alert_type, message, timestamp)
VALUES (?, ?, ?, ?)
''', (target, alert_type, message, datetime.datetime.now()))
conn.commit()
conn.close()
def get_performance_summary(self, target, hours=24):
"""Get performance summary for target"""
conn = sqlite3.connect(self.db_path)
cursor = conn.cursor()
since = datetime.datetime.now() - datetime.timedelta(hours=hours)
cursor.execute('''
SELECT
AVG(latency) as avg_latency,
MIN(latency) as min_latency,
MAX(latency) as max_latency,
AVG(packet_loss) as avg_packet_loss,
COUNT(*) as sample_count
FROM network_performance
WHERE target = ? AND timestamp > ?
''', (target, since))
result = cursor.fetchone()
conn.close()
if result:
return {
'target': target,
'avg_latency': result[0],
'min_latency': result[1],
'max_latency': result[2],
'avg_packet_loss': result[3],
'sample_count': result[4],
'period_hours': hours
}
return None
def generate_report(self, output_file="performance_report.html"):
"""Generate HTML performance report"""
conn = sqlite3.connect(self.db_path)
cursor = conn.cursor()
# Get all targets
cursor.execute('SELECT DISTINCT target FROM network_performance')
targets = [row[0] for row in cursor.fetchall()]
html = """
<!DOCTYPE html>
<html>
<head>
<title>Network Performance Report</title>
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
th { background-color: #f2f2f2; }
.good { background-color: #d4edda; }
.warning { background-color: #fff3cd; }
.alert { background-color: #f8d7da; }
</style>
</head>
<body>
<h1>Network Performance Report</h1>
<p>Generated: {}</p>
<table>
<tr>
<th>Target</th>
<th>Avg Latency (ms)</th>
<th>Min Latency (ms)</th>
<th>Max Latency (ms)</th>
<th>Packet Loss (%)</th>
<th>Samples</th>
<th>Status</th>
</tr>
""".format(datetime.datetime.now())
for target in targets:
summary = self.get_performance_summary(target)
if summary:
status_class = "good"
status = "Good"
if summary['avg_packet_loss'] > 1:
status_class = "alert"
status = "Packet Loss"
elif summary['avg_latency'] > 200:
status_class = "warning"
status = "High Latency"
html += f"""
<tr class="{status_class}">
<td>{target}</td>
<td>{summary['avg_latency']:.2f}</td>
<td>{summary['min_latency']:.2f}</td>
<td>{summary['max_latency']:.2f}</td>
<td>{summary['avg_packet_loss']:.2f}</td>
<td>{summary['sample_count']}</td>
<td>{status}</td>
</tr>
"""
html += """
</table>
</body>
</html>
"""
with open(output_file, 'w') as f:
f.write(html)
conn.close()
print(f"Report generated: {output_file}")
# Example usage
if __name__ == "__main__":
db = PingPlotterDB()
# Import sample data
# db.import_csv_data("google_com_stats.csv", "google.com")
# Log sample alert
db.log_alert("google.com", "high_latency", "Average latency exceeded 200ms")
# Generate report
db.generate_report()
Dépannage
Questions communes
# PingPlotter not starting
# 1. Check if already running
Get-Process | Where-Object {$_.ProcessName -eq "PingPlotter"}
# 2. Run as administrator
Start-Process "pingplotter.exe" -Verb RunAs
# 3. Check Windows Firewall
netsh advfirewall firewall show rule name="PingPlotter"
# 4. Verify license (Pro versions)
pingplotter.exe -license-info
# ICMP blocked by firewall
# 1. Allow ICMP in Windows Firewall
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
# 2. Check router/firewall settings
# Ensure ICMP echo requests are allowed
# 3. Test with different protocols
# Try UDP or TCP traces if ICMP is blocked
# High CPU usage
# 1. Reduce trace frequency
# Edit → Preferences → Trace Options → Trace Interval: 5 seconds
# 2. Limit number of targets
# Monitor fewer targets simultaneously
# 3. Reduce sample history
# Edit → Preferences → General → Max samples to keep: 1000
# Inaccurate results
# 1. Check system time synchronization
w32tm /query /status
# 2. Verify network adapter settings
# Disable power management on network adapter
# 3. Close bandwidth-intensive applications
# Ensure clean network conditions during testing
Optimisation des performances
# Optimize PingPlotter performance
# 1. System optimization
echo "Optimizing system for network monitoring..."
# Disable unnecessary services
sc config "Windows Search" start= disabled
sc config "Superfetch" start= disabled
# Set high performance power plan
powercfg -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
# Increase network buffer sizes
netsh int tcp set global autotuninglevel=normal
netsh int tcp set global chimney=enabled
netsh int tcp set global rss=enabled
# 2. PingPlotter optimization
# Edit PingPlotter.exe.config
cat > PingPlotter.exe.config << EOF
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<gcServer enabled="true"/>
<gcConcurrent enabled="true"/>
</runtime>
<appSettings>
<add key="MaxSamples" value="5000"/>
<add key="HighResolutionTiming" value="true"/>
<add key="NetworkBufferSize" value="65536"/>
</appSettings>
</configuration>
EOF
# 3. Network adapter optimization
# Disable power management
powershell "Get-NetAdapter | ForEach-Object { Disable-NetAdapterPowerManagement -Name $_.Name }"
# Set interrupt moderation
netsh int tcp set global rsc=disabled
Cette feuille de triche complète PingPlotter fournit tout ce qu'il faut pour le dépannage professionnel du réseau, la surveillance des performances et l'analyse automatisée du réseau, des opérations de base du ping aux scénarios d'automatisation et d'intégration avancés.