PS Flashcards

1
Q

When the ps command is run without any arguments, which processes will it display?

A

The processes that belong to the current user and are associated with the same terminal in which the command is run.

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

What is a PID?

A

The process ID

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

What is the TTY?

A

The controlling terminal for a process.

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

What is the TIME category?

A

The cumulative CPU time the process has used since the process started.

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

What is CMD?

A

The name of the command that is running.

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

What flag can you append to ps that shows common useful information?

A

u (with no dash)

so: ps u

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

What does the %MEM column tell us?

A

The percentage of real memory used by a process.

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

What does the VSZ column tell us?

A

Indicates, as a decimal integer, the size in kilobytes of the process in virtual memory.

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

What does the RSS column tell us?

A

The real-memory size of the process (in 1 KB units).

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

What flag can we use to display all running processes?

A

-e

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

What flag can we use to see all the processes and with more detail than -e?

A

ps ax

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

How can you filter results by user?

A

with the -U flag

ps -U root

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

We can easily customize ps to display a host of different column information using the ___ and ___ flags.

A
  • L

- O

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

To get a list of the available columns that can be displayed with ps we can use the ____ flag.

A

-L

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

How can you pass column names you want to see to the ps command?

A

By prefixing them with the -O flag:

ps -O etime,%cpu,%mem…

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

How can you pass column names you want to see to the ps command?

A

By prefixing them with the -O flag:

ps -O etime,%cpu,%mem…

17
Q

It is important to note that when we look at things like current CPU and memory usage with ps, they are ____ of those numbers ______.

A

static snapshots

at that moment in time

18
Q

Flag for sorting by memory usage

A

-m

19
Q

Flag for sorting by CPU usage

A

-r