≡ Menu

tail command

Debian Linux: Upgrade v6.0.x Squeeze to v7.0.0 Wheezy

Recently Debian Linux version 7.0 ("Wheezy") released. This version shipped with many new features - improvements to multimedia support, improved security through hardening flags and the OpenStack suite and the Xen Cloud Platform to name a few. How do I upgrades from Debian Linux version 6.x.x (squeeze) to the latest version 7.0.0 wheezy using command line options? How do I upgrade my Debian 6.x server to 7.x over the ssh session?
[click to continue…]

CentOS Linux 5/6 Install Mysql Database Server

How do I install MySQL database server on CentOS Linux version 5 or version 6 using command line options? How do I configuring MySQL server on CentOS Linux?
[click to continue…]

Debian / Ubuntu MySQL Error Log File Location

Can you tell me the location of for the MySQL error log file under Debian or Ubuntu Linux? How do I view error log file?
[click to continue…]

Troubleshooting: Apache Webserver Will Not Restart / Start

My CentOS Apache 2 (httpd) webserver will not start. It was working fine but I made few changes to httpd.conf and it is not restarting. What are some things to check in order to solve my issues?
[click to continue…]

Bind Postfix Mail Server To Localhost or Specific IP Address Only

Q. How do I bind Postfix MTA to specific IP address such as or
[click to continue…]

Linux Verify crond Daemon And Cronjobs Are Running

How do I verify or check cronjob is running or not under a CentOS / RHEL / Fedora Linux from a shell prompt?
[click to continue…]

Where Does The PHP Error Log Reside

I'm running CentOS 5.x server with Apache 2.2 + PHP 5.x server. Can you tell me exact location for php error log file?
[click to continue…]

How To Upgrade FreeBSD To New Release

Q. I've custom compile kernel and I'd like to upgrade my system to latest stable release. How do I upgrade FreeBSD to new release without using freebsd-update binary tool?
[click to continue…]

Linux View / Display a Logfile In Real Time on Screen

I would like to see my php or apache web server log files in real time. How do I see a log file in real time including all incoming logs on Linux using ssh based session?
[click to continue…]

Squid Proxy Sever View logs / log files

Q. How do I view squid proxy server log files under CentOS Linux server 5.0?

A. squid is a high-performance proxy caching server for web clients, supporting FTP, gopher, and HTTP data objects. Unlike traditional caching software, squid handles all requests in a single, non-blocking, I/O-driven process.

/var/log/squid/ log file directory

The logs are a valuable source of information about Squid workloads and performance. The logs record not only access information, but also system configuration errors and resource consumption (eg, memory, disk space). There are several log file maintained by Squid. Some have to be explicitely activated during compile time, others can safely be deactivated during.

  • /var/log/squid/access.log : Most log file analysis program are based on the entries in access.log. You can use this file to find out who is using squid server and what they are doing etc
  • /var/log/squid/cache.log : The cache.log file contains the debug and error messages that Squid generates. If you start your Squid using the default RunCache script, or start it with the -s command line option, a copy of certain messages will go into your syslog facilities. It is a matter of personal preferences to use a separate file for the squid log data.
  • /var/log/squid/store.log : The store.log file covers the objects currently kept on disk or removed ones. As a kind of transaction log it is ususally used for debugging purposes. A definitive statement, whether an object resides on your disks is only possible after analysing the complete log file. The release (deletion) of an object may be logged at a later time than the swap out (save to disk).

How do I view Squid Log files / logs?

You can use standard UNIX / Linux command such as grep / tail to view log files. You must login as root or sudo command to view log files.

Display log files in real time

Use tail command as follows:
# tail -f /var/log/squid/access.log
$ sudo tail -f /var/log/squid/access.log

Search log files

Use grep command as follows:
grep 'string-to-search' /var/log/squid/access.log

View log files

Finally you can use text editor such as vi to view log files:
# vi /var/log/squid/access.log