How to install ionCube loader Published: Mar 19, 2004
  • Rating

    4/5

PRM monitors the process table on a given system and matches process id's with set resource limits in the config file or per-process based rules. Process id's that match or exceed the set limits are logged and killed; includes e-mail alerts, kernel loggin

PRM (Process Resource Monitor)

Introduction
PRM monitors the process table on a given system and matches process id's with set resource limits in the config file or per-process based rules. Process id's that match or exceed the set limits are logged and killed; includes e-mail alerts, kernel logging routine and more...

How it works?
PRM works on the basis that once a process id is found matching resource limits; there is a corresponding trigger and wait value. The trigger value increments upwards from zero (0) to the defined value, pausing the duration of seconds defined as wait value. There after the status of the flagged pid is checked again, if still above or equal to resource limits the trigger/wait cycle begins again till the max trigger value is reached. When this trigger value is reached the given process is logged/killed.

This all together has the effect that applications with short burst resource spikes (e.g: apache, mysql etc..) are not killed; but rather on applications with prolonged resource consumption. Using the rule system, you can define different wait/trigger/resource values for any application.

Installation
First we must fetch the package:
wget http://www.rfxnetworks.com/downloads/prm-current.tar.gz

And extract it:
tar xvfz prm-current.tar.gz

The current version of prm as of this writing is 0.3, so lets cd to the 0.3 extracted path:
cd prm-0.3/

And finally run the enclosed install.sh script:
./install.sh

Configuration
The prm installation is located at '/usr/local/prm', and the configuration file is labeled 'conf.prm'.

Open the '/usr/local/prm/conf.prm' file with your preferred editor. There is an array of options in this file but we will only be focusing on the main variables.

Lets skip down to the user e-mail alert's section and set the USR_ALERT value to '1'; enabling alerts.
# enable user e-mail alerts [0=disabled,1=enabled] USR_ALERT="1"

And configure our e-mail addresses for alerts:
# e-mail address for alerts USR_ADDR="root, you@domain.com"

Check the 5,10, or 15 minute load average; relative to the later option below for min. load level.
# check 5,10,15 minute load average. [1,2,3 respective of 5,10,15] LC="1"

PRM optionally has a required load average for running. If the load is not equal to or greater than this value; PRM will not run. Setting this value to zero will force the script to always run but this should not be needed.
# min load level required to run (decimal values unsupported) MIN_LOAD="1"

This is the introduction described wait value, used for pauses between trigger increments. The value of wait multiplied by the value of kill_trig equal the duration of time before a process is killed (10x3=30seconds).
# seconds to wait before rechecking a flagged pid (pid's noted resource # intensive but not yet killed). WAIT="10"

The trigger limit before processes are killed, described in detail in the above 'wait' description and introduction.
# counter limit that a process must reach prior to kill. The counter value # increases for a process flagged resource intensive on rechecks. KILL_TRIG="3"

The max percentage of CPU a process should be allowed to use before PRM flags it for killing.
# Max CPU usage readout for a process - % of all cpu resources (decimal values unsupported) MAXCPU="35"

The max percentage of MEM a process should be allowed to use before PRM flags it for killing.
# Max MEM usage readout for a process - % of system total memory (decimal values unsupported) MAXMEM="15"

That is it; you should tweak the MAXCPU/MAXMEM limits to your desired needs but the defaults should be fine for most.

Usage
The executable program resides in '/usr/local/prm/prm' and '/usr/local/sbin/prm'. The prm executable can receive one of two arguments:

-s Standard run
-q Quiet run

The log path for prm is '/usr/local/prm/prm_log', as well pid specific logs are stored in '/usr/local/prm/killed/'.

A default cronjob for PRM is installed to '/etc/cron.d/prm', and is configured to run once every 5 minutes.

