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

A

-n

25
Q

rsync option to preserve hard links

A

-H

26
Q

rsync option to preserve selinux context

A

-X

27
Q

rsync option to preserve ACL

A

-A

28
Q

When running rsync what do you do to preserve ownerships

A

You must be the root user on the destination system to preserve file ownership.

29
Q

Static tuning

A

the tuned daemon applies settings when a service starts or when the profile is selected. never based on realtime activities.

30
Q

dynamic tuning

A

tuned daemon monitors system activity and adjusts settings according to runtime behavior changes

31
Q

monitor and tuning plug-ins

A

monitor and adjust parameter settings

32
Q

Default monitor plugins

A

disk, net, load

33
Q

Default tuning plugins

A

disk, net, cpu

34
Q

dynamic tuning default state

A

disabled

35
Q

How do you disable/enable dynamic tuning

A

set dynamic_tuning to 1 in /etc/tuned/tuned-main.conf

36
Q

Show info about a tuning profie

A

tuned-adm profile_info balanced

37
Q

Determine the most suitable profile for the system at this exact time

A

tuned-adm recommend

38
Q

Check the value of vm.dirty_ratio

A

sysctl vm.dirty_ratio