#!/bin/ash
#
# This script is used for debug only.
# The script signals the resource monitor task to consume memory
# by allocating 4Mbyte buffers, and never freeing them.  
# Calling this script several times will cause free memory to
# drop below a predetermine threshold and cause an SP reboot.
#
RESOURCE_TASK_PIDFILE="/var/run/resourcemon.pid"

monitor_pid=$(cat $RESOURCE_TASK_PIDFILE)

if [[ $monitor_pid ]]; then
    kill -s USR1 $monitor_pid
fi

