DECK 3 Flashcards
dnf group list= shows all groups
dnf group info “groupname” ?
dnf transactions are logged to /var/log.dnf.rpm.log
dnf history undo undoes a transaction. Might not always be successful.
subscription-manager register registers a system? how to unregister?
put….at the end to get entitlement certs and access to repos. Its the final step
-info on specific group
-unregister
-attach
command & starts a job in background
move job to back background: first, Ctrl+Z to stop it, then…to move to background
jobs= shows all running jobs and their numbers ex: [1], [2] etc
fg (job number)=
-bg
-moves job back to foreground
WAITING PROCESS STATES:
task_interruptible (S): waiting for request or signal
task_uninterruptible (D): waiting but doesn’t respond to signals
task_killable (K): waiting, can be killed
task_report_idle: kernel threads, doesn’t count for load average. ignore
EXIT STATES:
- ZOMBIE (Z)+ signals parent it’s exit and releases all resources EXCEPT PID
- Next stage= EXIT_DEAD (X)= all remaining processes cleaned up
ZOMBIES DONT NEED TO BE KILLED. But…
- use…..to ask parent to reap Zombie’s status
- kill parent
-they occupy PIDS. Disadvantageous.
SIGCHLD
HOW A REPO FILE SHOULD LOOK EX:
[baseos]
name=BaseOS
baseurl=file:///repo/BaseOS
gpgcheck= 1 or 0 (depends on what’s being asked)
ps -fax= show hierachy between processes
ps -fU user = shows all processes owned by a user
ps -f –forest -C sshd= shows process tree for a specific process
free -m shows current memory usage
more detail seen in /…/meminfo
swap is disk space pretending to be RAM
memory usage can be changed in kernel parameters at boot: press e for edit, go to end of line that starts with ‘linux’, and after ‘quiet’ put…
-proc
-mem=#G #= a number you put. Ex. 1G, 3G
When writing files, might want to use ‘sync’ command to commit file to disk IMMEDIATELY to make sure it doesn’t disappear on reboot.
…..periodically commits write cache to disk
uptime checks cpu load
…..shows # of cpu cores
-pdflush
-lscpu
top show current system activity
ps aux | grep…. identifies zombies
CPU info in TOP: us = % of processes used by users, sy = % that is kernel processses, wait= system waiting for IO. Could be bad if its high, id = percent of time system is idle
load average higher than the number of cores is BAD
-defunct
signals allow OS to interrupt a process. man 7 signals documents signals
….command sends signals to PIDS. k can be used from top to do this as well
sigkill is a normal kill. …..is forceful kill
killall kills processes by name
-kill
-sigterm
STEPS TO KILLING A ZOMBIE
- identify it with ps aux | grep defunct
- use ps fax | less to find parent
- use kill -SIGCHLD with number of parent
- kill parent with kill and number of parent
SYSTEM TUNING
Swappiness is set in /proc/sys/vm/swappiness
use cat to view it, then echo # > /proc/sys/vm/swappiness to change it
-make it persistent by writing to …… This file also manages many kernel tunables
SWAPPINESS WON”T OPEN IN EDITORS!!!!
/etc/systl.d
use sysctl and whatever tunable to find it’s value
CHANGE SWAPPINESS TUNALBE
first, go to sysctl.d directory
use cat»_space; swappiness.conf «EOF
> vm.swappiness = #
>EOF
to change swappiness tunable
sysctl -a shows all tunables
difference between swappiness.conf and vm.swappiness?
tuned = systemd service, work with different profiles
tuned-….list= show current profiles
-swappiness.conf is PERSISTENT, vm.swappiness is NON-PERSISTENT
-adm
tuned-adm profile virtual-guest = sets another profile as default
reapply_sysctl = 1 or 0 parameter in /etc/tuned/tuned-main.conf does what?
-if at 1= sysctl parameter wins, 0= tuned wins