!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/usr/share/doc/collectd-core/examples/   drwxr-xr-x
Free 12.3 GB of 61.93 GB (19.86%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     add_rra.sh (1.08 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/bin/bash

INPUT=$1
OUTPUT=$2

if [ -z "$INPUT" -o -z "$OUTPUT" ]
then
	cat <<USAGE
Usage: $0 <input> <output>
USAGE
	exit 1
fi

if [ ! -e "$INPUT" ]
then
	echo "No such file: $INPUT"
	exit 1
fi

if [ -e "$OUTPUT" ]
then
	echo "File exists: $OUTPUT"
	exit 1
fi

NUM_DS=0
rrdtool dump "$INPUT" | while read LINE
do
	echo "$LINE"

	if [ "$LINE" = "<ds>" ]
	then
		NUM_DS=$(($NUM_DS + 1))
	fi
	
	if [ "$LINE" = "<!-- Round Robin Archives -->" ]
	then
		for CF in MIN MAX AVERAGE
		do
			cat <<RRA
	<rra>
		<cf> $CF </cf>
		<pdp_per_row> 1 </pdp_per_row>
		<xff> 0.0000000000e+00 </xff>

		<cdp_prep>
RRA
			for ((i=0; i < $NUM_DS; i++))
			do
				echo "			<ds><value> NaN </value>  <unknown_datapoints> 1 </unknown_datapoints></ds>"
			done
			echo "		</cdp_prep>"
			echo "		<database>"

			DS_VALUES=`for ((i=0; i < $NUM_DS; i++)); do echo -n "<v> NaN </v>"; done`
			for ((i=0; i < 2200; i++))
			do
				echo "			<!-- $i --> <row>$DS_VALUES</row>"
			done
			echo "		</database>"
			echo "	</rra>"
		done
	fi
done >"$OUTPUT.xml"

rrdtool restore "$OUTPUT.xml" "$OUTPUT" -r >/dev/null
rm -f "$OUTPUT.xml"

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.5171 ]--