This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import subprocess | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
from urlparse import parse_qsl, urlparse | |
commands = { | |
"/hello": "cmd /c echo hello {name}" | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.gatling.test | |
import io.gatling.app.Gatling | |
import io.gatling.commons.util.ClockSingleton.nowMillis | |
import io.gatling.commons.validation.Failure | |
import io.gatling.core.Predef._ | |
import io.gatling.core.action.builder.ActionBuilder | |
import io.gatling.core.action.{Action, ExitableAction} | |
import io.gatling.core.session.{Expression, Session} | |
import io.gatling.core.stats.StatsEngine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netstat -tap --numeric-port 2>/dev/null |\ | |
awk 'NR >2 { print $6,$4,$5,substr($7,0,index($7, "/")-1);}' |\ | |
sort -ru |\ | |
awk -v pids="$1" 'BEGIN {OFS=","} { port=substr($2,index($2,":")+1) } pids !~ $4 {next} /LISTEN/ { listen[port]=1; $1="LIS"; print $0; next} { (port in listen)?$1="IN":$1="OUT"; print $0 }' |