cPanel Daily Process Log (formerly CPU/Memory/MySQL Usage)
(Main –>> Server –>> Daily Process Log)
This feature displays information about your server’s consumption of processing power and memory, averaged over the course of the selected day.
The information is divided into rows and columns. Each row represents a different process running on your server while each column represents the processes’ associated parameters.
The processes running on your server will depend on how you have configured WHM and what other daemons and applications you install on your server.
The column information is divided into 5 categories:
User — Displays the name of the user running the process. For example, if you are logged into your server as “root,” then that username will appear in this field for any processes you initiate.
Domain — Displays the domain name associated with your cPanel user accounts.
%CPU — Displays the average daily percentage of the CPU’s processing power used by the corresponding process.
%MEM — Displays the average daily percentage of RAM used by the corresponding process.
MySQL Processes — Displays the average number of MySQL processes associated with the corresponding process for today.
kill - terminate a process
The command kill sends the specified signal to the specified process or process group. If no signal is specified, the TERM signal is sent.
The TERM signal will kill processes which do not catch this signal. For other processes, it may be necessary to use the KILL (9) signal, since this signal cannot be caught.
Most modern shells have a builtin kill function, with a usage rather similar to that of the command described here. The `-a’ and `-p’ options, and the possibility to specify pids by command name is a local extension.
$ kill -l
1) SIGHUP 2) SIGINT 3) SIGQUIT 4) SIGILL 5) SIGTRAP
………
………
Negative PID values may be used to choose whole process groups; see the PGID column in ps command out?put. A PID of -1 is special; it indicates all processes except the kill process itself and init.
EXAMPLES
kill -9 -1
Kill all processes you can kill.
kill -l 11
Translate number 11 into a signal name.
Apache Graceful Restart Process
Signal: USR1
The USR1 or graceful signal causes the parent process to advise the children to exit after their current request (or to exit immediately if they’re not serving anything). The parent re-reads its configuration files and re-opens its log files. As each child dies off the parent replaces it with a child from the new generation of the configuration, which begins serving new requests immediately.
This code is designed to always respect the process control directive of the MPMs, so the number of processes and threads available to serve clients will be maintained at the appropriate values throughout the restart process.
freshclam process starts despite clamav disabled
freshclam process started by /etc/cron.daily/freshclam script which doesn’t check if clamd is disabled, to resolve this we have to modify the /etc/cron.daily/freshclam script adding the check whether the clamd is disabled.
Log into your Ensim as root
Open the /etc/cron.daily/freshclam
Replace the following lines
/usr/bin/freshclam \
–quiet \
–datadir=”/var/clamav” \
–log=”$LOG_FILE” \
–log-verbose \
–daemon-notify=”/etc/clamd.conf”
with the lines
if [ "x" != "x`chkconfig --list clamd | grep on`" ]; then
/usr/bin/freshclam \
–quiet \
–datadir=”/var/clamav” \
–log=”$LOG_FILE” \
–log-verbose \
–daemon-notify=”/etc/clamd.conf”
fi
ps displays information about a selection of the active processes. If you want a repetitive update of the selection and the displayed information, use top(1) instead.
ps - report a snapshot of the current processes.
To see every process with a user-defined format:
ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
ps -eopid,tt,user,fname,tmout,f,wchan