centos日志查看

207 阅读3分钟

#1 目录

[root@SYS-B00-GH-WEB ~]# ls -al /var/log/
总用量 1976
drwxr-xr-x. 13 root root   4096 11月 10 18:49 .
drwxr-xr-x. 22 root root   4096 11月  9 20:31 ..
-rw-------.  1 root root   2368 11月  1 15:42 anaconda.ifcfg.log
-rw-------.  1 root root  23244 11月  1 15:42 anaconda.log
-rw-------.  1 root root 101827 11月  1 15:42 anaconda.program.log
-rw-------.  1 root root 165714 11月  1 15:42 anaconda.storage.log
-rw-------.  1 root root 123423 11月  1 15:42 anaconda.syslog
-rw-------.  1 root root  21326 11月  1 15:42 anaconda.xlog
-rw-------.  1 root root  90053 11月  1 15:42 anaconda.yum.log
drwxr-x---.  2 root root   4096 11月  1 15:43 audit
-rw-r--r--.  2 root root   2676 11月  9 16:35 boot.log
-rw-------.  1 root root   5760 11月 10 18:45 btmp
drwxr-xr-x.  2 root root   4096 11月  1 15:42 ConsoleKit
-rw-------.  1 root root  12120 11月 10 18:40 cron
-rw-------.  1 root root  33346 11月  3 03:27 cron-20191103
-rw-------.  1 root root 143237 11月 10 03:48 cron-20191110
drwxr-xr-x.  2 root root   4096 4月   9 2019 cups
-rw-r--r--.  1 root root  70705 11月  9 16:35 dmesg
-rw-r--r--.  1 root root  70705 11月  9 16:27 dmesg.old
-rw-r--r--.  1 root root 465534 11月  9 09:37 dracut.log
-rw-r--r--.  1 root root 146292 11月 10 18:47 lastlog
-rw-------.  1 root root  64873 11月 10 18:48 maillog
-rw-------.  1 root root    207 11月  1 15:43 maillog-20191103
-rw-------.  1 root root   1825 11月  9 22:40 maillog-20191110
-rw-------.  1 root root   1797 11月 10 18:32 messages
-rw-------.  1 root root  73674 11月  1 16:39 messages-20191103
-rw-------.  1 root root 265967 11月  9 22:40 messages-20191110
-rw-r-----.  1 root root   8971 11月 10 09:51 mysqld.log
drwxr-xr-x.  2 root root   4096 11月 10 14:45 nginx
drwxr-xr-x.  2 root root   4096 12月 20 2018 ntpstats
drwxrwx---.  2 root root   4096 11月  9 17:12 php-fpm
drwxr-xr-x.  2 root root   4096 11月  1 16:10 prelink
drwxr-xr-x.  2 root root   4096 11月 10 00:00 sa
drwx------.  3 root root   4096 8月  15 00:34 samba
-rw-------.  1 root root   5553 11月 10 18:47 secure
-rw-------.  1 root root   1417 11月  1 16:48 secure-20191103
-rw-------.  1 root root  25397 11月  9 23:49 secure-20191110
-rw-------.  1 root root      0 11月 10 03:48 spooler
-rw-------.  1 root root      0 11月  1 15:37 spooler-20191103
-rw-------.  1 root root      0 11月  3 03:27 spooler-20191110
drwxr-x---.  2 root root   4096 1月  16 2019 sssd
-rw-------.  1 root root      0 11月  1 15:34 tallylog
drwxr-xr-x.  2 root root   4096 11月 10 03:48 tomcat6
-rw-rw-r--.  1 root root  41088 11月 10 18:47 wtmp
-rw-------.  1 root root  24951 11月  9 20:16 yum.log

#2 查看登陆异常ssh或sftp

vim /etc/log/secure

#3 查看nginx异常

vim /etc/log/nginx/error.log
vim /etc/log/nginx/gqgs-error.log

#4 查看php-fpm异常

vim /etc/log/php-fpm/error.log