Podcast
Questions and Answers
Which of the following is NOT a characteristic of a process, according to the provided information?
Which of the following is NOT a characteristic of a process, according to the provided information?
- It can start another process.
- It can only be created by another process.
- It can be started from the GUI.
- It can be directly terminated by any user. (correct)
Which command provides a real-time, dynamic view of running processes?
Which command provides a real-time, dynamic view of running processes?
- ps
- bg
- jobs
- top (correct)
A process is in 'D' state. What does this indicate?
A process is in 'D' state. What does this indicate?
- The process is waiting for I/O, such as disk drive access. (correct)
- The process is running.
- The process has been traced or stopped.
- The process is sleeping.
A process is marked with a 'Z' state. Why?
A process is marked with a 'Z' state. Why?
In the ps
command output, what does the '<' character indicate about a process?
In the ps
command output, what does the '<' character indicate about a process?
In the output of ps aux
, what does the %CPU header represent?
In the output of ps aux
, what does the %CPU header represent?
You want to run a command in the background. Which command should you use after initiating the process?
You want to run a command in the background. Which command should you use after initiating the process?
Which command lists only active jobs?
Which command lists only active jobs?
What does the START field in the top
command output indicate?
What does the START field in the top
command output indicate?
In the context of the top
command, what does the 'ni' value under %Cpu(s)
represent?
In the context of the top
command, what does the 'ni' value under %Cpu(s)
represent?
In networking, which device operates by broadcasting messages to all devices in the subnet?
In networking, which device operates by broadcasting messages to all devices in the subnet?
Which networking device forwards messages based on MAC addresses within a subnetwork?
Which networking device forwards messages based on MAC addresses within a subnetwork?
Which layer of the TCP/IP model is responsible for the fragmentation and reassembly of packets?
Which layer of the TCP/IP model is responsible for the fragmentation and reassembly of packets?
Which protocol is primarily used for transferring files that make up web pages?
Which protocol is primarily used for transferring files that make up web pages?
Which protocol is used for remote terminal access to network hosts?
Which protocol is used for remote terminal access to network hosts?
Which protocol resolves a hostname to an IP address?
Which protocol resolves a hostname to an IP address?
What is the primary function of the ping
command?
What is the primary function of the ping
command?
Which command is used to display network connections, routing tables, and interface statistics?
Which command is used to display network connections, routing tables, and interface statistics?
What is the purpose of the traceroute
command?
What is the purpose of the traceroute
command?
Which command is used to download files from the internet in a non-interactive manner?
Which command is used to download files from the internet in a non-interactive manner?
Flashcards
ps command
ps command
Reports a snapshot of current processes.
top command
top command
Displays tasks.
jobs command
jobs command
Lists active jobs.
bg command
bg command
Signup and view all the flashcards
fg command
fg command
Signup and view all the flashcards
Process State: R
Process State: R
Signup and view all the flashcards
Process State: S
Process State: S
Signup and view all the flashcards
Process State: D
Process State: D
Signup and view all the flashcards
Process State: T
Process State: T
Signup and view all the flashcards
Process State: Z
Process State: Z
Signup and view all the flashcards
Process Character: <
Process Character: <
Signup and view all the flashcards
Process Character: N
Process Character: N
Signup and view all the flashcards
Process Character: L
Process Character: L
Signup and view all the flashcards
Process Character: S
Process Character: S
Signup and view all the flashcards
Process Character: |
Process Character: |
Signup and view all the flashcards
Process Character: +
Process Character: +
Signup and view all the flashcards
Header: %CPU
Header: %CPU
Signup and view all the flashcards
Header:%MEM
Header:%MEM
Signup and view all the flashcards
Header: VSZ
Header: VSZ
Signup and view all the flashcards
KlB Mem
KlB Mem
Signup and view all the flashcards
Study Notes
- A process can be started from the GUI or the command line.
- A process can start another process.
- A process can only be created by another process.
Commands for Viewing and Controlling Processes
ps
reports a snapshot of current processes.top
displays tasks.jobs
lists active jobs.bg
places a job in the background.fg
places a job in the foreground.
Viewing Processes
- The
ps
command shows: PID (Process ID), TTY (Teletypewriter, controlling terminal), TIME (cumulative CPU time), and CMD (command name). - Process states include: Running (R), Sleeping (S), Waiting for an event (S), Uninterruptible sleep (D), Waiting for I/O (D), Traced or stopped (T), and Defunct or zombie (Z).
- A zombie process is a terminated child process not cleaned up by its parent.
- Characters used with process states:
<
is high priority,N
is low priority,L
has pages locked into memory,S
is for real-time and custom I/O,l
is a session leader,+
is in the foreground process group, and|
is multi-threaded. - The
ps
command with theaux
option shows: USER (owner's user ID), %CPU (CPU usage percentage), %MEM (memory usage percentage), and VSZ (Virtual Memory Size). RSS
(Resident Set Size) is the physical memory amount (in kilobytes) a process uses.START
is the process start time; a date is used for values over 24 hours.
The top
Program
- The
top
program displays real-time system information, including uptime, user count, load averages, task summaries, and CPU/memory usage. - Load average indicates processes waiting to run, with values for the last 1, 5, and 15 minutes.
- The field descriptions from the
top
program include: - %Cpu(s): CPU usage statistics.
- us: CPU time used by user processes.
- sy: CPU time used by kernel processes.
- ni: CPU time used by "nice" (low priority) processes.
- id: CPU time idle.
- wa: CPU time waiting for I/O.
- hi: CPU time servicing hardware interrupts.
- si: CPU time servicing software interrupts.
- st: CPU time stolen by the hypervisor.
- KiB Mem: RAM used in kilobytes.
- KiB Swap: Swap space used in kilobytes.
- PID: Process ID.
- USER: Username of the process owner.
- PR: Priority of the process.
- NI: Niceness value.
- VIRT: Total virtual memory used by the process.
- RES: Resident size (non-swapped physical memory) in kilobytes.
- SHR: Shared memory size in kilobytes.
- S: Process status.
- %CPU: CPU time percentage used since the last update.
- %MEM: Memory percentage used since the last update.
- TIME+: Cumulative CPU time used by the process and its children.
- COMMAND: Process name or command used to start the process.
- Interrupt a process with Ctrl + C.
- Putting a process in the background: type
top &
. - Use the
jobs
command to see stopped jobs. - Return a process to the foreground: type
fg %1
. - Move a process to the background: type
bg %1
.
Networking
- A computer network facilitates communication between resources through connected computers and computing resources.
- To establish network access: have a network interface, run network services, and have access to a network-broadcast device.
- A network interface connects to the network.
- Network services include firewall, interface device, network authentication, and network file systems.
- Network-broadcast devices:
- A Hub broadcasts messages to all subnet devices.
- A Switch broadcasts messages to a single subnetwork device using MAC addresses.
- A Router directs messages to the appropriate network or subnetwork based on IP addresses.
- A Gateway connects different local area networks.
- TCP/IP has four layers: Network Interface, Internet, Transport, and Application.
- The Network Interface Layer places/receives TCP/IP packets on/off the network medium.
- The Internet Layer handles addressing, packaging, and routing with core protocols like IP, ARP, ICMP, and IGMP.
- IP (Internet Protocol) does IP addressing, routing, fragmentation, and packet reassembly.
- ARP (Address Resolution Protocol) resolves Internet layer addresses to the Network Interface layer (hardware) address.
- ICMP (Internet Control Message Protocol) provides diagnostic functions and reports IP packet delivery errors.
- IGMP (Internet Group Management Protocol) manages IP multicast groups.
- The Transport Layer provides session and datagram communication services via TCP and UDP.
- TCP (Transmission Control Protocol) establishes TCP connections, sequences packets, acknowledges sent packets, and recovers lost packets.
- UDP (User Datagram Protocol) is used for small data transfers, avoiding TCP overhead, or when upper layers ensure reliable delivery.
- The Application Layer allows applications to access services and defines protocols for data exchange.
- Common Application Layer protocols: HTTP, FTP, SMTP, and Telnet.
- HTTP (Hypertext Transfer Protocol) transfers web page files.
- FTP (File Transfer Protocol) is for interactive file transfer.
- SMTP (Simple Mail Transfer Protocol) transfers email messages and attachments.
- Telnet is a terminal emulation protocol for remote host login.
- Protocols facilitating TCP/IP network use and management include: DNS, RIP, and SNMP.
- DNS (Domain Name System) resolves hostnames to IP addresses.
- RIP (Routing Information Protocol) exchanges routing information between routers on IP internetworks.
- SNMP (Simple Network Management Protocol) collects and exchanges network management information between a console and devices.
Networking Commands
ping
sends ICMP ECHO_REQUEST packets to network hosts.traceroute/tracepath
prints the route taken by packets to a network host.ip
shows/manipulates routing, devices, policy routing, and tunnels.netstat
prints network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.ftp
is an Internet file transfer program.wget
is a non-interactive network downloader.ssh
is an OpenSSH SSH client (remote login program).
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.