Archiving & Tuning Flashcards

1
Q

Archive folder /etc using tar and gz

A
tar cfz etc.tar.gz /etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Archive folder /etc using tar and bz2

A
tar cfj etc.tar.bz2 /etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Archive folder /etc using tar and xz

A
tar cfJ etc.tar.xz /etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

List the content of a tar file

A

tar tf etc.tar (t for test)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Extract tar file to a specified target directory

A

tar xf etc.tar -C etc-backup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What recommended ways to copy files to remote servers rsync or scp?

A

rsync or sftp
scp is insecure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

You are in sftp. What commands are used to navigate local file system?

A

lpwd, lcd, lls, lmkdir

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In sftpt download a directory and its full content

A
get -r dir
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Copy dirA to serverA

A
rsync -av dirA servera:
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Diff between:

rsync -a dirA   dirB
rsync -a dirA/   dirB
A

First copies the folder dirA. Second copies the content of dirA

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the name of the perf tuning daemon?

A

tuned

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What command do you use to interface with the perf tuning daemon

A

tuned-adm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Install perf tuning daemon

A

dnf install tuned

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Determine currently active tuning profile

A
tuned-adm active
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Show all perf tuning profile

A
tuned-adm list
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are some tuning profiles

A

aws
virtual-guest
virtual-host
balanced
powersave
desktop

17
Q

Activate profile balanced

A

tuned-adm profile balanced

18
Q

Where are perf tuning profiles stored?

A
/usr/lib/tuned
19
Q

Create a custom tuning profile

A
cp /usr/lib/tuned/balanced/tuned.conf    /etc/tuned/custom/tuned.conf
tuned-adm profile custom
20
Q

What are the sections of a tuning profile

A

main, sysctl

21
Q

What are some fields of a tuning profile

A

summary
include (to inclue another profile)

22
Q

Check if the perf daemon is installled

A

dnf list tuned

23
Q

Copy file from sftp server in one single command

A

sftp remoteuser@remotehost:/home/remoteuser/remotefile

24
Q

rsync dry run option

25
rsync option to preserve hard links
-H
26
rsync option to preserve selinux context
-X
27
rsync option to preserve ACL
-A
28
When running rsync what do you do to preserve ownerships
You must be the root user on the destination system to preserve file ownership.
29
Static tuning
the tuned daemon applies settings when a service starts or when the profile is selected. never based on realtime activities.
30
dynamic tuning
tuned daemon monitors system activity and adjusts settings according to runtime behavior changes
31
monitor and tuning plug-ins
monitor and adjust parameter settings
32
Default monitor plugins
disk, net, load
33
Default tuning plugins
disk, net, cpu
34
dynamic tuning default state
disabled
35
How do you disable/enable dynamic tuning
set dynamic_tuning to 1 in /etc/tuned/tuned-main.conf
36
Show info about a tuning profie
tuned-adm profile_info balanced
37
Determine the most suitable profile for the system at this exact time
tuned-adm recommend
38
Check the value of vm.dirty_ratio
sysctl vm.dirty_ratio