Skip to content

Instantly share code, notes, and snippets.

@gerco
gerco / pbs-backup-size.sh
Last active September 23, 2021 17:17
Get the on-disk size of all chunks in a Proxmox Backup Server backup
datastore=/bulkpool/backups
backup=vm/100/2021-09-19T06:00:02Z
cd $datastore/$backup
for x in `xxd -s +4096 -p -c 32 *.img.fidx`
do
ls -l $datastore/.chunks/${x:0:4}/$x | awk '{print $5}'
done | paste -sd+ | bc
@gerco
gerco / matrixcli.go
Created November 5, 2017 16:06
Zabbix Matrix integration script
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"net/http"
"os"
package main
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"net/http"
"os"
#include <iostream>
#include <memory>
using namespace std;
static int mycount = 0;
class SomeObject {
private:

Keybase proof

I hereby claim:

  • I am gerco on github.
  • I am gerco (https://keybase.io/gerco) on keybase.
  • I have a public key ASDcmSy3wwMkXpwUdPUChdt7jWO3nKTSRYNazaowCy-oJgo

To claim this, I am signing this object: