Error Log On Linux
Contents |
2014 in Commands, File system, LinuxI am a access logs in linux new Linux user. I would like to know
Check Linux Event Logs
where are the log files located under Debian/Ubuntu or CentOS/RHEL/Fedora Linux server? How
How To Read A Log In Linux
do I open or view log files on Linux operating systems? Almost all logfiles are located under /var/log directory and its
Linux Error Log Location
sub-directories on Linux. You can change to this directory using the cd command. You need be the root user to view or access log files on Linux or Unix like operating systems. You can use the following commands to see the log files:less linux system error log commandmore commandcat commandgrep commandtail commandzcat commandzgrep commandzmore commandHow do I view log files on Linux?Open the Terminal or login as root user using ssh command. Go to /var/log directory using the following cd command: # cd /var/log
To list files use the following ls command: # ls Sample outputs from RHEL 6.x server:anaconda.ifcfg.log boot.log-20111225 cron-20131110.gz maillog-20111218 messages-20131103.gz secure-20131027.gz spooler-20131117.gz up2date-20131117.gz anaconda.log btmp cron-20131117.gz maillog-20111225 messages-20131110.gz secure-20131103.gz squid uptrack.log anaconda.program.log btmp-20120101 cups maillog-20120101 messages-20131117.gz secure-20131110.gz swinstall.d uptrack.log.1 anaconda.storage.log btmp-20131101.gz dkms_autoinstaller maillog-20131027.gz mysqld.log secure-20131117.gz tallylog uptrack.log.2 anaconda.syslog collectl dmesg maillog-20131103.gz ntpstats setroubleshoot UcliEvt.log varnish anaconda.yum.log ConsoleKit dmesg.old maillog-20131110.gz prelink spooler up2date wtmp arcconfig.xml cron dracut.log maillog-20131117.gz rhsm spooler-20111211 up2date-20111211 yum.log atop cron-20111211 dracut.log-20120101 messages sa spooler-20111218 up2date-20111218 yum.log-20120101 audit cron-20111218 dracut.log-20130101.gz messages-20111211 secure spooler-20111225 up2date-20111225 yum.log-20130101.gz boot.log crand Logs Linux maintains several system logs that help you administer a Linux system by informing you of important events. Probably ubuntu error log the most important log is the file /var/log/messages, which records a linux syslog variety of events, including system error messages, system startups, and system shutdowns. Like most other Linux suse linux error log files, the file contains ASCII text, so you can view it with a text editor or the text processing commands described in Chapter 13. A special command, http://www.cyberciti.biz/faq/linux-log-files-location-and-how-do-i-view-logs-files/ dmesg, makes it easy to view the log messages related to the most recent system startup. If your system is behaving unusually, use dmesg to quickly see if something went wrong during the system startup sequence. Of course, you must have some way of determining what's usual and unusual among the many messages emitted during http://www.oreilly.com/openbook/debian/book/ch07_04.html system startup. The best way to do so is to print the output of the dmesg command and keep it on hand for comparison with suspicious output. If your system has an attached printer, you can print the output of dmesg by entering the following command: dmesg | lpr Other logs found in the /var/log directory include: apache A directory that contains two log files pertaining to the Apache web server, access.log and error.log. exim A directory that contains several log files pertaining to the exim mail transfer agent. nmb and smb Files that contain log entries pertaining to Samba, the Microsoft-compatible networking server. ppp.log A file the contains log entries pertaining to PPP. 7.3 Starting and Stopping the System and Services 7.5 Setting the System Time and Time Zone Back to: Learning Debian GNU/Linux oreilly.com Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts International | About O'Reilly | Affiliated Companies | Privacy Policy © 2001, O'Reilly & Associates, Inc.
In submit Tutorials Questions Projects Meetups Main Site logo-horizontal DigitalOcean Community Menu Tutorials Questions Projects Meetups Main Site Sign Up https://www.digitalocean.com/community/tutorials/how-to-view-and-configure-linux-logs-on-ubuntu-and-centos Log In submit View All Results By: Sadequl Hussain Subscribe Subscribed http://unix.stackexchange.com/questions/38978/where-are-apache-file-access-logs-stored Share Contents Contents We hope you find this tutorial helpful. In addition to guides like this one, we provide simple cloud infrastructure for developers. Learn more → 9 How To View and Configure Linux Logs on Ubuntu and Centos Posted Dec 17, 2013 164.4k views Logging error log Linux Basics CentOS Ubuntu Debian Introduction Linux system administrators often need to look at log files for troubleshooting purposes. In fact, this is the first thing any sysadmin would do. Linux and the applications that run on it can generate all different types of messages, which are recorded in various log files. Linux uses a set of linux error log configuration files, directories, programs, commands and daemons to create, store and recycle these log messages. Knowing where the system keeps its log files and how to make use of related commands can therefore help save valuable time during troubleshooting. In this tutorial, we will have a look at different parts of the Linux logging mechanism. Disclaimer The commands in this tutorial were tested in plain vanilla installations of CentOS 6.4, Ubuntu 12 and Debian 7. Default Log File Location The default location for log files in Linux is /var/log. You can view the list of log files in this directory with a simple ls -l /var/log command. This is what I see in my CentOS system: [root@TestLinux ~]# ls -l /var/log total 1472 -rw-------. 1 root root 4524 Nov 15 16:04 anaconda.ifcfg.log -rw-------. 1 root root 59041 Nov 15 16:04 anaconda.log -rw-------. 1 root root 42763 Nov 15 16:04 anaconda.program.log -rw-------. 1 root root 299910 Nov 15 16:04 anaconda.storage.log -rw-------. 1 root root 40669 Nov 15 16:04 anaconda.syslog -rw------
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Unix & Linux Questions Tags Users Badges Unanswered Ask Question _ Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Where are Apache file access logs stored? up vote 81 down vote favorite 20 Does anyone know where file access logs are stored, so I can run a tail -f command in order to see who is accessing a particular file. I have XAMPP, which is an Apache server installed on my machine, which automatically logs the accesses. It is stored in my installation folder. files logs syslog share|improve this question edited May 19 '12 at 12:50 Gilles 371k696751126 asked May 18 '12 at 21:51 AkshaiShah 1,0012108 On what distribution, or with what hosting provider? Logs are typically under /var/log, but some systems have them elsewhere. –Gilles May 19 '12 at 12:51 add a comment| 3 Answers 3 active oldest votes up vote 92 down vote accepted Ultimately, this depends on your Apache configuration. Look for CustomLog directives in your Apache configuration, see the manual for examples. A typical location for all log files is /var/log and subdirectories. Try /var/log/apache/access.log or /var/log/apache2/access.log. If the logs aren't there, try running locate access.log. share|improve this answer answered May 19 '12 at 12:54 Gilles 371k696751126 +1 for CustomLog –Radu Sep 30 at 14:05 add a comment| up vote 20 down vote If you can't find the log with Gilles's answer, there are a couple more things you can try. Look in /var/log/httpd. Run sudo locate access.log as well as sudo locate access_log. The logs on my system were not visible except to root, and the file was called access_log instead of access.log. share|i