!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/netdata/tests/   drwxr-xr-x
Free 13.19 GB of 57.97 GB (22.75%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     stress.sh (2.19 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/bin/bash
# SPDX-License-Identifier: GPL-3.0-or-later

if ! hash curl 2>/dev/null
then
	1>&2 echo "'curl' not found on system. Please install 'curl'."
	exit 1
fi

# set the host to connect to
if [ -n "$1" ]
then
	host="$1"
else
	host="http://127.0.0.1:19999"
fi
echo "using netdata server at: $host"

# shellcheck disable=SC2207 disable=SC1117
charts=($(curl -k "$host/netdata.conf" 2>/dev/null | grep "^\[" | cut -d '[' -f 2 | cut -d ']' -f 1 | grep -v ^global$ | grep -v "^plugin" | sort -u))
if [ "${#charts[@]}" -eq 0 ]
then
	echo "Cannot download charts from server: $host"
	exit 1
fi

update_every="$(curl -k "$host/netdata.conf" 2>/dev/null | grep "update every = " | head -n 1 | cut -d '=' -f 2)"
[ $(( update_every + 1 - 1)) -eq 0 ] && update_every=1

entries="$(curl -k "$host/netdata.conf" 2>/dev/null | grep "history = " | head -n 1 | cut -d '=' -f 2)"
[ $(( entries + 1 - 1)) -eq 0 ] && entries=3600

# to compare equal things, set the entries to 3600 max
[ $entries -gt 3600 ] && entries=3600

if [ $entries -ne 3600 ]
then
	echo >&2 "You are running a test for a history of $entries entries."
fi

modes=("average" "max")
formats=("jsonp" "json" "ssv" "csv" "datatable" "datasource" "tsv" "ssvcomma" "html" "array")
options="flip|jsonwrap"

now=$(date +%s)
first=$((now - (entries * update_every)))
duration=$((now - first))

file="$(mktemp /tmp/netdata-stress-XXXXXXXX)"
cleanup() {
	echo "cleanup"
	[ -f "$file" ] && rm "$file"
}
trap cleanup EXIT

while true
do
	echo "curl -k --compressed --keepalive-time 120 --header \"Connection: keep-alive\" \\" >"$file"
	# shellcheck disable=SC2034
	for x in {1..100}
	do
		dt=$((RANDOM * duration / 32767))
		st=$((RANDOM * duration / 32767))
		et=$(( st + dt ))
		[ $et -gt "$now" ] && st=$(( now - dt ))

		points=$((RANDOM * 2000 / 32767 + 2))
		st=$((first + st))
		et=$((first + et))

		mode=$((RANDOM * ${#modes[@]} / 32767))
		mode="${modes[$mode]}"

		chart=$((RANDOM * ${#charts[@]} / 32767))
		chart="${charts[$chart]}"

		format=$((RANDOM * ${#formats[@]} / 32767))
		format="${formats[$format]}"

		echo "--url \"$host/api/v1/data?chart=$chart&mode=$mode&format=$format&options=$options&after=$st&before=$et&points=$points\" \\"
	done >>"$file"
	bash "$file" >/dev/null
done

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0052 ]--