Skip to content

Instantly share code, notes, and snippets.

View stgraber's full-sized avatar

Stéphane Graber stgraber

View GitHub Profile
@stgraber
stgraber / keybase.md
Last active May 26, 2016 03:35
keybase

Keybase proof

I hereby claim:

  • I am stgraber on github.
  • I am stgraber (https://keybase.io/stgraber) on keybase.
  • I have a public key ASDOPn6_FWOpgMVHJ5j1Q__ZZcarrGMSdo3S_tfRGr8lZgo

To claim this, I am signing this object:

@stgraber
stgraber / metrics
Created October 1, 2021 18:39
/1.0/metrics output
# HELP lxd_cpu_seconds_total The total number of CPU seconds used in milliseconds.
# TYPE lxd_cpu_seconds_total counter
lxd_cpu_seconds_total{cpu="0",mode="system",name="lxd-build",project="default",type="container"} 3097
lxd_cpu_seconds_total{cpu="0",mode="user",name="lxd-build",project="default",type="container"} 50065
lxd_cpu_seconds_total{cpu="10",mode="system",name="lxd-build",project="default",type="container"} 8449
lxd_cpu_seconds_total{cpu="10",mode="user",name="lxd-build",project="default",type="container"} 126718
lxd_cpu_seconds_total{cpu="31",mode="system",name="lxd-build",project="default",type="container"} 0
lxd_cpu_seconds_total{cpu="31",mode="user",name="lxd-build",project="default",type="container"} 0
lxd_cpu_seconds_total{cpu="21",mode="system",name="lxd-build",project="default",type="container"} 0
lxd_cpu_seconds_total{cpu="21",mode="user",name="lxd-build",project="default",type="container"} 0
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x501f0000]
[ 0.000000] Linux version 5.15.2+ (ubuntu@c2400) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1 SMP Wed Nov 17 21:09:01 UTC 2021
[ 0.000000] Machine model: APM X-Gene Merlin board
[ 0.000000] efi: EFI v2.40 by X-Gene Merlin Board EFI Aug 19 2016 18:09:46
[ 0.000000] efi: ACPI=0x4ffa808000 ACPI 2.0=0x4ffa808014 SMBIOS 3.0=0x4ffa806000 ESRT=0x4fff039818 MEMRESERVE=0x4ffa3e1d18
[ 0.000000] esrt: Reserving ESRT space from 0x0000004fff039818 to 0x0000004fff039878.
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000004000000000-0x0000004fffffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x4ff7d27340-0x4ff7d2bfff]
[ 0.000000] Zone ranges:
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x501f0000]
[ 0.000000] Linux version 5.15.2+ (ubuntu@c2400) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1 SMP Wed Nov 17 21:09:01 UTC 2021
[ 0.000000] Machine model: APM X-Gene Merlin board
[ 0.000000] efi: EFI v2.40 by X-Gene Merlin Board EFI Aug 19 2016 18:09:46
[ 0.000000] efi: ACPI=0x4ffa808000 ACPI 2.0=0x4ffa808014 SMBIOS 3.0=0x4ffa806000 ESRT=0x4fff039818 MEMRESERVE=0x4ffa3e1c98
[ 0.000000] esrt: Reserving ESRT space from 0x0000004fff039818 to 0x0000004fff039878.
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000004000000000-0x0000004fffffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x4ff7d27340-0x4ff7d2bfff]
[ 0.000000] Zone ranges:
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x501f0000]
[ 0.000000] Linux version 5.15.2 (ubuntu@c2400) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1 SMP Thu Nov 18 16:27:22 UTC 2021
[ 0.000000] Machine model: APM X-Gene Merlin board
[ 0.000000] efi: EFI v2.40 by X-Gene Merlin Board EFI Aug 19 2016 18:09:46
[ 0.000000] efi: ACPI=0x4ffa808000 ACPI 2.0=0x4ffa808014 SMBIOS 3.0=0x4ffa806000 ESRT=0x4fff039818 MEMRESERVE=0x4ffa3e1c98
[ 0.000000] esrt: Reserving ESRT space from 0x0000004fff039818 to 0x0000004fff039878.
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000004000000000-0x0000004fffffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x4ff7d27340-0x4ff7d2bfff]
[ 0.000000] Zone ranges:
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x501f0000]
[ 0.000000] Linux version 5.15.2+ (ubuntu@c2400) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1 SMP Thu Nov 18 22:08:36 UTC 2021
[ 0.000000] Machine model: APM X-Gene Merlin board
[ 0.000000] efi: EFI v2.40 by X-Gene Merlin Board EFI Aug 19 2016 18:09:46
[ 0.000000] efi: ACPI=0x4ffa808000 ACPI 2.0=0x4ffa808014 SMBIOS 3.0=0x4ffa806000 ESRT=0x4fff039818 MEMRESERVE=0x4ffa3e1d18
[ 0.000000] esrt: Reserving ESRT space from 0x0000004fff039818 to 0x0000004fff039878.
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000004000000000-0x0000004fffffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x4ff7d27340-0x4ff7d2bfff]
[ 0.000000] Zone ranges:
Nov 23 03:10:28 delmak kernel: ixgbe 0002:01:00.0: registered PHC device on enP2s2
Nov 23 03:10:29 delmak kernel: ixgbe 0002:01:00.0 enP2s2: detected SFP+: 3
Nov 23 03:10:29 delmak kernel: ixgbe 0002:01:00.0 enP2s2: NIC Link is Up 10 Gbps, Flow Control: RX/TX
Nov 23 03:10:29 delmak kernel: IPv6: ADDRCONF(NETDEV_CHANGE): enP2s2: link becomes ready
Nov 23 03:10:34 delmak kernel: ------------[ cut here ]------------
Nov 23 03:10:34 delmak kernel: NETDEV WATCHDOG: enP2s2 (ixgbe): transmit queue 14 timed out
Nov 23 03:10:34 delmak kernel: WARNING: CPU: 14 PID: 0 at net/sched/sch_generic.c:477 dev_watchdog+0x374/0x380
Nov 23 03:10:34 delmak kernel: Modules linked in: nls_iso8859_1 dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua joydev input_leds cdc_acm efi_pstore acpi_ipmi ipmi_ssif ipmi_devintf cppc_cpufreq ipmi_msghandler hdma_mgmt hdma sch_fq_codel drm ip_tables x_tables autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor xor_neon raid6_pq
Nov 23 03:06:01 delmak kernel: Booting Linux on physical CPU 0x0000000001 [0x510f8000]
Nov 23 03:06:01 delmak kernel: Linux version 5.15.2+ (ubuntu@c2400) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1 SMP Thu Nov 18 22:08:36 UTC 2021
Nov 23 03:06:01 delmak kernel: efi: EFI v2.60 by Qualcomm
Nov 23 03:06:01 delmak kernel: efi: ACPI 2.0=0x95e0000 TPMFinalLog=0x9330000 SMBIOS 3.0=0x5720000 ESRT=0xb945398 MEMATTR=0xb932018 TPMEventLog=0x92e0018 RNG=0xe7ce498 MEMRESERVE=0x97d0b98
Nov 23 03:06:01 delmak kernel: efi: seeding entropy pool
Nov 23 03:06:01 delmak kernel: random: fast init done
Nov 23 03:06:01 delmak kernel: [Firmware Bug]: Failed to parse event in TPM Final Events Log
Nov 23 03:06:01 delmak kernel: esrt: Reserving ESRT space from 0x000000000b945398 to 0x000000000b945470.
Nov 23 03:06:01 delmak kernel: ACPI: Early table checksum verification disabled
Nov 23 03:06:01 delmak kernel: ACPI: RSDP 0x00000000095E0000 000024 (v02 QCOM )
@stgraber
stgraber / gist:d5d0e51048f6bdbca28e9411471f03dc
Created December 9, 2021 01:08
Terminal log for LXD cluster video
# Ceph setup
python3 -m venv ceph
cd ceph
. bin/activate
pip3 install git+https://github.com/ceph/ceph-deploy.git
ceph-deploy --username ubuntu new r02-amd64-01.cloud02.maas r02-amd64-02.cloud02.maas r02-amd64-03.cloud02.maas
ceph-deploy --username ubuntu install r02-amd64-01.cloud02.maas r02-amd64-02.cloud02.maas r02-amd64-03.cloud02.maas --release pacific --mon --mgr --mds --osd
ceph-deploy --username ubuntu install r02-amd64-01.cloud02.maas r02-amd64-02.cloud02.maas r02-amd64-03.cloud02.maas r02-amd64-04.cloud02.maas r02-amd64-05.cloud02.maas r02-amd64-06.cloud02.maas r02-arm64-01.cloud02.maas r02-arm64-02.cloud02.maas --release pacific --osd
ceph-deploy --username ubuntu mon create r02-amd64-01.cloud02.maas r02-amd64-02.cloud02.maas r02-amd64-03.cloud02.maas
@stgraber
stgraber / apc.py
Created December 17, 2021 03:33
Support for old APC PDUs
# Put in /root/apc.py
# Copyright 2015-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""American Power Conversion (APC) Power Driver.
Support for managing American Power Conversion (APC) PDU outlets via SNMP.
"""