Control Web Panel
Developers => New Modules => Topic started by: pedromidiasf on April 08, 2015, 07:44:19 PM
-
This helps you to clear your memory ram avoiding your server to overload.
Add this line to:
/usr/local/cwpsrv/htdocs/resources/admin/include/3rdparty.php
<li><a href="index.php?module=clear_memory_ram"><span class="icon16 icomoon-icon-arrow-right-3"></span>Clear memory ram</a></li>
Then create a new file called "clear_memory_ram.php" on:
/usr/local/cwpsrv/htdocs/resources/admin/modules
with this content:
<?php
exec('sync; echo 3 > /proc/sys/vm/drop_caches');
echo "Done!!";
?>
-
I also recommend you to restart apache after this, it'll increase your server status :)
-
With the latest version this centos web panel /usr/local/cwpsrv/htdocs/resources/admin/include/3rdparty.php the file does not exist :(
-
What do you mean? I don't get it
-
Off corse, just create a 3rdparty.php and paste the code. :D
With the latest version this centos web panel /usr/local/cwpsrv/htdocs/resources/admin/include/3rdparty.php the file does not exist :(
-
Useless for openvz
-
At this moment, CWP already has this feature on it
-
sync; echo 3 > /proc/sys/vm/drop_caches
This alone is not recommended for production servers. at least stop mysql before you do this and then start is after. If any service tries to write to disk between the sync and the echo it's gone.