Skip to content

Instantly share code, notes, and snippets.

View amorenoz's full-sized avatar

Adrián Moreno amorenoz

View GitHub Profile
@amorenoz
amorenoz / ovs_sos_oneliners.sh
Last active July 28, 2022 14:35
OVS sos report
# datapath flows by source IP address
cat sos_commands/openvswitch/ovs-dpctl_dump-flows_-m | gawk '{ match ($0, /ipv[46]\(src=[[:alnum:]:.]+,/, ip); print ip[0]} ' | sort | uniq -c | sort -k 1 -n -r
@amorenoz
amorenoz / inspect_image.sh
Created October 19, 2020 07:51
Simple script to inspect container layers mediatypes and whether they can be pulled or not
#!/bin/bash
IMAGE="docker://cilium/startup-script"
print_mediatypes(){
echo "Media types of manifest at $1"
info=$(sudo skopeo inspect --raw $1)
echo "Manifest MediaType $(echo $info | jq -r '.config.mediaType')"
echo "Layers:"
echo $info | jq -r '.layers[]| " Layer: \(.digest) MediaType = \(.mediaType)"'
}