- The document discusses various Linux system log files such as /var/log/messages, /var/log/secure, and /var/log/cron and provides examples of log entries.
- It also covers log rotation tools like logrotate and logwatch that are used to manage log files.
- Networking topics like IP addressing, subnet masking, routing, ARP, and tcpdump for packet sniffing are explained along with examples.
30. • # vim /etc/logwatch/conf/logwatch.conf
# stdout mail file
Output = mail
# Html
Format = text
# email
MailTo = root
MailFrom = Logwatch
# log
Range = yesterday
# log level Low, Med, High
Detail = Low
# /usr/share/logwatch/default.conf/services
Service = All
31. •
# logwatch -‐-‐detail Low -‐-‐output stdout -‐-‐service
all -‐-‐range today
•
# logwatch -‐-‐detail Low -‐-‐output mail -‐-‐mailto
sntc06@gmail.com -‐-‐service all -‐-‐range yesterday
36. •
•
$ free -‐h
total used free shared buffers cached
Mem: 7.8G 7.6G 193M 42M 111M 3.3G
-‐/+ buffers/cache: 4.2G 3.6G
2.0G 38M 2.0G
# vmstat -‐S MB
procs -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐memory-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐swap-‐-‐ -‐-‐-‐-‐-‐io-‐-‐-‐-‐ -‐system-‐-‐ -‐-‐-‐-‐-‐-‐cpu-‐-‐-‐-‐-‐
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 38 191 116 3395 0 0 8 6 15 1 2 0 98 0 0
37. •
• $ netstat
• -‐n IP
• -‐a socket ( )
• -‐p port root
• -‐r