Skip to content

Instantly share code, notes, and snippets.

View bpaquet's full-sized avatar

Bertrand Paquet bpaquet

View GitHub Profile
@bpaquet
bpaquet / Readme.md
Last active February 5, 2024 13:16
soci_on_eks

To use it,

Tested with AMI amazon-eks-gpu-node-1.25-v20231230

  • deploy all these files on a public S3 or on any webserver
  • Add in the user data script, before eks bootstrap something like
curl https://myserver/soci/install.sh | bash -s -- https://myserver/soci
ARG VERSION
FROM debian:${VERSION} as prebuilder
RUN cp -r /var /c
FROM debian:${VERSION} as prebuilder2
RUN cp -r /usr /d
FROM debian:${VERSION} as prebuilder3
@bpaquet
bpaquet / jvm-stats.pl
Created February 9, 2016 16:58
Monitoring jvm from collectd
#!/usr/bin/perl
use Getopt::Long;
use strict;
use warnings;
my $vm_name = "";
my $interval = 10;
GetOptions ("vm_name=s" => \$vm_name, "interval=i" => \$interval) or die 'Syntax error';
@bpaquet
bpaquet / gist:ed5af9b772bc931d61e0
Last active August 29, 2015 14:16
Dump a large elasticsearch index to a csv file
require 'net/http'
require 'json'
require 'uri'
scroll_id = nil
counter = 0
while true
$stderr.puts "Running #{counter}"
if scroll_id
var r = require('http').request({host: 'localhost', port: 8765, path: '/'}, function(res) {
console.log('res');
res.on('end', function() {
console.log('end');
});
});
r.end();
setTimeout(function() {
#!/bin/bash
usage() {
echo "sync.sh --from from_path --to to_path [--excl excl_path]"
}
excl_opts=""
while [ ! -z "$1" ]; do
case "$1" in
-f|--from) from=$2 ; shift 2 ;;
@bpaquet
bpaquet / Haproxy monitoring for collectd
Last active December 26, 2015 12:49
Script for monitoring haproxy status from collect.d
LoadPlugin "exec"
<Plugin "exec">
Exec "haproxy:haproxy" "/usr/local/bin/haproxy-stats" "-p" "10"
</Plugin>
@bpaquet
bpaquet / gist:3922818
Created October 20, 2012 09:47
Zlib leak node v0.8.12
var zlib = require('zlib');
var completed = 0;
function printProcMem() {
if (completed % 100 == 0) {
var mem = process.memoryUsage();
console.log('%d %d %d %d',
completed, mem.rss / 1000000, mem.heapTotal / 1000000, mem.heapUsed / 1000000);
}