Действия

Linux

Материал из lulzette's wiki


открытые процессом файлы

/proc/PIDOF/fd/

сигналы (процессы)

Ctrl+C - SIGINT

SIGTERM ожидает завершения процесса, SIGKILL завершает процесс принудительно, не дожидаясь корректного завершения программы.

https://www.geeksforgeeks.org/segmentation-fault-sigsegv-vs-bus-error-sigbus/

SIGSEGV - Нарушение прав доступа к памяти, например, приложение попыталось записать в Read-only память.

SIGBUS - обращение процесса к некорректному адресу памяти.

The main difference between Segmentation Fault and Bus Error is that Segmentation Fault indicates an invalid access to a valid memory, while Bus Error indicates an access to an invalid address.

SIGCHLD - сигнал отправляет родительский процесс дитенышу, чтобы тот завершил свою деятельность [1]

Состояние процессов

Рекомендую: man ps, раздел "PROCESS STATE CODES"

Больше инфы: http://rus-linux.net/MyLDP/proc/processes-in-Linux.html
Меньше инфы: https://www.k-max.name/linux/processy-v-linux/

Интерактивный режим - процесс переднего плана, имеет состояние со знаком плюс (например R+, S+). Такие процессы ждут ввода от пользователя, такое бывает, например, когда процесс запущен на переднем плане в консоли.

  • Sleep

knflkr 297090 0.0 0.0 5328 648 pts/3 S+ 21:04 0:00 sleep 10000

  • Sleep, Ctrl+z, bg

knflkr 297090 0.0 0.0 5328 648 pts/3 S 21:04 0:00 sleep 10000


R - TASK_RUNNING: The process is either executing on a CPU or waiting to run. S - TASK_INTERRUPTIBLE: The process is waiting for some condition: a hardware request, system resource access, or signal. When an event or signal satisfies the condition , the process returns to Running.

D - TASK_UNINTERRUPTIBLE: This process is also Sleeping, but unlike s state, will not respond to delivered signals . Used only under specific conditions in which process interruption may cause an unpredictable device state.

K - TASK_KILLABLE: Identical to the uninterruptible D state, but modified to allow the waiting task to respond to a signal to be killed (exited completely). Utilities frequently display Killable processes as D state.

T - TASK_STOPPED : The process has been Stopped (suspended), usually by being signaled by a user or an other process. The process can be continued (resumed) by an others ignal to return to Running.

T - TASK_TRACED: A process that is being debugged is also temporarily Stopped and shares the same T state flag.

Z - EXIT_ZOMBIE: A child process signals its parent as it exits. All resources except for the process identity (PlD) a re released.

X - EXIT_DEAD: When the parent cleans up (reaps) the remaining child process structure, the process is now released completely. This state will never be observed in process - listing utilities. </source>

mail

MTA - передача писем, только SMTP
MDA - получение писем, MDA общается с MTA для их получения

MTA - exim, postfix, sendmail
MDA - dovecot, cyrus

nextcloud preview configuration

I don't want to generate all the preview sizes


This is possible since version 1.0.8. Just set the correct values via the command line

./occ config:app:set --value="32 64 1024" previewgenerator squareSizes
./occ config:app:set --value="64 128 1024" previewgenerator widthSizes
./occ config:app:set --value="64 256 1024" previewgenerator heightSizes


This will only generate:

  • square previews ofL 32x32, 64x64 and 1024x1024* aspect ratio previews with a width of: 64, 128 and 1024
  • aspect ratio previews with a height of: 64, 256 and 1024


Note:

  • preview sizes are always a power of 2.
  • The smallest size is 32
  • The max size is determined by your preview settings in config.php

Some stuff

disown -a && exit - выйти не закрывая работающие процессы

VirtualBox

VBoxManage clonehd absolutepath/image.vdi image.img --format raw - сконвертировать vdi в сырой диск
VBoxManage internalcommands createrawvmdk -filename disk.vmdk -rawdisk /dev/sda - создать vmdk который является физическим диском