Home » Linux Kernel » Core Kernel » How to invoke OOM Killer manually for understanding which process gets killed first ?

How to invoke OOM Killer manually for understanding which process gets killed first ?

As we have seen in our previous post “Understanding Linux OOM Killer and avoiding perticular process from being killed in case of Out of Memory” process which consumes more memory and this has more oom_score becomes the most probable process which gets killed first when a OOM killer gets invoked automatically in case of low memory situation.

Lets now try to invoke the low memory killer manually to see which process gets killed first, for this you can manually check “ps -ax” and then note down the individual process Ids and its respective oom_score ( from /proc/PID/oom_score) to later verification.

As we can see in Linux kernel source code documentation, linux kernel has something called “magic SysRq key” which is useful for create certain conditions irrespective of what the kernel is doing actively, one of this condition/situation is to try and invoke OOM killer manualy even if we are not if out of memory condition to see how kernel behaves if it actually goes to out of memory.

write a character to /proc/sysrq-trigger. e.g.: echo t > /proc/sysrq-trigger
the required command key to invoke OOM killer is “f” which is mentioned in documentation as,

‘f’ – Will call the oom killer to kill a memory hog process, but do not panic if nothing can be killed.

 $ sudo chmod 777 /proc/sysrq-trigger 
 $ sudo echo f > /proc/sysrq-trigger 
 $ dmesg 
[73762.622372] sysrq: SysRq : Manual OOM execution
[73762.622679] kworker/0:2 invoked oom-killer: gfp_mask=0x24000c0, order=-1, oom_score_adj=0
[73762.622682] kworker/0:2 cpuset=/ mems_allowed=0
[73762.622687] CPU: 0 PID: 21512 Comm: kworker/0:2 Tainted: P           OE   4.4.0-71-generic #92-Ubuntu
[73762.622689] Hardware name: Dell Inc. Studio XPS 1640/0U785D, BIOS A12 11/19/2009
[73762.622694] Workqueue: events moom_callback
[73762.622696]  c1adf967 51c7b0b2 00000286 cc647e2c c13ac23f eaaf5df4 c2fe3600 cc647e6c
[73762.622701]  c11da125 c19e654c eaaf5df4 024000c0 ffffffff 00000000 00000292 cc647e6c
[73762.622705]  c13b1f5f c1b32c10 c1af6740 e52a7700 c2fe3a7c 00000000 c2fe3600 cc647ea4
[73762.622709] Call Trace:
[73762.622715]  [] dump_stack+0x58/0x79
[73762.622719]  [] dump_header.isra.9+0x44/0x175
[73762.622722]  [] ? ___ratelimit+0x9f/0xf0
[73762.622725]  [] oom_kill_process+0x1d2/0x390
[73762.622729]  [] ? has_capability_noaudit+0x1a/0x30
[73762.622730]  [] ? oom_badness.part.10+0x91/0x110
[73762.622733]  [] out_of_memory+0x1b9/0x2f0
[73762.622735]  [] moom_callback+0x44/0x80
[73762.622738]  [] process_one_work+0x121/0x3f0
[73762.622741]  [] worker_thread+0x37/0x490
[73762.622743]  [] ? process_one_work+0x3f0/0x3f0
[73762.622746]  [] kthread+0xa6/0xc0
[73762.622750]  [] ret_from_kernel_thread+0x21/0x38
[73762.622752]  [] ? kthread_create_on_node+0x170/0x170
[73762.622754] Mem-Info:
[73762.622758] active_anon:347006 inactive_anon:104141 isolated_anon:0
                active_file:182592 inactive_file:82838 isolated_file:0
                unevictable:16 dirty:131 writeback:0 unstable:0
                slab_reclaimable:43256 slab_unreclaimable:6853
                mapped:99402 shmem:36885 pagetables:6212 bounce:0
                free:183054 free_pcp:613 free_cma:0
