Hot answers tagged

353

On a default installation the cron jobs get logged to /var/log/syslog You can see just cron jobs in that logfile by running grep CRON /var/log/syslog If you haven't reconfigured anything,the entries will be in there.


127

By default, /var/log/apache2/error.log. This can be configured in /etc/php5/apache2/php.ini.


108

You can create a cron.log file to contain just the CRON entries that show up in syslog. Note that CRON jobs will still show up in syslog if you follow the following directions. Open the file /etc/rsyslog.d/50-default.conf Find the line that starts with: #cron.* uncomment that line, save the file, and restart rsyslog: sudo service rsyslog ...


93

All login attempts are logged to /var/log/auth.log. 1. Filter for brute-force interactive SSH logins Open a terminal, and type the below; if it's longer than 1 page you will be able to scroll up and down; type q to exit: grep sshd.\*Failed /var/log/auth.log | less Here's a real example from one of my VPSs: Aug 18 11:00:57 izxvps sshd[5657]: Failed ...


65

You can check the installer logs and dates at: /var/log/installer A quick way to find the date through the command line would be by running: ls -l /var/log/installer


58

/var/log/messages has been deleted from Natty. You can find the same info in /var/log/syslog. Note that everything logged to messages was also logged to syslog.


55

All log files are located in /var/log directory. In that directory, there are specific files for each type of logs. For example, system logs, such as kernel activities are logged in syslog file. Some of the most common log files in that directory is : In directory apt there is a file history.log which saves all the package installation and removal ...


48

If you use ext2/ext3/ext4 and formatted the disk when you installed you can do this nifty trick. sudo dumpe2fs /dev/sda1 | grep 'Filesystem created:' You might have to change the /dev/sda1 to reflect your setup. Relaying on the date of files, even the "creation time" (mtime) can give errors since upgrading packages might have replaced the file and made a ...


45

I would argue that monitoring logs is a weak solution especially if you have a weak password on an account. Brute attempts often try at least hundreds of keys per minute. Even if you have a cron job set to email you of brute attempts, it could be hours before you get to your server. If you have a public-facing SSH server, you need a solution that kicks in ...


38

Sometimes it can be useful to continuously monitor it, in that case: tail -f /var/log/syslog | grep CRON


29

tail has the -f option: From the man page: -f, --follow[={name|descriptor}] output appended data as the file grows; -f, --follow, and --follow=descriptor are equivalent Thus if you type: tail -f [path_and_name_of_logfile] - you will see the output in the terminal as the log file itself is appended to. N.B. ...


28

If you are using the network manager plugin (network-manager-openvpn), look into /var/log/syslog This should give you the last logs of openvpn: $ grep VPN /var/log/syslog Connection details are to be found in /etc/openvpn/


27

Check these settings in php.ini: error_reporting = E_ALL | E_STRICT (as recommended for development in php.ini) error_log = /var/log/php_errors.log Then create log file manually touch /var/log/php_errors.log chown www-data: /var/log/php_errors.log chmod +rw /var/log/php_errors.log Now you can view PHP errors by this way tail /var/log/php_errors.log ...


25

Unless a command has output or logging already configured, rc.local commands will not log anywhere. If you want to see logs for specific commands, try redirecting the stdout and stderr for rc.local to somewhere you can check. Try adding this to the top of your /etc/rc.local file. exec 2> /tmp/rc.local.log # send stderr from rc.local to a log file ...


23

These logs are generated by the kernel, so they go to the file that receives kernel logs: /var/log/kern.log. If you want to redirect these logs to a different file, that can't be done through iptables. It can be done in the configuration of the program that dispatches logs: rsyslog. In the iptables rule, add a prefix that isn't used by any other kernel log: ...


22

When you are ready to start recording a log file, type: script screen.log Now, until you stop the script, all input and output in the Terminal will be stored in screen.log. When you are done, just type: exit Your screen.log file will be in your Home folder (/home/user). This will do exactly what you are looking for. Source: Ubuntu Guide - How To Log ...


18

Does Ubuntu log when USB devices are connected? Yes, Ubuntu logs when a USB device is connected. The file is /var/log/syslog. You can also view it by issuing the command dmesg -c or graphically using Log file viewer. Is this file deleted upon shutdown? No, This log does not get wiped upon shutdown. After a size limit is reached the logs are rotated, ...


17

If the machine was shutdown properly then there must be a shutdown log logged in kern.log file in /var/log directory. After a shutdown whenever a normal boot occurs the OS writes the log for the same in kern.log. Hence every boot log must be preceded by a shutdown log if the booting and shutdown process was normal. Whenever a normal shutdown occurs ...


17

Where most of log files located: /var/log/ Log filename: Xorg.0.log Xorg.1.log etc... Update: You can check out the log files: Click on System menu > Choose Administration > System Log or Applications > System Tool > Log File Viewer


16

If it really is a kernel panic then it won't be written into a log via normal methods. Since the kernel has at this point crashed, writing into the filesystem is a risky operation - not much of the kernel can be trusted anymore, so writes into logs might actually be spewing random crap over your bootloader! Instead, you can dump the contents of memory into ...


16

You can use two log files to view the boot problem. /var/log/boot.log --- System boot log /var/log/dmesg --- print or control the kernel ring buffer


16

By default, in most distros, OpenVPN log output goes to the syslog, which is usually at /var/log/syslog However, your config files can set the logfile location explicitly, e.g.: log-append /var/log/openvpn.log This works for both OpenVPN clients and servers. OpenVPN config files are usually located in /etc/openvpn and usually named *.conf. server.conf is ...


15

Multitail is what you searching for: it has tons of features. look here for some screenshots. Also have a look at this question over there at serverfault.com


15

I've discovered glogg, which describes itself as: glogg is a multi-platform GUI application to browse and search through long or complex log files. It is designed with programmers and system administrators in mind. glogg can be seen as a graphical, interactive combination of grep and less. It will also tail files if you enable the Follow File option. ...


15

While tail is certainly the usual way to do this, it should be noted that less has the same feature and is sometimes more usefull. If you opened a file with less then you can press Shift + F to have it follow the file (i.e. it will display new lines, just as tail -f does). You can exit this mode with Ctrl + C You can also start less with the +F option, in ...


13

All your system logs in Ubuntu are handled by rsyslog which keeps its configuration in /etc/rsyslog.conf and /etc/rsyslog.d/. For more information on how to configure rsyslog and the possible options visit the rsyslog.conf man page. Opening /etc/rsyslog.d/50-default.conf you can see that one of the lines contains *.*;auth,authpriv.none ...


12

You can find the Network Manager logs in /var/log/syslog, which acts as a catch-all for log messages (unless you have changed rsyslog's default configuration).


12

Ubuntu 11.04 installs rsylogd rather than syslogd which Firestarter was expecting. rsyslogd is configured using the file /etc/rsyslog.d/50-default.conf. You can edit this file gksu gedit /etc/rsyslog.d/50-default.conf and change the lines commented out that create the relevant logfile #*.=info;*.=notice;*.=warn;\ # auth,authpriv.none;\ # ...


11

try this: truncate -s 0 /var/log/*log EDIT: if you want to do this more than once you should use logrotate to handle your logs. Usually it's installed in ubuntu. Have a look at man logrotate (or if you do not have it installed look at the online manpage or install it with sudo apt-get install logrotate) from the manpage: logrotate is designed to ...



Only top voted, non community-wiki answers of a minimum length are eligible