Skip to content

Instantly share code, notes, and snippets.

View carlpett's full-sized avatar

Calle Pettersson carlpett

View GitHub Profile
@carlpett
carlpett / data.csv
Created May 20, 2020 18:23
podman images timings
NumImages RealTime UserTime SystemTime
127 0.81 0.63 0.40
128 0.84 0.69 0.37
129 0.85 0.69 0.37
130 0.89 0.73 0.40
131 0.92 0.71 0.43
132 0.91 0.75 0.40
133 0.95 0.76 0.43
134 0.98 0.78 0.45
135 0.98 0.80 0.43

Many programs will be outputting the their errors directly onto stdout/stderr, and then ingesting these logs with some form of log aggregation tool (Logstash/Splunk/...). With multi-line errors, this requires configuring these tools to recognize log entries spanning multiple lines. To make this easier, it might make sense to have a common prefix on all following lines, rather than alternating spaces and triple-dash as in the examples:

write users database:
    more detail here
    /path/to/database.go:111
--- call myserver.Method:
    /path/to/grpc.go:222
--- dial myserver:3333:
 /path/to/net/dial.go:333

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

type StatefulSetStatus struct {
// observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the
// StatefulSet's generation, which is updated on mutation by the API Server.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"`
// replicas is the number of Pods created by the StatefulSet controller.
Replicas int32 `json:"replicas" protobuf:"varint,2,opt,name=replicas"`
// readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.
digraph "unnamed" {
node [style=filled fillcolor="#f8f8f8"]
subgraph cluster_L { L [shape=box fontsize=32 label="Type: inuse_space\lTime: May 25, 2017 at 10:06pm (CEST)\l7607.71kB of 7607.71kB total ( 100%)\lDropped 180 nodes (cum <= 38.04kB)\lDropped 1 edge (freq <= 7.61kB)\l"] }
N1 [label="github.com/martinlindhe/wmi_exporter/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).Gather\n1536.14kB(20.19%)\nof 3092.59kB(40.65%)" fontsize=24 shape=box tooltip="github.com/martinlindhe/wmi_exporter/vendor/github.com/prometheus/client_golang/prometheus.(*Registry).Gather (3092.59kB)"]
N2 [label="bytes.makeSlice\n1044.13kB(13.72%)" fontsize=22 shape=box tooltip="bytes.makeSlice (1044.13kB)"]
N3 [label="compress/flate.NewWriter\n902.59kB(11.86%)" fontsize=21 shape=box tooltip="compress/flate.NewWriter (902.59kB)"]
N4 [label="github.com/martinlindhe/wmi_exporter/vendor/github.com/beorn7/perks/quantile.(*stream).merge\n524.09kB(6.89%)" fontsize=18 shape=box tooltip="github.com/martinlindhe/wmi_exporter/v
@carlpett
carlpett / calltest.py
Created March 3, 2017 15:12
saltstack/salt #39717
from salt import client
from time import sleep
import objgraph
import gc
objgraph.show_growth(limit=3)
def loopetiloop():
i = 0
while True:
caller = client.Caller()
2017/02/16 20:53:13.521822 [INFO] consul-template v0.18.1 (9c62737)
2017/02/16 20:53:13.522833 [INFO] (runner) creating new runner (dry: true, once: false)
2017/02/16 20:53:13.526670 [DEBUG] (runner) final config: {"Consul":{"Address":"","Auth":{"Enabled":false,"Username":"","Password":""},"Retry":{"Attempts":5,"Backoff":250000000,"Enabled":true},"SSL":{"CaCert":"","CaPath":"","Cert":"","Enabled":false,"Key":"","ServerName":"","Verify":true},"Token":"","Transport":{"DialKeepAlive":30000000000,"DialTimeout":30000000000,"DisableKeepAlives":false,"MaxIdleConnsPerHost":5,"TLSHandshakeTimeout":10000000000}},"Dedup":{"Enabled":false,"MaxStale":2000000000,"Prefix":"consul-template/dedup/","TTL":15000000000},"Exec":{"Command":"","Enabled":false,"Env":{"Blacklist":[],"Custom":[],"Pristine":false,"Whitelist":[]},"KillSignal":2,"KillTimeout":30000000000,"ReloadSignal":null,"Splay":0,"Timeout":0},"KillSignal":2,"LogLevel":"trace","MaxStale":2000000000,"PidFile":"","ReloadSignal":1,"Syslog":{"Enabled":false,"Facility":"LO
address_book_operations_total{operation}
ABANRPersec ambiguous_name_resolution
ABBrowsesPersec browse
ABMatchesPersec find
ABPropertyReadsPersec property_read
ABSearchesPersec search
ABProxyLookupsPersec proxy_search
address_book_client_sessions
ABClientSessions
wmi_dns_zone_transfer_requests_received_total{type="full/incremental"}
AXFRRequestReceived : 0
IXFRRequestReceived : 0
wmi_dns_zone_transfer_requests_sent_total{type="full/incremental/soa"}
AXFRRequestSent : 0
IXFRRequestSent : 0
ZoneTransferSOARequestSent : 0
wmi_dns_zone_transfer_response_received_total{type="full/incremental"}
AXFRResponseReceived : 0
IXFRResponseReceived : 0
Oct 25 15:04:52 machine-name nomad[1359]: 2016/10/25 15:04:52.655335 [ERR] driver.docker: failed to wait for 2c72a69a8031f33de23f150769da9434f44283edb747c742bcf46f185cdccd4d; container already terminated
Oct 25 15:04:52 machine-name nomad[1359]: driver.docker: failed to wait for 2c72a69a8031f33de23f150769da9434f44283edb747c742bcf46f185cdccd4d; container already terminated
Oct 25 15:04:52 machine-name nomad[1359]: driver.docker: failed to wait for c8606136bff98f7b26fb53a463a2681b5d17ffa6053df13512631b348845e45b; container already terminated
Oct 25 15:04:52 machine-name nomad[1359]: driver.docker: failed to wait for e65f19378c46c84e1736b08536f02c60ccf00447d8d7050a3d5ff85bb1e7980c; container already terminated
Oct 25 15:04:52 machine-name nomad[1359]: client: task "exporter" for alloc "6cc7ec51-57a6-e84e-bb04-062e7cac7f03" failed: Wait returned exit code 0, signal 0, and error Post http://unix.sock/containers/e65f19378c46c84e1736b08536f02c60ccf00447d8d7050a3d5ff85bb1e7980c/wait: EOF
Oct 25 15:04:52 machine-name