This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Save as: proc-net-tcp-test.c | |
Compile with: | |
gcc -O2 -o proc-net-tcp-test proc-net-tcp-test.c -lmnl | |
Run with: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# The directory to save the generated certificates (and everything about this certificate authority). | |
# This is only used on the node generating the certificates (usually on the journals server). | |
DIR="/etc/ssl/systemd-journal-remote" | |
# The journals centralization server name (the CN of the server certificate). | |
SERVER="server-hostname" | |
# All the DNS names or IPs this server is reachable at (the certificate will include them). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0-or-later | |
#include "july.h" | |
#define JULYL_MIN_ENTRIES 10 | |
struct JulyL_item { | |
Word_t index; | |
void *value; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// compile with: | |
// gcc -O2 -o spinlock spinlock.c -lpthread && ./spinlock | |
// | |
// verification and spinlock stats can be enabled with this: | |
// gcc -O2 -DSPINLOCK_VERIFY_AND_STATS=1 -o spinlock spinlock.c && ./spinlock | |
#define _GNU_SOURCE | |
#define __USE_GNU |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) taas bt | |
Thread 463 (Thread 0x7fd5d4952700 (LWP 272185) "DBENGINE"): | |
#0 futex_abstimed_wait (private=0, abstime=0x0, clockid=0, expected=3, futex_word=<optimized out>) at ../sysdeps/nptl/futex-internal.h:287 | |
#1 __pthread_rwlock_rdlock_full (abstime=0x0, clockid=0, rwlock=0x5615817057c8) at pthread_rwlock_common.c:460 | |
#2 __GI___pthread_rwlock_rdlock (rwlock=0x5615817057c8) at pthread_rwlock_rdlock.c:27 | |
#3 0x00007fd6d2e746e9 in uv_rwlock_rdlock () from target:/lib/x86_64-linux-gnu/libuv.so.1 | |
#4 0x000056157bd0b1a6 in get_descriptor (page_index=0x5615817057a0, start_time_s=1668212224) at database/engine/rrdengine.c:763 | |
#5 0x000056157bd0b24d in try_to_remove_v2_descriptor (ctx=0x56157c34fcc0 <multidb_ctx_storage_tier0>, page_index=0x5615817057a0, start_time_s=1668212224, expired=false) at database/engine/rrdengine.c:772 | |
#6 0x000056157bd0b4b8 in check_journal_file (journalfile=0x5615829dda10) at database/engine/rrdengine.c:830 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Stress With Curl | |
# Run multiple curl worker to stress a web server | |
# Real-time statistics at a Netdata server | |
# | |
# To use, you need: | |
# - curl | |
# - The nc command from the openbsd-netcat package | |
# - Netdata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./compile-gvpe/build-gvpe-linux-static.sh | |
ME : build-gvpe-linux-static.sh | |
DIR : /home/costa/src/netdata-demo-site.git/gvpe/compile-gvpe | |
/home/costa/src/netdata-demo-site.git/gvpe/compile-gvpe > sudo docker run -a stdin -a stdout -a stderr -i -t -v /home/costa/src/netdata-demo-site.git/gvpe/compile-gvpe:/tmp/mapped:rw alpine:edge /bin/sh /tmp/mapped/build-gvpe-linux-static.sh inside-container | |
/ > apk update | |
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | |
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | |
v3.15.0_alpha20210804-4905-ga7f55994b5 [https://dl-cdn.alpinelinux.org/alpine/edge/main] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# netdata contributors license agreement | |
**Thank you for contributing to netdata!** | |
This agreement is part of the legal framework of the open-source ecosystem | |
that adds some red tape, but protects both the contributor and the project. | |
To understand why this is needed, please read [a well-written chapter from | |
Karl Fogel’s Producing Open Source Software on CLAs](http://producingoss.com/en/copyright-assignment.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
program="${1}" | |
append= | |
# ----------------------------------------------------------------------------- | |
# HiDPI decision | |
primary_found="no" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
base="/sys/devices/system/cpu/cpufreq/policy0/" | |
ME="${0}" | |
SCALING_DRIVER="$(<${base}/scaling_driver)" | |
SCALING_GOVERNOR="$(<${base}/scaling_governor)" | |
AC_ONLINE=$(</sys/class/power_supply/AC/online) | |
# install this script in udev |
NewerOlder