Podcast
Questions and Answers
Which command is used to monitor log files in real-time?
Which command is used to monitor log files in real-time?
- tail -f (correct)
- grep
- journalctl
- logrotate
What is the purpose of adjusting 'swappiness' in performance tuning?
What is the purpose of adjusting 'swappiness' in performance tuning?
- To optimize the file system size
- To manage the balance between RAM and swap usage (correct)
- To increase the speed of disk reads
- To prioritize CPU allocation among processes
Which of the following commands is used to remove a package in Debian-based distributions?
Which of the following commands is used to remove a package in Debian-based distributions?
- yum remove package_name
- apt delete package_name
- dnf uninstall package_name
- apt remove package_name (correct)
What does the command 'ping' primarily test?
What does the command 'ping' primarily test?
Which tool is enhanced for user-friendly interaction compared to 'top'?
Which tool is enhanced for user-friendly interaction compared to 'top'?
Which tool is primarily used for managing firewall rules and network traffic?
Which tool is primarily used for managing firewall rules and network traffic?
What type of backup includes only the changes made since the last full backup?
What type of backup includes only the changes made since the last full backup?
Which command is used for querying DNS records?
Which command is used for querying DNS records?
Which backup strategy ensures that you backup all changes made since the last full backup?
Which backup strategy ensures that you backup all changes made since the last full backup?
What should be checked to verify DNS server configuration?
What should be checked to verify DNS server configuration?
Flashcards are hidden until you start studying
Study Notes
System Logs Analysis
-
Location of Logs:
/var/log/
: Primary directory for system logs.- Common log files:
syslog
: General system messages.dmesg
: Boot and kernel messages.auth.log
: Authentication logs.kern.log
: Kernel messages.
-
Log Management Tools:
journalctl
: Command to query and display logs fromsystemd
journal.logrotate
: Tool to manage log file sizes and archival.
-
Analyzing Logs:
- Use
grep
for searching specific entries. tail -f
: Monitor log files in real-time.- Check for patterns indicating issues (e.g., repeated errors).
- Use
Performance Tuning
-
Monitoring Tools:
top
: Displays real-time system statistics.htop
: Enhanced version oftop
with a user-friendly interface.vmstat
: Reports on virtual memory, processes, and CPU activity.iostat
: Monitors input/output device and CPU performance.
-
Common Tuning Techniques:
- Adjust
swappiness
: Controls the balance between RAM and swap usage. - Optimize file system: Use
tune2fs
for ext2/3/4 filesystems. - Configure caching: Adjust settings for
cachepressure
anddirty_ratio
.
- Adjust
-
CPU and Memory Management:
- Use
nice
andrenice
to prioritize processes. - Monitor memory usage with
free
and adjust applications accordingly.
- Use
Package Management
-
Package Managers:
apt
: Used in Debian-based distributions (e.g., Ubuntu).yum
/dnf
: Used in Red Hat-based distributions (e.g., CentOS, Fedora).
-
Common Commands:
- Install:
apt install package_name
oryum install package_name
. - Update:
apt update
andapt upgrade
oryum update
. - Remove:
apt remove package_name
oryum remove package_name
.
- Install:
-
Dependency Management:
- Package managers handle dependencies automatically but may require manual resolution in some cases.
Network Troubleshooting
-
Basic Tools:
ping
: Tests network connectivity.traceroute
: Traces the path packets take to a network destination.ifconfig
/ip addr
: Displays and configures network interfaces.netstat
: Shows active connections and routing tables.
-
DNS Troubleshooting:
nslookup
/dig
: Queries DNS records.- Check
/etc/resolv.conf
for DNS server configuration.
-
Firewall Configuration:
iptables
/firewalld
: Tools to manage firewall rules and network traffic.
Backup And Recovery
-
Backup Tools:
rsync
: Efficient file transfer and synchronization tool.tar
: Archive and compress files.dd
: Used for disk cloning and backup.
-
Backup Strategies:
- Full Backup: Complete system backup.
- Incremental Backup: Backs up only the changes since the last backup.
- Differential Backup: Backs up changes since the last full backup.
-
Recovery Process:
- Ensure backup integrity by regularly testing recovery procedures.
- Use live CD/USB for recovery in case of system failure.
- Keep backups in a separate location to protect against hardware failure or disasters.
System Logs Analysis
- System logs are primarily located in the
/var/log/
directory, which includes essential log files:syslog
for general system messagesdmesg
for boot and kernel messagesauth.log
for authentication logskern.log
for kernel messages
journalctl
is used to query logs from thesystemd
journal, whilelogrotate
helps manage log sizes and archival.- Analyzing logs can involve:
- The
grep
command for searching specific entries tail -f
for real-time log monitoring- Identifying patterns that indicate recurring issues, such as repeated error messages
- The
Performance Tuning
- Monitoring system performance can be accomplished using:
top
for real-time system statisticshtop
for a user-friendly interface version oftop
vmstat
for insights on virtual memory, processes, and CPU activityiostat
to monitor device and CPU performance
- Common tuning techniques include:
- Adjusting
swappiness
to balance RAM and swap usage - Optimizing the file system with
tune2fs
for ext2/3/4 filesystems - Modifying caching settings like
cachepressure
anddirty_ratio
- Adjusting
- CPU and memory management can be handled with:
nice
andrenice
for prioritizing processesfree
command to monitor memory usage and adjust application resource utilization
Package Management
- Key package managers include:
apt
for Debian-based distributions (e.g., Ubuntu)yum
anddnf
for Red Hat-based distributions (e.g., CentOS, Fedora)
- Essential commands for package management:
- Installation:
apt install package_name
oryum install package_name
- Updates:
apt update
andapt upgrade
oryum update
- Removal:
apt remove package_name
oryum remove package_name
- Installation:
- Package managers typically handle dependencies automatically but may require manual intervention in some instances.
Network Troubleshooting
- Basic networking tools include:
ping
for testing network connectivitytraceroute
to identify the path packets take to a destinationifconfig
orip addr
for displaying and configuring network interfacesnetstat
to show active connections and routing tables
- For DNS troubleshooting:
nslookup
anddig
are used to query DNS records- Verify DNS server configurations in
/etc/resolv.conf
- Firewall configuration can be managed with:
iptables
orfirewalld
for setting firewall rules and controlling network traffic
Backup And Recovery
- Key backup tools consist of:
rsync
for efficient file transfer and syncingtar
for archiving and compressing filesdd
for disk cloning and backup
- Common backup strategies include:
- Full Backup: Comprehensive system backup
- Incremental Backup: Captures only the changes since the last backup
- Differential Backup: Backs up changes since the last full backup
- Recovery processes should ensure backup integrity through regular testing of recovery procedures, utilizing live CD/USB for recovery efforts, and storing backups in separate locations to mitigate risks of hardware failures or disasters.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.