The Official Blog of Richard Ricketts

my personal knowledge base

Blog

Update Concrete5 5.6 Core Controller

Posted by on 9:00 am in Tutorials | 0 comments

In this example we are going to use the the “DashboardUsersAddController” The file location in 5.6 for this controller is: /concrete/controllers/dashboard/users/add.php The contents of “add.php” include: <?php defined(‘C5_EXECUTE’) or die(“Access Denied.”); class DashboardUsersAddController extends Concrete5_Controller_Dashboard_Users_Add { } We are going to change “add.php” to: <?php defined(‘C5_EXECUTE’) or die(“Access Denied.”); class...

read more

How to Clear the Linux Memory Cache

Posted by on 9:00 am in Tutorials | 0 comments

Clearing the memory cache on your linux server can be a quick and easy way to regain system resources. Writing to the drop_cache process will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free. To free pagecache:# echo 1 > /proc/sys/vm/drop_caches To free dentries and inodes:# echo 2 > /proc/sys/vm/drop_caches To free pagecache, dentries and inodes:# echo 3 > /proc/sys/vm/drop_caches As this is a non-destructive operation, and dirty objects are not freeable, the user should run...

read more

Bash Script to Run a Command When Running Low on Memory

Posted by on 9:00 am in Tutorials | 0 comments

I had to troubleshoot several problems on a web server running apache. When memory is maxed out and the server starts to use swap and/or maxes out swap, I have a serious problem with the server and have no choice but to restart it. This delays me actually finding the problem and creates a ticking time bomb experience (not the best). So I wanted a way to kill -or- restart a process when memory got low. A cron job would achieve the same result except when the memory ran low, it was never exactly at the same time (not down to a science). So I...

read more