Skip to content

Instantly share code, notes, and snippets.

@renoirb
Last active March 25, 2020 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renoirb/fa985b8a6bdc4b8608d05240f98f5adc to your computer and use it in GitHub Desktop.
Save renoirb/fa985b8a6bdc4b8608d05240f98f5adc to your computer and use it in GitHub Desktop.
Renoir's previously shared bash scripts

Written by Renoir

Formula/Playbook

Gists

In project

#!/bin/bash
hash docker 2>/dev/null || { echo >&2 "Docker is not installed. This helper will not work. Aborting."; exit 1; }
echo 'Sysdig utility'
echo '--------------'
echo 'Some commands to try things out'
echo ' sysdig -pc -A -c echo_fds fd.port=80 and evt.buffer contains GET'
echo ' sysdig -pc -A -c echo_fds fd.port=8080 and evt.buffer contains rbaccess and not evt.buffer contains olb'
echo ' sysdig -pc -A -c echo_fds fd.port=8080'
echo ' sysdig -c httplog fd.sip=172.22.72.7'
echo ' sysdig -pc -A proc.name=php-fpm7'
echo ' sysdig -cl'
echo ' sysdig -c lscontainers'
echo ''
echo 'Legend:'
echo ' -pc: is for telling to make output container friendly'
echo ' -A: is fo making sure output we see is ASCII'
echo ' -cl: is to list available Chisels (selectors)'
echo ''
echo 'See also:'
echo ' - https://github.com/draios/sysdig/wiki/Chisels-User-Guide'
echo ' - https://github.com/draios/sysdig/wiki/Sysdig-Chisel-API-Reference-Manual'
echo ' - https://github.com/draios/sysdig/wiki/Sysdig-User-Guide'
echo ' - https://github.com/draios/sysdig/wiki/Container-Enabled-Chisels'
echo ' - https://github.com/draios/sysdig/wiki/Sysdig-Examples#networking'
echo ' - https://github.com/draios/sysdig/wiki/Sysdig-Quick-Reference-Guide'
echo ' - https://www.sysdig.org/wiki/sysdig-examples/'
echo ' - https://wiki.mikejung.biz/Sysdig'
echo ''
echo 'Useful articles:'
echo ' - https://www.2daygeek.com/sysdig-linux-system-diagnostic-monitor-troubleshoot-tool'
echo ' - https://sysdig.com/blog/decode-your-http-traffic-with-sysdig'
echo ''
docker run -it --rm --privileged=true --volume=/usr/bin/docker:/usr/bin/docker --volume=/var/run/docker.sock:/host/var/run/docker.sock --volume=/dev:/host/dev --volume=/proc:/host/proc:ro --volume=/boot:/host/boot:ro --volume=/lib/modules:/host/lib/modules:ro --volume=/usr:/host/usr:ro sysdig/sysdig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment