Archive for the tag 'logs'

cPanel/WHM Update and Service Status Logs

/var/cpanel/updatelogs/update-[TIMESTAMP].log

Contains all output from each upcp. Named with the timestamp from which the upcp process was executed.

Service Status Logs

/var/log/chkservd.log

The service monitoring daemon (chkservd) logs all service checks here. Failed services are represented with a [-], and active are represented with [+].

When the cron file /etc/cron.daily/1hup_apache_logs is executed the httpd service is not able to reload properly and it get stuck. The service is dead and it needs to be restarted manually. Even the server load goes high. And in some cases the server even crashes.

To Resolve this issue.

Change “reload” to “restart” in /etc/cron.daily/1hup_apache_logs

Content of /etc/cron.daily/1hup_apache_logs are as follows:

#!/bin/bash
#/etc/rc.d/init.d/httpd_app_init reload-grc
# XXX Fix of the “lost child came home” issue
! /sbin/chkconfig httpd || /etc/rc.d/init.d/httpd_app_init reload

And then change to

#!/bin/bash
#/etc/rc.d/init.d/httpd_app_init reload-grc
# XXX Fix of the “lost child came home” issue
! /sbin/chkconfig httpd || /etc/rc.d/init.d/httpd_app_init restart

Reference: http://parallels.com

If you are going to host more than 300 domains or web sites on your server, you should switch on support for piped logs in the Apache Web Server.

To enable piped logs:

Log in to the server shell.

Issue the command mysql -uadmin -p`cat /etc/psa/.psa.shadow` -D psa -e “replace into misc (param,val) values (’apache_pipelog’, ‘true’);”
Rebuild Apache configuration by issuing the command /usr/local/psa/admin/sbin/websrvmng -a -v

Source from Plesk.

SBDavid

How do i access cpanel webmail logs

How do i access cpanel webmail logs

If you would like to access webmail logs to see who accessed a certian webmail accounts.

The following log file could be searched to help locate specific access log entries from webmail.

/usr/local/cpanel/logs/access_log

Or use the following.

grep -in username /usr/local/cpanel/logs/access_log

Replace username with the webmail user.

From the grep man pages.

-i, –ignore-case
Ignore case distinctions in both the PATTERN and the input files. (-i is specified by POSIX.)

-n, –line-number
Prefix each line of output with the 1-based line number within its input file. (-n is specified by POSIX.)

Apache won’t start nothing in the logs

Chance are, if apache isn’t starting and isn’t logging anything, the error_log is full preventing apache from starting. To double check that, run:

cd /var/log/httpd
ls -lS | less

If any file is around 2-3 gig (or more), then chances are, that’s the problem.

The solution is to remove the logs, restart apache, and then implement preventative measures.

Get logrota to rotate daily.

# see “man logrotate” for details
# rotate log files daily
daily

# keep 2 weeks worth of backlogs
rotate 2

« Prev