Acceso de línea de comando a F_SETLEASE
$ touch q
$ ./lease q rw -- sh -c 'echo Cleanup request && sleep 1 && echo Now clean'&
[1] 28330
$ echo "Before trying to access" && cat q && echo "After tying to access"
Before trying to access
Cleanup request
Now clean
[1]+ Done ./lease q rw -- sh -c 'echo Cleanup request && sleep 1 && echo Now clean'
After tying to access
Al igual que la herramienta flock
, también puede operar con descriptores de archivos.
Acceso a la línea de comandos para controlar eventos de monitoreo de presión de memoria de grupos
Usage: cgroup_memory_pressure_monitor {low|medium|critical} /sys/fs/cgroup/memory/your_cgroup
Llene la memoria con contenido distinto de cero comprimible mediante Ultra Kernel Fusión de la misma página.
Rundll para Linux. Carga el símbolo principal de una biblioteca y lo ejecuta.
$ ./runso ./runso main ./runso main
Usage: runso ./libsomelibrary.so main <args>
Configure oom_score_adj, luego llene la memoria con ceros.
$ ./mempig
Killed
$ dmesg | grep -i oom
[228859.359178] mempig invoked oom-killer: gfp_mask=0x24280ca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), nodemask=0, order=0, oom_score_adj=1000
[228859.359234] [<ffffffff81168397>] oom_kill_process+0x237/0x450
[228859.359372] [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name
[228860.221001] oom_reaper: reaped process 27664 (mempig), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Puerto UDP listado y hacer dos cosas:
También intenta aumentar su prioridad de programación y bloquear todas las páginas en la memoria.
Diseñado para controlar remotamente varios mandos /sys/class/{brightness,gpio,pwm}/ de una manera simplista.
Escuche dos puertos UDP e intercambie información entre ellos. Cada respuesta va a la última dirección del par recibida. Algo como:
socat udp-l:1234 udp-l:1235
Pero no se "encierra" en un solo par.
Mida el tiempo de espera de la conexión UDP en NAT probando con diferentes retrasos y probando si la conexión aún funciona o no. La parte del servidor responde a los paquetes UDP según el tiempo de espera de los paquetes UDP entrantes. El cliente comprueba los tiempos de espera cada vez mayores hasta que detecta paquetes de respuesta faltantes y luego los "divide" para encontrar un retraso de apagado más exacto. El rango es de 2 a 512 segundos. Es posible que haya un servidor público en ejecución en el puerto vi-server.org:909.
$ udptimeoutchecker probe 0.0.0.0 0 vi-server.org 909
Trying with timeout 1 seconds...OK
Trying with timeout 2 seconds...OK
Trying with timeout 4 seconds...OK
Trying with timeout 8 seconds...OK
Trying with timeout 16 seconds...OK
Trying with timeout 32 seconds...OK
Trying with timeout 64 seconds...OK
Trying with timeout 128 seconds...FAIL
Trying with timeout 128 seconds...FAIL
Trying with timeout 128 seconds...FAIL
Trying with timeout 96 seconds...FAIL
Trying with timeout 80 seconds...FAIL
Trying with timeout 72 seconds...FAIL
Trying with timeout 68 seconds...FAIL
Trying with timeout 66 seconds...FAIL
Intermediate result: 64
Trying with timeout 1 seconds...OK
Trying with timeout 2 seconds...OK
Trying with timeout 4 seconds...OK
Trying with timeout 8 seconds...OK
Trying with timeout 16 seconds...OK
Trying with timeout 32 seconds...OK
Trying with timeout 64 seconds...OK
Trying with timeout 128 seconds...FAIL
Trying with timeout 128 seconds...FAIL
Trying with timeout 128 seconds...FAIL
Trying with timeout 96 seconds...FAIL
Trying with timeout 80 seconds...FAIL
Trying with timeout 72 seconds...FAIL
Trying with timeout 68 seconds...FAIL
Trying with timeout 66 seconds...FAIL
Intermediate result: 64
Trying with timeout 1 seconds...OK
Trying with timeout 2 seconds...OK
Trying with timeout 4 seconds...OK
Trying with timeout 8 seconds...OK
Trying with timeout 16 seconds...OK
Trying with timeout 32 seconds...OK
Trying with timeout 64 seconds...OK
Trying with timeout 128 seconds...FAIL
Trying with timeout 128 seconds...FAIL
Trying with timeout 128 seconds...FAIL
Trying with timeout 96 seconds...FAIL
Trying with timeout 80 seconds...FAIL
Trying with timeout 72 seconds...FAIL
Trying with timeout 68 seconds...FAIL
Trying with timeout 66 seconds...FAIL
Intermediate result: 64
64
Anteponga a cada paquete UDP 12 bytes de marca de tiempo de nanosegundos (8 bytes para segundos, 4 para nanosegundos) y 4 bytes de número de secuencia por cliente y envíelos de regreso.
$ ./udp_ts_seq_reply 0.0.0.0 1919&
$ socat -x -v - udp:127.0.0.1:1919 > /dev/null
123
> 2018/02/19 19:52:08.981246 length=4 from=0 to=3
31 32 33 0a 123.
--
< 2018/02/19 19:52:08.981712 length=20 from=0 to=19
00 00 00 00 00 57 2f 47 09 a8 bf 83 00 00 00 01 .....W/G........
31 32 33 0a 123.
--
ABC
> 2018/02/19 19:52:11.439685 length=4 from=4 to=7
41 42 43 0a ABC.
--
< 2018/02/19 19:52:11.440078 length=20 from=20 to=39
00 00 00 00 00 57 2f 49 24 fa c5 ed 00 00 00 02 .....W/I$.......
41 42 43 0a ABC.
--
DEF
> 2018/02/19 19:52:13.094035 length=4 from=8 to=11
44 45 46 0a DEF.
--
< 2018/02/19 19:52:13.094455 length=20 from=40 to=59
00 00 00 00 00 57 2f 4b 10 61 48 68 00 00 00 03 .....W/K.aHh....
44 45 46 0a DEF.
--
$ dump_tc_stats
Usage: dump_tc_stats <iface>
Dump interface statistics periodically. Don't forget to `tc qdisc add <iface> root ...` something
$ dump_tc_stats veth0
{"PACKETS":23514,"BYTES":2979825,"RATE_BPS":0,"RATE_PPS":0,"QLEN":0,"BACKLOG":0,"DROPS":0,"REQUEUES":0,"OVERLIMITS":0}
{"PACKETS":23526,"BYTES":2981342,"RATE_BPS":0,"RATE_PPS":0,"QLEN":0,"BACKLOG":0,"DROPS":0,"REQUEUES":0,"OVERLIMITS":0}
...