3 Assignment - Linux

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Chapter 12.

System Initialization, Message Logging, and System Tuning

System Initialization (init/systemd):


● Configure the default runlevel or target for system boot.

● Create a custom systemd service unit file for a specific application or task.
● Set up automatic login for a specific user at system startup.

● Configure the system to run a script or command at boot time using systemd.
Message Logging (syslog/rsyslog):
● Configure syslog/rsyslog to log messages to a remote server.


● Filter and redirect specific log messages to separate log files.






● Set up log rotation to manage log file sizes and ensure proper log file
maintenance.

● Customize syslog/rsyslog settings to include or exclude specific log messages.


System Tuning:
● Optimize network settings for better performance, such as adjusting TCP/IP stack
parameters.
● Adjust file system parameters for improved disk I/O performance, such as
adjusting the disk scheduler or file system mount options.
● Configure kernel parameters to optimize memory usage, process scheduling, or
other system behaviors.
● Monitor system performance using tools like top, vmstat, or sar, and make
appropriate tuning adjustments based on the observed metrics.
● Implement security-related tuning, such as hardening the system against various
types of attacks or vulnerabilities.

Kernel Module Management:


● Load/unload kernel modules manually.
● Configure kernel modules to load automatically at boot time.
● Blacklist kernel modules to prevent them from loading automatically.

Resource Management (CPU, Memory, I/O):


● Set CPU affinity for specific processes or groups of processes.
● Configure memory limits using cgroups or other mechanisms to control memory
usage by specific processes.
● Tune I/O scheduler settings to optimize disk I/O performance for different
workload types.

Network Tuning:
● Adjust network buffer sizes to optimize network performance.
● Configure TCP/IP stack parameters, such as TCP window size or congestion
control algorithms, to improve network throughput and latency.
● Implement Quality of Service (QoS) policies to prioritize network traffic for
critical applications or services.

Chapter 13. Basic Storage Partitioning

Identify the Disk:


Determine the disk you want to partition by using the lsblk or fdisk -l command.
Here I determined the disk for partition with both lsblik and disk -l commands

Select a Partitioning Tool:


Linux provides several partitioning tools, including fdisk, parted, and gdisk. Choose the one
you're comfortable with.

For Partitioning tool I used a fdisk partition tool.

Launch the Partitioning Tool:


Launch fdisk with the disk you want to partition.

Create Partitions (inside fdisk)

Here I used Fdisk tool for partition creation. Command «p» means to print disk description. Then goes
«n» command which creates partition. After I was asked which partition type will be used where p meant
primary and L logical. Also number of partition I used default 3 number.

Set Partition Types


In the same fdisk tool I put «t» command for partition type change. I didn’t want to change then I
change it from linux type to linux

Format Partitions:
Here I added partition to the desktop

Mount Partitions:
Finally, mount the formatted partitions to directories in the file system.
Here is creation of mount point «mkdir /mount/example» and mounting partition

Configure Automatic Mounting (Optional):


To ensure partitions are automatically mounted at boot, add entries to the /etc/fstab file. This file
contains information about partitions and their mount points.

You might also like