This file contains hidden or 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 | |
| # SPDX-License-Identifier: GPL-3.0-or-later | |
| # | |
| # Read-only indicator-of-compromise check for netdata/netdata#24401 | |
| # (Function payload injection -> go.d dyncfg `test` -> ${cmd:...} secret -> command execution). | |
| # | |
| # The script changes nothing. Run it as root for full coverage (journal namespace, crontabs, other users' files). | |
| # | |
| # Usage: netdata-ioc-check-24401.sh [--since "YYYY-MM-DD"] [--user netdata] [--prefix /opt/netdata] | |
| # [--access-log 'GLOB'] [--max-rows N] [--quiet] |
This file contains hidden or 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 | |
| # SPDX-License-Identifier: GPL-3.0-or-later | |
| # Read-only provider evidence; no installation, workload or service management. | |
| set +e +u | |
| set -o pipefail | |
| VERSION=1.1.1 | |
| exec 3>&2 | |
| usage() { |
This file contains hidden or 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 python3 | |
| """Repeat one arithmetic question against OpenAI/Anthropic-compatible APIs. | |
| Python 3.10+; standard library only. No pip install needed. | |
| Example (600 requests: 100 per API/streaming combination): | |
| python3 arithmetic_probe.py --base-url http://localhost:8000/v1 \ | |
| --model YOUR_MODEL --temperature 1.0 --reasoning none \ | |
| --concurrency 32 --tries 100 --api all --stream both --output results.json | |
| --tries is PER API/streaming mode; all + both means six times that number. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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] |
NewerOlder