[73762.622766] DMA free:10232kB min:788kB low:984kB high:1180kB active_anon:0kB inactive_anon:0kB active_file:1680kB inactive_file:652kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15980kB managed:15904kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:2960kB slab_unreclaimable:272kB kernel_stack:24kB pagetables:0kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
[73762.622768] lowmem_reserve[]: 0 785 3954 3954
[73762.622775] Normal free:223452kB min:39956kB low:49944kB high:59932kB active_anon:67484kB inactive_anon:28928kB active_file:199232kB inactive_file:87648kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:897016kB managed:842196kB mlocked:0kB dirty:24kB writeback:0kB mapped:29840kB shmem:6392kB slab_reclaimable:170064kB slab_unreclaimable:27140kB kernel_stack:5816kB pagetables:3296kB unstable:0kB bounce:0kB free_pcp:1216kB local_pcp:628kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
[73762.622777] lowmem_reserve[]: 0 0 25354 25354
[73762.622784] HighMem free:498532kB min:512kB low:40808kB high:81104kB active_anon:1320540kB inactive_anon:387636kB active_file:529456kB inactive_file:243052kB unevictable:64kB isolated(anon):0kB isolated(file):0kB present:3245320kB managed:3245320kB mlocked:64kB dirty:500kB writeback:0kB mapped:367768kB shmem:141148kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:21552kB unstable:0kB bounce:0kB free_pcp:1236kB local_pcp:708kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
[73762.622786] lowmem_reserve[]: 0 0 0 0
[73762.622788] DMA: 68*4kB (UE) 53*8kB (UME) 110*16kB (UME) 69*32kB (UME) 33*64kB (UME) 15*128kB (ME) 4*256kB (UM) 1*512kB (U) 0*1024kB 0*2048kB 0*4096kB = 10232kB
[73762.622800] Normal: 4317*4kB (UME) 2275*8kB (UME) 1058*16kB (UME) 667*32kB (UME) 462*64kB (UME) 239*128kB (UME) 110*256kB (UME) 50*512kB (UME) 19*1024kB (UME) 6*2048kB (M) 1*4096kB (M) = 223500kB
[73762.622811] HighMem: 30935*4kB (UM) 13603*8kB (UM) 2279*16kB (UM) 502*32kB (UM) 161*64kB (UM) 83*128kB (UM) 58*256kB (UM) 47*512kB (UM) 46*1024kB (UM) 28*2048kB (M) 12*4096kB (M) = 498532kB
[73762.622824] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
[73762.622825] 314536 total pagecache pages
[73762.622827] 12220 pages in swap cache
[73762.622829] Swap cache stats: add 162551, delete 150331, find 502250/508311
[73762.622830] Free swap  = 3601584kB
[73762.622831] Total swap = 4157436kB
[73762.622833] 1039579 pages RAM
[73762.622834] 811330 pages HighMem/MovableOnly
[73762.622835] 13724 pages reserved
[73762.622836] 0 pages cma reserved
[73762.622837] [ pid ]   uid  tgid total_vm      rss nr_ptes nr_pmds swapents oom_score_adj name
[73762.622842] [  285]     0   285     2534      701       7       3       33             0 systemd-journal
[73762.622844] [  316]     0   316     3659      625      10       3      306         -1000 systemd-udevd
[73762.622847] [  590]   134   590     3158      565       7       3       50             0 systemd-timesyn
[73762.622850] [  896]     0   896     1935      998       8       3       34             0 bluetoothd
[73762.622852] [  897]     0   897     1038      640       5       3       41             0 systemd-logind
[73762.622855] [  901]     0   901    10609     1096      14       3      328             0 ModemManager
[73762.622857] [  906]     0   906      872      503       5       3       38             0 atd
[73762.622860] [  908]   107   908     1509      786       7       3       50             0 avahi-daemon
[73762.622862] [  919]   101   919     7913      507       8       3      137             0 rsyslogd
[73762.622865] [  933]   102   933     1786     1108       7       3       56          -900 dbus-daemon
[73762.622867] [  982]   107   982     1482        5       7       3       67             0 avahi-daemon
[73762.622870] [  994]   131   994    48786     4197      25       3      256          -900 postgres
[73762.622872] [  998]     0   998     2219      873       9       3      178             0 ofonod
[73762.622875] [  999]     0   999    26979     3714      25       3      158             0 NetworkManager
[73762.622877] [ 1019]     0  1019     1397      556       6       3       38             0 cron
[73762.622880] [ 1021]     0  1021     9706     1760      14       3      566             0 accounts-daemon
[73762.622882] [ 1023]     0  1023      561      266       5       3        7             0 acpid
[73762.622884] [ 1028]     0  1028     1330      284       6       3       53             0 cgmanager
[73762.622887] [ 1032]     0  1032     9224     1231      12       3       88             0 urfkilld
[73762.622889] [ 1053]     0  1053   215997     3205      23       3      109          -900 snapd
[73762.622892] [ 1132]     0  1132    10064     1641      15       3       75             0 polkitd
[73762.622894] [ 1150]     0  1150     1375      690       7       3       44             0 mbbservice
[73762.622897] [ 1165]   103  1165    10728     2199      16       3      389             0 colord
[73762.622899] [ 1175]     0  1175     1140      491       6       3       18             0 irqbalance
[73762.622902] [ 1190]   131  1190    49279     3623      25       3      256          -900 postgres
[73762.622904] [ 1211]     0  1211    11117     1613      14       3      101             0 lightdm
[73762.622907] [ 1220]     0  1220     2503     1244       8       3        0         -1000 sshd
[73762.622909] [ 1259]   130  1259   136301     8429     105       3    22941             0 mysqld
[73762.622912] [ 1269]   131  1269    48786      613      22       3      281             0 postgres
[73762.622914] [ 1270]   131  1270    48786      616      24       3      279             0 postgres
[73762.622916] [ 1271]   131  1271    48786      612      22       3      283             0 postgres
[73762.622919] [ 1272]   131  1272    48888     1046      24       3      326             0 postgres
[73762.622921] [ 1273]   131  1273    13317      428      19       3      256             0 postgres
[73762.622923] [ 1274]     0  1274    51200     7680      69       3     2864             0 Xorg
[73762.622926] [ 1301]     0  1301     3111     1348       9       3      256             0 bandwidthd
[73762.622928] [ 1302]     0  1302     3137     1341       9       3      315             0 bandwidthd
[73762.622931] [ 1303]     0  1303     3260     1331      10       3      436             0 bandwidthd
[73762.622933] [ 1304]     0  1304     2978     1310       9       3      183             0 bandwidthd
[73762.622936] [ 1314]   131  1314    49279      580      20       3      261             0 postgres
[73762.622938] [ 1315]   131  1315    49279      381      21       3      268             0 postgres
[73762.622941] [ 1316]   131  1316    49279      567      20       3      274             0 postgres
[73762.622943] [ 1317]   131  1317    49346      911      23       3      285             0 postgres
[73762.622945] [ 1318]   131  1318    13583      428      17       3      254             0 postgres
[73762.622948] [ 1429]     0  1429     2618      889      10       3       32             0 wpa_supplicant
[73762.622950] [ 1476]   105  1476    16887     2395      19       3      162             0 whoopsie
[73762.622952] [ 1546]     0  1546      701        1       5       3       29             0 in.tftpd
[73762.622955] [ 1547]   129  1547     1246      440       6       3       83             0 nrpe
[73762.622957] [ 1553]     0  1553      674      421       4       3       38             0 xinetd
[73762.622959] [ 1556]     0  1556     1187      334       6       3       29             0 agetty
[73762.622962] [ 1562]     0  1562    36650      314      29       3      175             0 teamviewerd
[73762.622964] [ 1604]   133  1604     4008      524      12       3      644             0 snmpd
[73762.622967] [ 1626]     0  1626    45926     8749      30       3       94             0 apache2
[73762.622969] [ 1772]     0  1772     7277     1735      12       3      144             0 lightdm
[73762.622971] [ 1834]   111  1834     5949      637       9       3       69             0 rtkit-daemon
[73762.622974] [ 1899]  1000  1899     1595      823       6       3      130             0 systemd
[73762.622976] [ 1900]  1000  1900     6777       59      10       3      341             0 (sd-pam)
[73762.622978] [ 1952]  1000  1952    16069     2245      17       3      553             0 gnome-keyring-d
[73762.622981] [ 1954]  1000  1954     2133      896       9       3       41             0 upstart
[73762.622983] [ 2061] 65534  2061     2282      805       8       3       52             0 dnsmasq
[73762.622985] [ 2192]  1000  2192     1855       21       7       3       37             0 upstart-udev-br
[73762.622988] [ 2204]  1000  2204     1827     1011       8       3       50             0 dbus-daemon
[73762.622990] [ 2209]  1000  2209      592      152       5       3       16             0 sh
[73762.622993] [ 2219]  1000  2219    11456     1230      16       3       87             0 window-stack-br
[73762.622995] [ 2227]  1000  2227    16828     1859      18       3      162             0 url-dispatcher
[73762.622997] [ 2281]  1000  2281    18941     4094      29       3      868             0 bamfdaemon
[73762.623000] [ 2284]  1000  2284     1868      378       6       3       52             0 upstart-dbus-br
[73762.623002] [ 2285]  1000  2285     1932      486       7       3       33             0 upstart-dbus-br
[73762.623005] [ 2295]  1000  2295    11872     1142      13       3       37             0 gvfsd
[73762.623007] [ 2300]  1000  2300    12930     1003      13       3       95             0 gvfsd-fuse
[73762.623009] [ 2319]  1000  2319     6388     1136      10       3       44             0 dconf-service
[73762.623012] [ 2325]  1000  2325    12757     3001      17       3       42             0 ibus-daemon
[73762.623014] [ 2332]  1000  2332     1950      314       7       3       70             0 upstart-file-br
[73762.623016] [ 2347]  1000  2347     9379     1115      11       3       48             0 ibus-dconf
[73762.623019] [ 2348]  1000  2348    24939     4867      31       3      450             0 ibus-ui-gtk3
[73762.623021] [ 2350]  1000  2350    15935     3208      26       3      313             0 ibus-x11
[73762.623024] [ 2372]  1000  2372     6027       49       8       3       20             0 gpg-agent
[73762.623026] [ 2385]  1000  2385     7046      944      11       3       38             0 ibus-engine-sim
[73762.623029] [ 2400]  1000  2400    47772    16264      66       3      405             0 hud-service
[73762.623031] [ 2402]  1000  2402   132281     4951      41       3      318             0 unity-settings-
[73762.623034] [ 2408]  1000  2408    11143     1105      13       3       71             0 at-spi-bus-laun
[73762.623036] [ 2413]  1000  2413     1518      785       7       3       54             0 dbus-daemon
[73762.623038] [ 2414]  1000  2414    23484     2970      25       3     1308             0 gnome-session-b
[73762.623041] [ 2418]  1000  2418    30680     7197      37       3      193             0 unity-panel-ser
[73762.623043] [ 2429]  1000  2429     7295     1435      12       3       70             0 at-spi2-registr
[73762.623045] [ 2456]  1000  2456    11993     1299      14       3       74             0 indicator-messa
[73762.623048] [ 2457]  1000  2457    13345     1135      13       3       34             0 indicator-bluet
[73762.623050] [ 2458]  1000  2458    18524     1405      17       3      435             0 indicator-power
[73762.623053] [ 2467]  1000  2467    33450     2062      31       3      244             0 indicator-datet
[73762.623055] [ 2469]  1000  2469    30310     3530      33       3      495             0 indicator-keybo
[73762.623057] [ 2470]  1000  2470    80869     2077      24       3     1168             0 indicator-sound
[73762.623060] [ 2471]  1000  2471    21404     3479      30       3      531             0 indicator-print
[73762.623062] [ 2472]  1000  2472    17659     1235      20       3       20             0 indicator-sessi
[73762.623064] [ 2489]  1000  2489    14784     2235      19       3      227             0 indicator-appli
[73762.623067] [ 2493]     0  2493    20229     1837      19       3      130             0 upowerd
[73762.623069] [ 2499]  1000  2499    24890     5155      32       3      119             0 notify-osd
[73762.623072] [ 2517]  1000  2517    44187     2385      37       3      198             0 pulseaudio
[73762.623074] [ 2523]  1000  2523    35311     2663      38       3      516             0 evolution-sourc
[73762.623076] [ 2536]  1000  2536     3832      522      11       3      151             0 gconf-helper
[73762.623079] [ 2538]  1000  2538     2906     1132      10       3       59             0 gconfd-2
[73762.623081] [ 2568]  1000  2568    75151    14218     116       3     3571             0 compiz
[73762.623084] [ 2576]  1000  2576    34200     6122      43       3     1580             0 blueman-applet
[73762.623086] [ 2591]  1000  2591    80734    26718      98       3     3492             0 nautilus
[73762.623088] [ 2592]  1000  2592    19989     2947      28       3     1390             0 unity-fallback-
[73762.623091] [ 2596]  1000  2596    15851     3046      27       3      322             0 polkit-gnome-au
[73762.623093] [ 2597]  1000  2597    48418    11518      69       3     6562             0 gnome-software
[73762.623096] [ 2600]  1000  2600    30180     5071      34       3      878             0 nm-applet
[73762.623098] [ 2615]  1000  2615    10004     1254      14       3       82             0 gvfs-udisks2-vo
[73762.623100] [ 2634]  1000  2634    47431     3030      42       3     1750             0 goa-daemon
[73762.623103] [ 2638]     0  2638    13706     1468      14       3      236             0 udisksd
[73762.623105] [ 2648]  1000  2648     1019      486       6       3       47             0 syndaemon
[73762.623107] [ 2651]  1000  2651     9256     1447      13       3      581             0 gvfs-mtp-volume
[73762.623110] [ 2662]  1000  2662     9564     1475      14       3      599             0 gvfs-gphoto2-vo
[73762.623112] [ 2665]  1000  2665    41181     2925      52       3     6369             0 evolution-calen
[73762.623115] [ 2671]  1000  2671     9224     1332      13       3       33             0 gvfs-goa-volume
[73762.623117] [ 2681]     0  2681    30309     6590      31       3      713          -900 fwupd
[73762.623131] [ 2699]  1000  2699     9629     1027      14       3     1145             0 goa-identity-se
[73762.623134] [ 2704]  1000  2704    13131     1485      15       3      109             0 mission-control
[73762.623136] [ 2707]  1000  2707    19967     1686      17       3      107             0 gvfs-afc-volume
[73762.623139] [ 2726]  1000  2726    11934     1062      14       3       59             0 gvfsd-trash
[73762.623141] [ 2733]  1000  2733    11873      889      12       3      133             0 gvfsd-burn
[73762.623144] [ 2756]  1000  2756    39535     1200      43       3     7524             0 evolution-calen
[73762.623146] [ 2766]  1000  2766    29664     1955      32       3     1007             0 evolution-addre
[73762.623148] [ 2768]  1000  2768    37115     1525      43       3     6446             0 evolution-calen
[73762.623150] [ 2788]  1000  2788    31387     2616      34       3      349             0 evolution-addre
[73762.623153] [ 2820]  1000  2820    13632     1281      18       3      220             0 obexd
[73762.623155] [ 2823]  1000  2823    26236     3042      31       3      499             0 telepathy-indic
[73762.623158] [ 2835]  1000  2835    22272     3286      29       3      759             0 zeitgeist-datah
[73762.623160] [ 2841]  1000  2841      592      140       5       3       17             0 sh
[73762.623163] [ 2848]  1000  2848    13340     1596      13       3       68             0 zeitgeist-daemo
[73762.623165] [ 2857]  1000  2857   153322   105513     285       3    32708             0 zeitgeist-fts
[73762.623168] [ 2865]  1000  2865    27504     2360      28       3      943             0 unity-scope-hom
[73762.623170] [ 2885]  1000  2885     7928     1951      13       3       32             0 gvfsd-metadata
[73762.623172] [ 2897]  1000  2897    29340     2347      29       3     1236             0 unity-scope-loa
[73762.623175] [ 2898]  1000  2898    26626     1844      23       3     1218             0 unity-files-dae
[73762.623177] [ 2899]  1000  2899    18796     1475      22       3      880             0 unity-music-dae
[73762.623179] [ 2937]  1000  2937   257356    64795     331       2     1343             0 chromium-browse
[73762.623182] [ 2948]  1000  2948    53129     4149      63       3      734             0 chromium-browse
[73762.623184] [ 2950]  1000  2950    53129     2319      57       3      701             0 chromium-browse
[73762.623187] [ 3261]  1000  3261    18632     4033      28       3      350             0 update-notifier
[73762.623189] [ 3299]  1000  3299    44446     8586      65       3     4348             0 update-manager
[73762.623192] [ 3417]  1000  3417    88967    22222     114       3     1069           200 chromium-browse
[73762.623194] [ 3432]  1000  3432    52171     2166      61       3     1725           200 chromium-browse
[73762.623196] [ 4389]  1000  4389    16144     1305      16       3       72             0 deja-dup-monito
[73762.623199] [12304]  1000 12304    34344    10909      45       3        6             0 gnome-terminal-
[73762.623201] [12312]  1000 12312     2108     1541       8       3        0             0 bash
[73762.623203] [13178]  1000 13178   126571    38300     248       3      671           300 chromium-browse
[73762.623206] [14197]  1000 14197     1908     1306       7       3        1             0 bash
[73762.623208] [15329]   141 15329     3908      827       8       3        0             0 ntpd
[73762.623210] [15784]  1000 15784     1904     1305       7       3        0             0 bash
[73762.623213] [16281]  1000 16281     1910     1309       7       3        2             0 bash
[73762.623215] [16351]  1000 16351     1909     1296       7       3        0             0 bash
[73762.623217] [20848]  1000 20848    12032     1319      14       3        0             0 gvfsd-network
[73762.623220] [20894]  1000 20894    12222     1387      15       3        0             0 gvfsd-dnssd
[73762.623222] [26026]  1000 26026   113701    31532     213       3      665           300 chromium-browse
[73762.623225] [26596]  1000 26596    87171    14680     131       3      680           300 chromium-browse
[73762.623227] [27962]  1000 27962     1907     1294       7       3        0             0 bash
[73762.623230] [ 1496]  1000  1496     1893     1224       7       3       55             0 bash
[73762.623232] [ 2353]  1000  2353      825      509       5       3        0             0 netserver
[73762.623234] [ 2354]  1000  2354     1893     1271       7       3        0             0 bash
[73762.623237] [ 9718]    33  9718    46038     3049      25       3       92             0 apache2
[73762.623239] [ 9720]    33  9720    46009     2718      24       3       92             0 apache2
[73762.623242] [ 9721]    33  9721    46022     3033      24       3       92             0 apache2
[73762.623244] [ 9722]    33  9722    46034     3019      25       3       92             0 apache2
[73762.623246] [ 9727]     0  9727     3683     1636      11       3        0             0 cupsd
[73762.623249] [ 9729]     0  9729     9393     2624      16       3        0             0 cups-browsed
[73762.623251] [ 9992]  1000  9992   191240    75261     424       3      661           300 chromium-browse
[73762.623254] [12100]  1000 12100     1908     1281       7       3        0             0 bash
[73762.623256] [12183]  1000 12183     3772     1803      10       3        0             0 vim
[73762.623259] [12253]  1000 12253     1908     1316       7       3        0             0 bash
[73762.623261] [12571]  1000 12571     1904     1280       7       3        0             0 bash
[73762.623263] [13048]    33 13048    46034     3039      25       3       92             0 apache2
[73762.623266] [13052]    33 13052    46005     2694      24       3       92             0 apache2
[73762.623268] [13097]    33 13097    45989     2565      24       3       92             0 apache2
[73762.623270] [13098]    33 13098    45989     2566      24       3       92             0 apache2
[73762.623273] [13099]    33 13099    45989     2568      24       3       92             0 apache2
[73762.623275] [13100]    33 13100    45989     2568      24       3       92             0 apache2
[73762.623278] [15209]  1000 15209    90041    17873     142       3      664           300 chromium-browse
[73762.623280] [19265]  1000 19265   135289    38925     267       3      661           300 chromium-browse
[73762.623283] [19646]  1000 19646   117042    41462     260       3      663           300 chromium-browse
[73762.623286] [20041]  1000 20041   118053    37555     250       3      663           300 chromium-browse
[73762.623288] [20616]     0 20616     1503      794       6       3        0             0 dhclient
[73762.623291] [21670]  1000 21670    30709     9656      39       3        0             0 gedit
[73762.623293] [21746]     0 21746     2244     1053       8       3        0             0 sudo
[73762.623296] [21747]     0 21747     1069      137       6       3        0             0 echo
[73762.623298] Out of memory: Kill process 9992 (chromium-browse) score 336 or sacrifice child
[73762.623304] Killed process 9992 (chromium-browse) total-vm:764960kB, anon-rss:184248kB, file-rss:116796kB

As we can see from last two lines, OOM Killer killed process with process ID 9992 and which has oom_score as 336 which was largest compared to all other running processes ( if you have noted before invoking OOM killer manually, you can easily cross verify )


Subscribe our Rurban Life YouTube Channel.. "Rural Life, Urban LifeStyle"

3 thoughts on “How to invoke OOM Killer manually for understanding which process gets killed first ?”

Leave a Comment