vikins

Well-Known Member
Oct 3, 2006
127
1
168
Is there a way to grab the log output from apache that the new splitlogs feature is using for the purposes of grepping it in realtime? Since there is no single file storing all the logs for all of the hosted domains you can't use something like "tail -f" either. Thanks!
 

InterServed

Well-Known Member
Jul 10, 2007
275
18
68
cPanel Access Level
DataCenter Provider
It depends on what you are trying to see. If your looking to see some better apache server status , then you could try the following:
Code:
links --dump 1 http://localhost:80/whm-server-status|grep ^[0-9]|awk 'BEGIN {print "Seconds, PID, State, IP, Domain, TYPE, URL\n--"} $4 !~ /[GCRK_.]/ {print $6, $2, $4, $11, $12, $13 " " $14|"sort -n"}'
 

vikins

Well-Known Member
Oct 3, 2006
127
1
168
Thanks, but got the following:
-bash: links: command not found

I am really looking for the raw log entries so that I can grep them in real time.

Thanks again.
 

prajithp13

Member
Jun 12, 2012
20
0
1
India
cPanel Access Level
Root Administrator

InterServed

Well-Known Member
Jul 10, 2007
275
18
68
cPanel Access Level
DataCenter Provider
If i understood this properly , and you are looking to grep all logs , then you may try the following:
Code:
egrep -R "search string" /usr/local/apache/logs/{access_log,error_log} /usr/local/apache/domlogs/*
 

vikins

Well-Known Member
Oct 3, 2006
127
1
168
Thank you, but I am looking for something that will show realtime, streaming output as if all the logs entries were being written to a single file and I was doing a tail -f on that file.