Skip to content

Instantly share code, notes, and snippets.

View StianOvrevage's full-sized avatar

Stian Øvrevåge StianOvrevage

View GitHub Profile
@StianOvrevage
StianOvrevage / aks-credentials.md
Last active March 19, 2020 11:10
Get all AKS credentials with jq

Get AKS credentials for all clusters on current subscription:

bash <(az aks list | jq -r '.[] | "az aks get-credentials --overwrite-existing --admin --resource-group \(.resourceGroup|@sh) --name \(.name|@sh)"')

To list and change subscriptions, use:

az account list --output table

az account set --subscription "MySub"

Keybase proof

I hereby claim:

  • I am stianovrevage on github.
  • I am stian (https://keybase.io/stian) on keybase.
  • I have a public key whose fingerprint is E003 E44B B94C 6EA3 93BD 73FE 623A CD53 1475 72B1

To claim this, I am signing this object:

@StianOvrevage
StianOvrevage / collectd-snmp-memleak-valgrind-massif
Created May 2, 2014 14:44
valgrind massif of collectd snmp plugin memory leak
--------------------------------------------------------------------------------
Command: /opt/collectd/sbin/collectd -C /opt/collectd/etc/instance-01-kb-infrastructure/collectd.conf -f
Massif arguments: (none)
ms_print arguments: massif.out.16475
--------------------------------------------------------------------------------
MB
35.22^ #
| #
@StianOvrevage
StianOvrevage / collectd-snmp-memleak-full-valgrind
Created May 2, 2014 11:52
valgrind of collectd snmp plugin memory leak - full+show-reachable
# valgrind -v --leak-check=full --show-reachable=yes /opt/collectd/sbin/collectd -C /opt/collectd/etc/instance-01-kb-infrastructure/collectd.conf -f
==7739== Memcheck, a memory error detector
==7739== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==7739== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==7739== Command: /opt/collectd/sbin/collectd -C /opt/collectd/etc/instance-01-kb-infrastructure/collectd.conf -f
==7739==
--7739-- Valgrind options:
--7739-- --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp
--7739-- -v
--7739-- --leak-check=full
@StianOvrevage
StianOvrevage / collectd-snmp-memleak
Created May 2, 2014 11:47
valgrind of collectd snmp plugin memory leak
==7040== HEAP SUMMARY:
==7040== in use at exit: 4,372,425 bytes in 36,718 blocks
==7040== total heap usage: 749,778 allocs, 713,060 frees, 2,007,697,009 bytes allocated
==7040==
==7040== 8 bytes in 1 blocks are definitely lost in loss record 131 of 687
==7040== at 0x4C28BED: malloc (vg_replace_malloc.c:263)
==7040== by 0x5759C41: strdup (strdup.c:43)
==7040== by 0x41D79C: yyparse (parser.y:101)
==7040== by 0x41AFCC: oconfig_parse_fh (oconfig.c:60)
==7040== by 0x41B09C: oconfig_parse_file (oconfig.c:90)