How to disable Lfd excessive resource usage alert

If you are having own VPS or Dedicated server you will get this kind of alert messages often because you have installed CSF on your server and LFD will notify to you every time when the service or process take more time or memory which is assigned in your CSF configuration.

You can disable this kind of alert from below three methods but method-1 is standard one.

I will suggest you, don’t use method-2 & method-3 because this kind of alert is useful for you to monitor the server status.


If any service or user take too much of time & memory you have a look into that particular activity whether is there anything abnormal. So that you can run the server smooth condition.


I got below two LFD alert in my server.

 

  • Virtual Memory Size excessive resource usage alert
Time:         Tue Jul 15 06:23:10 2014 +0100
Account:      cloudana
Resource:     Virtual Memory Size
Exceeded:     280 > 200 (MB)
Executable:   /usr/bin/php
Command Line: /usr/bin/php /home/cloud2day/public_html/owncloud/remote.php
PID:          20571 (Parent PID:20435)
Killed:       No
  • Process Time excessive resource usage alert
Time:         Tue Jul 15 10:01:22 2014 +0530
Account:      rec247
Resource:     Process Time
Exceeded:     129399 > 1800 (seconds)
Executable:   /usr/bin/php
Command Line: /usr/bin/php /home/daygeek/public_html/news/rewrite.php
PID:          28929 (Parent PID:26541)
Killed:       No

Method-1

This one is standard method to disable the LFD alert. Use your favorite text editor to open the file csf.pignore and add the command line path except executable path, the common location in cpanel server /etc/csf/csf.pignore. Make sure you should not add only executable path, If you done it wont notify anything. Like in above alert its shows /usr/bin/php as a executable path. If you added it wont alert any of the php process on your server. So you need to add only the particular things. Process time also the same steps.

root@server [/etc/csf]# nano csf.pignore
  GNU nano 2.0.9                                           File: csf.pignore

exe:/usr/libexec/dovecot/pop3
exe:/usr/sbin/nsd
exe:/usr/libexec/dovecot/pop3-login
exe:/usr/libexec/dovecot/imap-login
exe:/var/cpanel/3rdparty/bin/php
exe:/usr/bin/postgres
exe:/usr/sbin/ntpd
exe:/sbin/ntpd
exe:/usr/local/cpanel/3rdparty/sbin/mydns
exe:/usr/local/cpanel/3rdparty/bin/webalizer_lang/english
exe:/usr/local/cpanel/3rdparty/perl/514/bin/spamd
exe:/usr/local/cpanel/bin/cpuwatch
exe:/u01/app/oracle/product/11.2.0/xe/bin/oracle
#exe:/usr/bin/php - This will exclude all the php process
#exe:/usr/bin/php /home/cloud2day/public_html/owncloud/index.php - This will not work
exe:/home/cloud2day/public_html/owncloud/index.php

Method-2

This will permanently disable to LFD alert. So its security issue. Use your favorite text editor to open the file csf.conf and setPT_USERMEM=0. Process time also the same and you need to changed PT_USERTIME value instead of changing PT_USERMEMvalues.

root@server [/etc/csf]# nano csf.conf
  GNU nano 2.0.9                                           File: csf.conf
                                                                                
# This User Process Tracking option sends an alert if any cPanel user process
# exceeds the memory usage set (MB). To ignore specific processes or users use
# csf.pignore
#
# Set to 0 to disable this feature
PT_USERMEM = "0"

# This User Process Tracking option sends an alert if any cPanel user process
# exceeds the time usage set (seconds). To ignore specific processes or users
# use csf.pignore
#
# Set to 0 to disable this feature
PT_USERTIME = "1800"

Method-3

Increase the PT_USERMEM=200 value more than 200. By default they are assigned 200. Use your favourite text editio to open the file csf.conf and set PT_USERMEM=500. . Process time also the same and you need to changed PT_USERTIME value instead of changing PT_USERMEM values.

root@server [/etc/csf]# nano csf.conf
  GNU nano 2.0.9                                           File: csf.conf
                                                                                
# This User Process Tracking option sends an alert if any cPanel user process
# exceeds the memory usage set (MB). To ignore specific processes or users use
# csf.pignore
#
# Set to 0 to disable this feature
PT_USERMEM = "500"

# This User Process Tracking option sends an alert if any cPanel user process
# exceeds the time usage set (seconds). To ignore specific processes or users
# use csf.pignore
#
# Set to 0 to disable this feature
PT_USERTIME = "1800"

Finally restart the CSF using below command.

root@server [/etc/csf]# csf -r
Flushing chain `INPUT'
Flushing chain `FORWARD'
Flushing chain `OUTPUT'
Flushing chain `ALLOWIN'
Flushing chain `ALLOWOUT'
.
.
.
Restarting bandmin acctboth chains for cPanel
acctboth  all opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0
acctboth  all opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0
acctboth  all opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0
acctboth  all opt -- in * out *  0.0.0.0/0  -> 0.0.0.0/0
LOCALOUTPUT  all opt -- in * out !lo  0.0.0.0/0  -> 0.0.0.0/0
LOCALINPUT  all opt -- in !lo out *  0.0.0.0/0  -> 0.0.0.0/0
LOCALOUTPUT  all opt    in * out !lo  ::/0  -> ::/0
LOCALINPUT  all opt    in !lo out *  ::/0  -> ::/0
 
  • 1 کاربر این مقاله را مفید می دانند
آیا این پاسخ مفید بود؟

مقالات مرتبط

نکات مهم درباره Firewall CFS

1. آی پی های بلاک شده در فایل csf.deny ذخیره میشوند.2. آی پی های مجاز و white در فایل csf.allow...

حذف تمامی فایل های Error_log موجود در سرور با استفاده از SSH

Error_log فایل های ثبت خطاها هستند که در صورت وجود مشکل در اسکریپت یا ... باشد خطای آن در این...

تعمیر (Repair & Optimize) تمامی دیتابیس های موجود در سرور

برای تعمیر و بهینه سازی همه جداول دیتابیس های موجود برروی یک سرور میتونید وارد محیط ssh شده و...

شماره پورت های سرور

پیدا کردن پورت های باز و بسته یک سرورhttp://www.yougetsignal.com/tools/open-ports/ 21 FTP 22...