There is a provided ignore file, to ignore processes based on string rules. The ignore file is located at '/usr/local/prm/ignore'. This file supports line separated ignore strings. As a default the strings 'root, named and postgre' are ignored by PRM; this script was not intended to monitor root processes but rather user land tasks. It could easily watch root processes by removing the given line in the ignore file but this is strongly discouraged.

 

  • Rating

    4/5

Related Articles

Comments (14)

  • Gravatar - KDU
    KDU 14:24, January 12, 2005
    Dear sir,Let say i am renting web hosting with some company. I didnt have root access.. but i have ssh access instead cpanel. Is there anyway for me install ioncube?
  • Gravatar - Justin
    Justin 11:04, March 8, 2006
    They should have it installed, it's default for most. I just asked my web hosting company and they did it for me.
  • Gravatar - serviceTech
    serviceTech 06:12, March 26, 2006
    I get this error on restarting apache:<br />
    <br />
    Failed loading /usr/local/ioncube/ioncube_loader_lin_4.4.so: /usr/local/ioncube/ioncube_loader_lin_4.4.so: cannot open shared object file: No such file or directory<br />
    <br />
    The path is correct and the said file is present.<br />
    <br />
    Any ideas?<br />
  • Gravatar - norman
    norman 15:08, July 7, 2006
    You have the wrong version of the loaders installed. You either put in the 32 bit or the 64 bit version and you need the other.
  • Gravatar - shan
    shan 14:44, December 13, 2006
    "Paste in your new line for ioncube loader<br />
    zend_extension= /usr/local/ioncube/ioncube_loader_lin_4.3.so"<br />
    <br />
    this line<br />
    zend_extension=/usr/local/ioncube/ioncube_loader_lin_4.3.so"<br />
    must be the first line before the other zend_extensions
  • Gravatar - John
    John 17:09, April 11, 2007
    This tutorial is a little dated - the names of files have changed slightly.
  • Gravatar - nate
    nate 19:10, May 14, 2007
    I seem to be getting stuck at the last part. When I go to http://www.myhost.com/ioncube/ioncube-install-assistant.php I am told that the file has been encoded with ionCube. Isn't this the file that's supposed to help you with that? Thanks!
  • Gravatar - Siavash
    Siavash 03:08, January 21, 2008
    Dear Admin<br />
    <br />
    I want to setup this moudle on the localhost<br />
    help me
  • Gravatar - compassrose
    compassrose 23:09, February 16, 2009
    The instructions provided by ioncube and this forum were correct to a point. Perhaps I have an unusual WAMP Server 2.0 installation but the loader failed consistently despite numerous attempts to place the dll file in various directories (per instructions.)<br />
    <br />
    On a hunch, I finally copied the appropriate dll (ioncube_loader_win_XXX.dll) into the apache directory: [drive letter]:\wamp\bin\apache\apache2.2.8\bin<br />
    <br />
    I then edited the php.ini file and added the following modified line: zend_extension_ts = "[driver letter]:\wamp\bin\apache\apache2.2.8\bin\ioncube_loader_win_XXX.dll" in the location recommended by ioncube, et al. No more errors and the module appears to be working.<br />
    <br />
    Hope this helps others.
  • Gravatar - Madiemax
    Madiemax 23:14, December 12, 2009
    Thanks Compassrose. Follow you directions for localhost and works fine. Well done!
  • Gravatar - Hector
    Hector 07:27, February 23, 2010
    How can disable the loader or be able to see the php coding so I can introduce cahanges to my web site
  • Gravatar - DNN
    DNN 23:30, March 17, 2011
    I am having trouble with the ioncube loader wizard script and how to properly do the SSH commands on my own. What I am trying to do is get the ioncube loader working, so that I can login to my administrative control panel. I've uploaded the site properly and everything else, but my server tells me I need ioncubeloader 5.0.2_so and it's not working...


    http://www.DrewryNewsNetwork.com

    http://forum.DrewryNewsNetwork.com

Add Your Thoughts

WebHostGear.com is a hosting directory, not a web host.

Copyright © 1998-2018 WebHostGear.com