Yetixx
Yetixx
Server: nginx/1.28.0
System: Linux instance-rr9enuui 6.1.0-15-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.66-1 (2023-12-09) x86_64
User: www (1000)
PHP: 8.0.26
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //opt/bcm-agent/bin/supervise.bcm-agent
#! /bin/sh

PATH=/usr/sbin:/sbin:/usr/bin:/bin
IFS=

cd `dirname "${0}"` || exit 1
readonly G_LOCAL_SBIN=`pwd`

run_limit() {

        ulimit -m 2097152 -n 1024
# nice limit
        nice_prefix=""
        type nice >/dev/null && nice_prefix="nice -n 19"

# taskset
        core_num="$(cat /proc/cpuinfo | grep processor | wc -l)"
        last_core="$((${core_num} - 1))"
        taskset_prefix=""
        type taskset >/dev/null
        [ $? -eq 0 -a $core_num -gt 1 ] &&
        taskset_prefix="taskset -c 1-$last_core "
        eval "$nice_prefix $taskset_prefix $@" >/dev/null
        </dev/null 2>&1
}

run()
{
    for i in 1 2 3 4 5 6 7 8 9 10
    do
        run_limit ${G_LOCAL_SBIN}/bcm-agent
        sleep 30
    done
    exit 1
}

if [ $# -eq 1 ]; then
    if [ x"${1}" = x"--run" ]; then
        run
    fi
fi

exec setsid "${0}" --run </dev/null >/dev/null 2>&1
exit 1