Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../proc/self/root/bin
File: run_xcpu.sh
#!/bin/bash
[0] Fix | Delete
[1] Fix | Delete
# 0x.Tools by Tanel Poder [https://0x.tools]
[2] Fix | Delete
# Copyright 2019-2020 Tanel Poder
[3] Fix | Delete
#
[4] Fix | Delete
# This program is free software; you can redistribute it and/or modify
[5] Fix | Delete
# it under the terms of the GNU General Public License as published by
[6] Fix | Delete
# the Free Software Foundation; either version 2 of the License, or
[7] Fix | Delete
# (at your option) any later version.
[8] Fix | Delete
#
[9] Fix | Delete
# This program is distributed in the hope that it will be useful,
[10] Fix | Delete
# but WITHOUT ANY WARRANTY; without even the implied warranty of
[11] Fix | Delete
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[12] Fix | Delete
# GNU General Public License for more details.
[13] Fix | Delete
#
[14] Fix | Delete
# You should have received a copy of the GNU General Public License along
[15] Fix | Delete
# with this program; if not, write to the Free Software Foundation, Inc.,
[16] Fix | Delete
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
[17] Fix | Delete
[18] Fix | Delete
FREQUENCY=1 # 1 Hz sampling
[19] Fix | Delete
SUDO=sudo # change to empty string if running without sudo
[20] Fix | Delete
NICE=-5
[21] Fix | Delete
SLEEP=60
[22] Fix | Delete
PERF=/usr/bin/perf
[23] Fix | Delete
[24] Fix | Delete
if [ $# -ne 1 ]; then
[25] Fix | Delete
echo "Usage: $0 output_dir"
[26] Fix | Delete
exit 1
[27] Fix | Delete
fi
[28] Fix | Delete
[29] Fix | Delete
logger "$0 Starting up outdir=$1 nice=$NICE"
[30] Fix | Delete
[31] Fix | Delete
while true ; do
[32] Fix | Delete
$SUDO nice -n $NICE $PERF record -g -F $FREQUENCY -a \
[33] Fix | Delete
--switch-output=1m \
[34] Fix | Delete
--timestamp-filename \
[35] Fix | Delete
--timestamp \
[36] Fix | Delete
-o $1/xcpu
[37] Fix | Delete
[38] Fix | Delete
# we only get here should perf be terminated, try to restart
[39] Fix | Delete
logger "$0 terminated with $?, attempting to restart in $SLEEP seconds"
[40] Fix | Delete
sleep $SLEEP
[41] Fix | Delete
done
[42] Fix | Delete
[43] Fix | Delete
[44] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function