7
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

/var/log/それぞれのログの中身について

Posted at

勉強前イメージ

dmesg とは見るけど実際なにが出力されてるのかあんま理解してない
今回はcentos7の/var/log配下を見ててわからないやつ
今回省いたからって完璧に理解してるかって言われればそうじゃないけど、
ニュアンスわかるやつは省いてる

調査

それぞれのログ

  • /var/log/anaconda

これはディレクトリで中にもいろいろ入ってた。
インストーラーのログ。

[root@localhost log]# ll /var/log/anaconda
合計 2136
-rw-------. 1 root root   19164  1月 11 03:22 X.log
-rw-------. 1 root root   24967  1月 11 03:22 anaconda.log
-rw-------. 1 root root   16717  1月 11 03:22 ifcfg.log
-rw-------. 1 root root 1566747  1月 11 03:22 journal.log
-rw-------. 1 root root       0  1月 11 03:22 ks-script-fUFFTk.log
-rw-------. 1 root root       0  1月 11 03:22 ks-script-tyc80j.log
-rw-------. 1 root root  114301  1月 11 03:22 packaging.log
-rw-------. 1 root root   32742  1月 11 03:22 program.log
-rw-------. 1 root root   89599  1月 11 03:22 storage.log
-rw-------. 1 root root  308538  1月 11 03:22 syslog
  • /var/log/audit

システム監査デーモンであるauditdのログファイルが保存されてるディレクトリで、
中に /var/log/audit/audit.log というファイルがある。
selinuxのポリシー違反など記載されている

  • /var/log/boot.log

システムの起動時のログ

  • /var/log/btmp

不正ログインの記録
バイナリで記録されている

  • /var/log/wtmp

ログイン情報の記録
こちらもバイナリで記録されている

  • /var/log/dmesg

システムの起動時からファイルシステムがマウントされるまでにカーネルが出したログ
dmesgコマンドでも見れるけど、ある程度古くなると削除されるのでその際はログを確認

  • /var/log/lastlog

登録されているユーザの最終ログイン時刻を記載
バイナリなので、lastlogコマンドを使用して確認

  • /var/log/secure

認証関連のログで、
sshやsudoコマンドに関するログが記載されています。

  • /var/log/spooler

UUCP(Unix to Unix CoPy) というunixシステム間でのデータ交換のログが記録されているファイル

  • /var/log/tallylog

ログインの失敗回数を記録するファイル。
似たようなファイルにbtmpがあるが、違いとしては以下
btmp → すべての不正なログインを記録
tallylog → ユーザーごとにログインの失敗回数を記録

  • /var/log/yum.log

yumのログで、yumを使ったパッケージの追加・削除に関するログが記載されている

勉強後イメージ

結局細かいことを調べるときって、ググったりするかもだけど
ログインの失敗・成功・ユーザごとだったりそうじゃなかったりの個別のログがあるってことを知れたのが良かったかな

参考

7
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?