Performance Metrics Flashcards

(24 cards)

1
Q

What are performance metrics used for?

A

To monitor CPU and process activity.

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

Which package provides performance monitoring tools in Linux?

A

The sysstat package.

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

What does the sysstat package do?

A

Collects, reports, and logs system performance data.

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

Which tools are included in sysstat for monitoring?

A

mpstat and pidstat.

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

What is mpstat used for?

A

Provides per-processor breakdown of CPU activity.

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

What details does mpstat report?

A

Time spent in user mode, system mode, I/O wait, and idle time.

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

What is the syntax for mpstat?

A

mpstat [ -P { cpu | ALL } ] [ interval [ count ] ]

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

What does -P cpu do in mpstat?

A

Targets a specific core.

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

What does -P ALL do in mpstat?

A

Targets all cores.

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

What does interval mean in mpstat?

A

Defines time between samples.

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

What does count mean in mpstat?

A

Sets number of samples to collect.

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

Example mpstat command?

A

mpstat -P ALL 2 5

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

What does mpstat -P ALL 2 5 do?

A

Samples all CPUs every 2 seconds and collects 5 samples.

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

Why use mpstat?

A

To spot load imbalance across cores and detect spikes in I/O wait.

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

What is pidstat used for?

A

Monitors resource usage by process.

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

What details does pidstat report?

A

CPU usage, memory statistics, I/O activity, and thread statistics.

17
Q

What is the syntax for pidstat?

A

pidstat [ -u ] [ -r ] [ -d ] [ -p pid,… ] [ interval [ count ] ]

18
Q

What does -u do in pidstat?

A

Displays CPU usage.

19
Q

What does -r do in pidstat?

A

Shows memory statistics.

20
Q

What does -d do in pidstat?

A

Reveals I/O activity.

21
Q

What does -p pid do in pidstat?

A

Specifies process IDs to monitor.

22
Q

Example pidstat command?

A

pidstat -u -r -d -p 1234 1 3

23
Q

What does pidstat -u -r -d -p 1234 1 3 do?

A

Monitors process 1234 every second, collects 3 samples, and displays CPU, RAM, and disk usage.

24
Q

Why use pidstat?

A

To identify resource-heavy processes and enable performance tuning.