PE Systems
58 flashcards · Computer Science · by tosus
Command to show swap
swapon
List of mappings from virtual to physical address space
Translation Lookaside Buffer
Command for getting open files and descriptors
lsof
Hardware that implements virtual memory
Memory Management unit
Outdated command to check network connections
netstat
Size of a memory page
4kb
Command for socket statistics
ss
Directory that contains a process's open file descriptors
/proc/[pid]/fd
Command to get network packets
tcpdump
Command to track process syscalls
strace
A command to monitor process's function calls
perf top
Directory that contains runtime statistics of a process
/proc/[pid]/stat
Command to view recently logged in users
last
Command to view a process's executable
readlink /proc/[pid]/exe
RedHat command to find package associated with an executable
rpm -qf
Directory that contains a process's environment variables
/proc/[pid]/environ
Syscall for obtaining parent process's PID
getppid()
Syscall for obtaining process's own PID
getpid()
Syscall for waiting for any child process to exit
wait()
Syscall for waiting for a specific child process to exit
waitpid(PID)
Syscall for creating a child process
fork()
A signal to exit program that can have a custom handler
SIGTERM
A signal to exit program that can NOT have a custom handler
SIGKILL
A one-way form of IPC that works by creating 2 file descriptors, one for read, one for write
pipe
Syscall to clone a file descriptor
dup()
Syscall to create a filesystem node
mknod()
A pipe implemented as a special named file in the filesystem
FIFO
Code to create a FIFO
mknod("fifo_name", S_IFIFO | 0666, 0)
Syscall for manipulating file descriptors, can be used for setting advisory file locks
fcntl()
Syscall for creating semaphores
semget()
Syscall for controlling semaphores
semop()
Syscall for creating shared memory segments
shmget()
Syscall that can create IPC keys for semaphores and shared memory segments
ftok()
Syscall for obtaining a pointer to a shared memory segment
shmat()
Syscall for detaching from a shared memory segment
shmdt(*shmaddr)
Syscall for mapping memory to a file
mmap()
Form of IPC that functions like a two-way pipe
Unix Domain Sockets
Syscall for creating sockets
socket()
Syscall for assigning a socket to an address (special file)
bind()
Syscall to make socket await connections from clients
listen()
Syscall that returns a new socket descriptor that's connected to a client
accept()
Syscalls for sending and receiving connections over a socket
send(), recv()
Syscall for connecting a socket to a currently listening server
connect()
Syscall to commit pending filesystem changes to disk
sync()
Syscall for accessing file descriptor inode metadata
stat()
System page that contains a cached file that has been changed, but the changes have not been committed to memory yet
Dirty page
Default capacity of a linux pipe
16 pages
Utility for reading virtual memory statistics
vmstat
Utility for reading IO statistics
iostat
Utility for listing information about block devices
lsblk
Utility for locating block devices and printing their attributes
blkid
Command to print all mounted devices
cat /proc/mounts
Command for limiting process's resource consumption
ulimit
Command for displaying filesystem info
df
Command for displaying disk usage of files
du
Command to separate a process from shell/terminal while still having it remains as it's child
nohup
Command that removes a process from shell's list of children
disown
Syscall for getting directory entries
getdents()