Posts

Showing posts from June, 2021

Process management

 killing process may lead to data corruption -  ctrl+Z -> Paused jobs background & jobs %1 - switch back to foreground for job #1 %2 - bg 1 -> Paused apps runs in background. fg 1 -> Brings the app to foreground. Deprioritize the process - you don't have to kill the process. "nice"ness value - 0 is default. -20 to +19 ( minus 20 - TOP priority, usually kernel process like kworker ) #nice -n 11 vim /file1.txt  ( setting priority when starting process ) NI -> 'NI'ceness value. #renice -n 11 1234 -> changes the priority of the running process #pgrep vim ( shows all process id linked to "vim") #killall firefox ( kills all copies for 'firefox' process and their child process )

Unexpected long booting time ? How long each process took when booting ?

 Unexpected long booting time ? How long each process took when booting ? ( "top" command is useful only after booting, realtime ) #systemd-analyze blame

Managing services using systemd and sysV init

 ustlstops142 - Dev server. - Tops/Cathy. Virtual server. RHEL 7.9 -  systemd - unit files - /lib/systemd/system .service - daemons .timer .target - user environmet .slice .socket -> network service .mount - systemd doesn't needs /etc/fstab -> it can use .mount /etc/systemd/system -> overreides /lib/systemd/system - make config changes only here systemd is a binary - it is an executable that runs. systemctl - controls systemd systemctl start httpd systemctl enable httpd -> puts a symlink in /etc/ for /usr/lib/systemd/system/httpd.service systemctl disable httpd -> removes the symlink from /etc/ for httpd.server systemctl status httpd -? systemctl isolate multi-user.target Managing services with systemd Amazon Linux - uses CentOS06 - uses upstart - user sysV init sysV init - starts process one by one. systemd - starts process in parallel === $  ls -l | grep rc.* # Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure $ $ rc.sysinit - systemV ...