571
574
fprintf(fp, "help options:\n");
572
fprintf(fp, " -e - extension table data\n");
573
575
fprintf(fp, " -a - alias data\n");
574
576
fprintf(fp, " -b - shared buffer data\n");
575
577
fprintf(fp, " -B - build data\n");
576
578
fprintf(fp, " -c - numargs cache\n");
577
579
fprintf(fp, " -d - device table\n");
578
580
fprintf(fp, " -D - dumpfile contents/statistics\n");
581
fprintf(fp, " -e - extension table data\n");
579
582
fprintf(fp, " -f - filesys table\n");
583
fprintf(fp, " -h - hash_table data\n");
584
fprintf(fp, " -H - hash_table data (verbose)\n");
580
585
fprintf(fp, " -k - kernel_table\n");
581
586
fprintf(fp, " -K - kernel_table (verbose)\n");
587
fprintf(fp, " -L - LKCD page cache environment\n");
582
588
fprintf(fp, " -M <num> machine specific\n");
583
589
fprintf(fp, " -m - machdep_table\n");
584
590
fprintf(fp, " -n - dumpfile contents/statistics\n");
591
fprintf(fp, " -o - offset_table and size_table\n");
592
fprintf(fp, " -p - program_context\n");
593
fprintf(fp, " -r - dump registers from dumpfile header\n");
585
594
fprintf(fp, " -s - symbol table data\n");
595
fprintf(fp, " -t - task_table\n");
596
fprintf(fp, " -T - task_table plus context_array\n");
586
597
fprintf(fp, " -v - vm_table\n");
587
598
fprintf(fp, " -V - vm_table (verbose)\n");
588
fprintf(fp, " -o - offset_table and size_table\n");
589
fprintf(fp, " -t - task_table\n");
590
599
fprintf(fp, " -x - text cache\n");
591
fprintf(fp, " -T - task_table plus context_array\n");
592
fprintf(fp, " -p - program_context\n");
593
fprintf(fp, " -h - hash_table data\n");
594
fprintf(fp, " -H - hash_table data (verbose)\n");
595
fprintf(fp, " -L - LKCD page cache environment\n");
599
603
dumpfile_memory(DUMPFILE_ENVIRONMENT);
724
743
char *help_foreach[] = {
726
745
"display command data for multiple tasks in the system",
727
"[[pid | taskp | name | [kernel | user]] ...] command [flag] [argument]",
746
"[[pid | taskp | name | state | [kernel | user]] ...]\n"
747
" command [flag] [argument]",
728
748
" This command allows for a an examination of various kernel data associated",
729
749
" with any, or all, tasks in the system, without having to set the context",
730
750
" to each targeted task.\n",
731
751
" pid perform the command(s) on this PID.",
732
752
" taskp perform the command(s) on task referenced by this hexadecimal",
733
753
" task_struct pointer.",
734
" name perform the command(s) on all commands with this name. If the",
735
" command name can be confused with a foreach command name, then",
736
" precede the name string with a \"\\\".",
754
" name perform the command(s) on all tasks with this name. If the",
755
" task name can be confused with a foreach command name, then",
756
" precede the name string with a \"\\\". If the name string is",
757
" enclosed within \"'\" characters, then the encompassed string",
758
" must be a POSIX extended regular expression that will be used",
759
" to match task names.",
737
760
" user perform the command(s) on all user (non-kernel) threads.",
738
761
" kernel perform the command(s) on all kernel threads.",
739
" active perform the command(s) on the active thread on each CPU.\n",
762
" active perform the command(s) on the active thread on each CPU.",
763
" state perform the command(s) on all tasks in the specified state, which",
764
" may be one of: RU, IN, UN, ST, ZO, TR, SW or DE.\n",
740
765
" If none of the task-identifying arguments above are entered, the command",
741
766
" will be performed on all tasks.\n",
742
767
" command select one or more of the following commands to be run on the tasks",
743
768
" selected, or on all tasks:\n",
744
" bt run the \"bt\" command (optional flags: -r -t -l -e -R -f -F -o)",
745
" vm run the \"vm\" command (optional flags: -p -v -m -R)",
746
" task run the \"task\" command (optional flag: -R)",
747
" files run the \"files\" command (optional flag: -R)",
748
" net run the \"net\" command (optional flags: -s -S -R)",
749
" set run the \"set\" command",
750
" sig run the \"sig\" command (optional flag: -g)",
751
" vtop run the \"vtop\" command (optional flags: -c -u -k)\n",
769
" bt run the \"bt\" command (optional flags: -r -t -l -e -R -f -F",
771
" vm run the \"vm\" command (optional flags: -p -v -m -R -d -x)",
772
" task run the \"task\" command (optional flags: -R -d -x)",
773
" files run the \"files\" command (optional flag: -R)",
774
" net run the \"net\" command (optional flags: -s -S -R -d -x)",
775
" set run the \"set\" command",
776
" sig run the \"sig\" command (optional flag: -g)",
777
" vtop run the \"vtop\" command (optional flags: -c -u -k)\n",
752
778
" flag Pass this optional flag to the command selected.",
753
779
" argument Pass this argument to the command selected.",
1260
1332
" Show all tasks sorted by their task_struct's last_run or timestamp value,",
1261
1333
" whichever applies:\n",
1263
" [280195] PID: 2 TASK: c1468000 CPU: 0 COMMAND: \"keventd\"",
1264
" [280195] PID: 1986 TASK: c5af4000 CPU: 0 COMMAND: \"sshd\"",
1265
" [280195] PID: 2039 TASK: c58e6000 CPU: 0 COMMAND: \"sshd\"",
1266
" [280195] PID: 2044 TASK: c5554000 CPU: 0 COMMAND: \"bash\"",
1267
" [280195] PID: 2289 TASK: c70c0000 CPU: 0 COMMAND: \"s\"",
1268
" [280190] PID: 1621 TASK: c54f8000 CPU: 0 COMMAND: \"cupsd\"",
1269
" [280184] PID: 5 TASK: c154c000 CPU: 0 COMMAND: \"kswapd\"",
1270
" [280184] PID: 6 TASK: c7ff6000 CPU: 0 COMMAND: \"kscand\"",
1271
" [280170] PID: 0 TASK: c038e000 CPU: 0 COMMAND: \"swapper\"",
1272
" [280166] PID: 2106 TASK: c0c0c000 CPU: 0 COMMAND: \"sshd\"",
1273
" [280166] PID: 2162 TASK: c03a4000 CPU: 0 COMMAND: \"vmstat\"",
1274
" [280160] PID: 1 TASK: c154a000 CPU: 0 COMMAND: \"init\"",
1275
" [280131] PID: 3 TASK: c11ce000 CPU: 0 COMMAND: \"kapmd\"",
1276
" [280117] PID: 1568 TASK: c5a8c000 CPU: 0 COMMAND: \"smartd\"",
1277
" [280103] PID: 1694 TASK: c4c66000 CPU: 0 COMMAND: \"ntpd\"",
1278
" [280060] PID: 8 TASK: c7ff2000 CPU: 0 COMMAND: \"kupdated\"",
1279
" [279767] PID: 1720 TASK: c4608000 CPU: 0 COMMAND: \"sendmail\"",
1280
" [279060] PID: 13 TASK: c69f4000 CPU: 0 COMMAND: \"kjournald\"",
1281
" [278657] PID: 1523 TASK: c5ad4000 CPU: 0 COMMAND: \"ypbind\"",
1282
" [277712] PID: 2163 TASK: c06e0000 CPU: 0 COMMAND: \"sshd\"",
1283
" [277711] PID: 2244 TASK: c4cdc000 CPU: 0 COMMAND: \"ssh\"",
1284
" [277261] PID: 1391 TASK: c5d8e000 CPU: 0 COMMAND: \"syslogd\"",
1285
" [276837] PID: 1990 TASK: c58d8000 CPU: 0 COMMAND: \"bash\"",
1286
" [276802] PID: 1853 TASK: c3828000 CPU: 0 COMMAND: \"atd\"",
1287
" [276496] PID: 1749 TASK: c4480000 CPU: 0 COMMAND: \"cannaserver\"",
1288
" [274931] PID: 1760 TASK: c43ac000 CPU: 0 COMMAND: \"crond\"",
1289
" [246773] PID: 1844 TASK: c38d8000 CPU: 0 COMMAND: \"xfs\"",
1290
" [125620] PID: 2170 TASK: c48dc000 CPU: 0 COMMAND: \"bash\"",
1291
" [119059] PID: 1033 TASK: c64be000 CPU: 0 COMMAND: \"kjournald\"",
1292
" [110916] PID: 1663 TASK: c528a000 CPU: 0 COMMAND: \"sshd\"",
1293
" [ 86122] PID: 2112 TASK: c0da6000 CPU: 0 COMMAND: \"bash\"",
1294
" [ 13637] PID: 1891 TASK: c67ae000 CPU: 0 COMMAND: \"sshd\"",
1295
" [ 13636] PID: 1894 TASK: c38ec000 CPU: 0 COMMAND: \"bash\"",
1296
" [ 7662] PID: 1885 TASK: c6478000 CPU: 0 COMMAND: \"mingetty\"",
1297
" [ 7662] PID: 1886 TASK: c62da000 CPU: 0 COMMAND: \"mingetty\"",
1298
" [ 7662] PID: 1887 TASK: c5f8c000 CPU: 0 COMMAND: \"mingetty\"",
1299
" [ 7662] PID: 1888 TASK: c5f88000 CPU: 0 COMMAND: \"mingetty\"",
1300
" [ 7662] PID: 1889 TASK: c5f86000 CPU: 0 COMMAND: \"mingetty\"",
1301
" [ 7662] PID: 1890 TASK: c6424000 CPU: 0 COMMAND: \"mingetty\"",
1302
" [ 7661] PID: 4 TASK: c154e000 CPU: 0 COMMAND: \"ksoftirqd/0\"",
1303
" [ 7595] PID: 1872 TASK: c2e7e000 CPU: 0 COMMAND: \"inventory.pl\"",
1304
" [ 6617] PID: 1771 TASK: c435a000 CPU: 0 COMMAND: \"jserver\"",
1305
" [ 6307] PID: 1739 TASK: c48f8000 CPU: 0 COMMAND: \"gpm\"",
1306
" [ 6285] PID: 1729 TASK: c4552000 CPU: 0 COMMAND: \"sendmail\"",
1307
" [ 6009] PID: 1395 TASK: c6344000 CPU: 0 COMMAND: \"klogd\"",
1308
" [ 5820] PID: 1677 TASK: c4d74000 CPU: 0 COMMAND: \"xinetd\"",
1309
" [ 5719] PID: 1422 TASK: c5d04000 CPU: 0 COMMAND: \"portmap\"",
1310
" [ 4633] PID: 1509 TASK: c5ed4000 CPU: 0 COMMAND: \"apmd\"",
1311
" [ 4529] PID: 1520 TASK: c5d98000 CPU: 0 COMMAND: \"ypbind\"",
1312
" [ 4515] PID: 1522 TASK: c5d32000 CPU: 0 COMMAND: \"ypbind\"",
1313
" [ 4373] PID: 1441 TASK: c5d48000 CPU: 0 COMMAND: \"rpc.statd\"",
1314
" [ 4210] PID: 1352 TASK: c5b30000 CPU: 0 COMMAND: \"dhclient\"",
1315
" [ 1184] PID: 71 TASK: c65b6000 CPU: 0 COMMAND: \"khubd\"",
1316
" [ 434] PID: 9 TASK: c11de000 CPU: 0 COMMAND: \"mdrecoveryd\"",
1317
" [ 48] PID: 7 TASK: c7ff4000 CPU: 0 COMMAND: \"bdflush\"",
1335
" [280195] [RU] PID: 2 TASK: c1468000 CPU: 0 COMMAND: \"keventd\"",
1336
" [280195] [IN] PID: 1986 TASK: c5af4000 CPU: 0 COMMAND: \"sshd\"",
1337
" [280195] [IN] PID: 2039 TASK: c58e6000 CPU: 0 COMMAND: \"sshd\"",
1338
" [280195] [RU] PID: 2044 TASK: c5554000 CPU: 0 COMMAND: \"bash\"",
1339
" [280195] [RU] PID: 2289 TASK: c70c0000 CPU: 0 COMMAND: \"s\"",
1340
" [280190] [IN] PID: 1621 TASK: c54f8000 CPU: 0 COMMAND: \"cupsd\"",
1341
" [280184] [IN] PID: 5 TASK: c154c000 CPU: 0 COMMAND: \"kswapd\"",
1342
" [280184] [IN] PID: 6 TASK: c7ff6000 CPU: 0 COMMAND: \"kscand\"",
1343
" [280170] [IN] PID: 0 TASK: c038e000 CPU: 0 COMMAND: \"swapper\"",
1344
" [280166] [IN] PID: 2106 TASK: c0c0c000 CPU: 0 COMMAND: \"sshd\"",
1345
" [280166] [IN] PID: 2162 TASK: c03a4000 CPU: 0 COMMAND: \"vmstat\"",
1346
" [280160] [IN] PID: 1 TASK: c154a000 CPU: 0 COMMAND: \"init\"",
1347
" [280131] [IN] PID: 3 TASK: c11ce000 CPU: 0 COMMAND: \"kapmd\"",
1348
" [280117] [IN] PID: 1568 TASK: c5a8c000 CPU: 0 COMMAND: \"smartd\"",
1349
" [280103] [IN] PID: 1694 TASK: c4c66000 CPU: 0 COMMAND: \"ntpd\"",
1350
" [280060] [IN] PID: 8 TASK: c7ff2000 CPU: 0 COMMAND: \"kupdated\"",
1351
" [279767] [IN] PID: 1720 TASK: c4608000 CPU: 0 COMMAND: \"sendmail\"",
1352
" [279060] [IN] PID: 13 TASK: c69f4000 CPU: 0 COMMAND: \"kjournald\"",
1353
" [278657] [IN] PID: 1523 TASK: c5ad4000 CPU: 0 COMMAND: \"ypbind\"",
1354
" [277712] [IN] PID: 2163 TASK: c06e0000 CPU: 0 COMMAND: \"sshd\"",
1355
" [277711] [IN] PID: 2244 TASK: c4cdc000 CPU: 0 COMMAND: \"ssh\"",
1356
" [277261] [IN] PID: 1391 TASK: c5d8e000 CPU: 0 COMMAND: \"syslogd\"",
1357
" [276837] [IN] PID: 1990 TASK: c58d8000 CPU: 0 COMMAND: \"bash\"",
1358
" [276802] [IN] PID: 1853 TASK: c3828000 CPU: 0 COMMAND: \"atd\"",
1359
" [276496] [IN] PID: 1749 TASK: c4480000 CPU: 0 COMMAND: \"cannaserver\"",
1360
" [274931] [IN] PID: 1760 TASK: c43ac000 CPU: 0 COMMAND: \"crond\"",
1361
" [246773] [IN] PID: 1844 TASK: c38d8000 CPU: 0 COMMAND: \"xfs\"",
1362
" [125620] [IN] PID: 2170 TASK: c48dc000 CPU: 0 COMMAND: \"bash\"",
1363
" [119059] [IN] PID: 1033 TASK: c64be000 CPU: 0 COMMAND: \"kjournald\"",
1364
" [110916] [IN] PID: 1663 TASK: c528a000 CPU: 0 COMMAND: \"sshd\"",
1365
" [ 86122] [IN] PID: 2112 TASK: c0da6000 CPU: 0 COMMAND: \"bash\"",
1366
" [ 13637] [IN] PID: 1891 TASK: c67ae000 CPU: 0 COMMAND: \"sshd\"",
1367
" [ 13636] [IN] PID: 1894 TASK: c38ec000 CPU: 0 COMMAND: \"bash\"",
1368
" [ 7662] [IN] PID: 1885 TASK: c6478000 CPU: 0 COMMAND: \"mingetty\"",
1369
" [ 7662] [IN] PID: 1886 TASK: c62da000 CPU: 0 COMMAND: \"mingetty\"",
1370
" [ 7662] [IN] PID: 1887 TASK: c5f8c000 CPU: 0 COMMAND: \"mingetty\"",
1371
" [ 7662] [IN] PID: 1888 TASK: c5f88000 CPU: 0 COMMAND: \"mingetty\"",
1372
" [ 7662] [IN] PID: 1889 TASK: c5f86000 CPU: 0 COMMAND: \"mingetty\"",
1373
" [ 7662] [IN] PID: 1890 TASK: c6424000 CPU: 0 COMMAND: \"mingetty\"",
1374
" [ 7661] [IN] PID: 4 TASK: c154e000 CPU: 0 COMMAND: \"ksoftirqd/0\"",
1375
" [ 7595] [IN] PID: 1872 TASK: c2e7e000 CPU: 0 COMMAND: \"inventory.pl\"",
1376
" [ 6617] [IN] PID: 1771 TASK: c435a000 CPU: 0 COMMAND: \"jserver\"",
1377
" [ 6307] [IN] PID: 1739 TASK: c48f8000 CPU: 0 COMMAND: \"gpm\"",
1378
" [ 6285] [IN] PID: 1729 TASK: c4552000 CPU: 0 COMMAND: \"sendmail\"",
1379
" [ 6009] [IN] PID: 1395 TASK: c6344000 CPU: 0 COMMAND: \"klogd\"",
1380
" [ 5820] [IN] PID: 1677 TASK: c4d74000 CPU: 0 COMMAND: \"xinetd\"",
1381
" [ 5719] [IN] PID: 1422 TASK: c5d04000 CPU: 0 COMMAND: \"portmap\"",
1382
" [ 4633] [IN] PID: 1509 TASK: c5ed4000 CPU: 0 COMMAND: \"apmd\"",
1383
" [ 4529] [IN] PID: 1520 TASK: c5d98000 CPU: 0 COMMAND: \"ypbind\"",
1384
" [ 4515] [IN] PID: 1522 TASK: c5d32000 CPU: 0 COMMAND: \"ypbind\"",
1385
" [ 4373] [IN] PID: 1441 TASK: c5d48000 CPU: 0 COMMAND: \"rpc.statd\"",
1386
" [ 4210] [IN] PID: 1352 TASK: c5b30000 CPU: 0 COMMAND: \"dhclient\"",
1387
" [ 1184] [IN] PID: 71 TASK: c65b6000 CPU: 0 COMMAND: \"khubd\"",
1388
" [ 434] [IN] PID: 9 TASK: c11de000 CPU: 0 COMMAND: \"mdrecoveryd\"",
1389
" [ 48] [IN] PID: 7 TASK: c7ff4000 CPU: 0 COMMAND: \"bdflush\"",
1319
1391
" Show the kernel stack pointer of each user task:\n",
1755
1836
" DS: 002b ESI: 0804b305 ES: 002b EDI: 08074ed0",
1756
1837
" SS: 002b ESP: bffe9a90 EBP: bffe9ac8",
1757
1838
" CS: 0023 EIP: 4012066e ERR: 00000080 EFLAGS: 00000246",
1840
" Display the symbol name plus its offset in each frame, overriding",
1841
" the current output format with hexadecimal:\n",
1843
" PID: 1499 TASK: ffff88006af43cc0 CPU: 2 COMMAND: \"su\"",
1844
" #0 [ffff8800664a1c90] machine_kexec+0x167 at ffffffff810327b7",
1845
" #1 [ffff8800664a1ce0] crash_kexec+0x60 at ffffffff810a9ec0",
1846
" #2 [ffff8800664a1db0] oops_end+0xb0 at ffffffff81504160",
1847
" #3 [ffff8800664a1dd0] general_protection+0x25 at ffffffff81503435",
1848
" [exception RIP: kmem_cache_alloc+120]",
1849
" RIP: ffffffff8113cf88 RSP: ffff8800664a1e88 RFLAGS: 00010086",
1850
" RAX: 0000000000000000 RBX: ff88006ef56840ff RCX: ffffffff8114e9e4",
1851
" RDX: 0000000000000000 RSI: 00000000000080d0 RDI: ffffffff81796020",
1852
" RBP: ffffffff81796020 R8: ffff88000a3137a0 R9: 0000000000000000",
1853
" R10: ffff88007ac97300 R11: 0000000000000400 R12: 00000000000080d0",
1854
" R13: 0000000000000292 R14: 00000000000080d0 R15: 00000000000000c0",
1855
" ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018",
1856
" #4 [ffff8800664a1ed0] get_empty_filp+0x74 at ffffffff8114e9e4",
1857
" #5 [ffff8800664a1ef0] sock_alloc_fd+0x23 at ffffffff8142f553",
1858
" #6 [ffff8800664a1f10] sock_map_fd+0x23 at ffffffff8142f693",
1859
" #7 [ffff8800664a1f50] sys_socket+0x43 at ffffffff814302a3",
1860
" #8 [ffff8800664a1f80] system_call_fastpath+0x16 at ffffffff81013042",
1861
" RIP: 00007f5720b368e7 RSP: 00007fff52b629a8 RFLAGS: 00010206",
1862
" RAX: 0000000000000029 RBX: ffffffff81013042 RCX: 0000000000000000",
1863
" RDX: 0000000000000009 RSI: 0000000000000003 RDI: 0000000000000010",
1864
" RBP: 000000000066f320 R8: 0000000000000001 R9: 0000000000000000",
1865
" R10: 0000000000000000 R11: 0000000000000202 R12: ffff88007ac97300",
1866
" R13: 0000000000000000 R14: 00007f571e104a80 R15: 00007f571e305048",
1867
" ORIG_RAX: 0000000000000029 CS: 0033 SS: 002b",
2107
2227
" [115] PID: 1779 TASK: ffff88003207a860 COMMAND: \"klogd\"",
2108
2228
" EXPIRED PRIO_ARRAY: ffff880001ce3db8",
2109
2229
" [no tasks queued]",
2231
" Display the tasks on a CFS run queue:\n",
2233
" CPU 0 RUNQUEUE: ffff8800090436c0",
2234
" CURRENT: PID: 588 TASK: ffff88007e4877a0 COMMAND: \"udevd\"",
2235
" RT PRIO_ARRAY: ffff8800090437c8",
2236
" [no tasks queued]",
2237
" CFS RB_ROOT: ffff880009043740",
2238
" [118] PID: 2110 TASK: ffff88007d470860 COMMAND: \"check-cdrom.sh\"",
2239
" [118] PID: 2109 TASK: ffff88007f1247a0 COMMAND: \"check-cdrom.sh\"",
2240
" [118] PID: 2114 TASK: ffff88007f20e080 COMMAND: \"udevd\"",
2242
" CPU 1 RUNQUEUE: ffff88000905b6c0",
2243
" CURRENT: PID: 2113 TASK: ffff88007e8ac140 COMMAND: \"udevd\"",
2244
" RT PRIO_ARRAY: ffff88000905b7c8",
2245
" [no tasks queued]",
2246
" CFS RB_ROOT: ffff88000905b740",
2247
" [118] PID: 2092 TASK: ffff88007d7a4760 COMMAND: \"MAKEDEV\"",
2248
" [118] PID: 1983 TASK: ffff88007e59f140 COMMAND: \"udevd\"",
2249
" [118] PID: 2064 TASK: ffff88007e40f7a0 COMMAND: \"udevd\"",
2250
" [115] PID: 2111 TASK: ffff88007e4278a0 COMMAND: \"kthreadd\"",
2252
" Display run queue timestamp data:\n",
2254
" CPU 0: 2680990637359",
2255
" 2680986653330 PID: 28228 TASK: ffff880037ca2ac0 COMMAND: \"loop\"",
2256
" CPU 1: 2680940618478",
2257
" 2680940618478 PID: 28167 TASK: ffff880078130040 COMMAND: \"bash\"",
2258
" CPU 2: 2680990763425",
2259
" 2680986785772 PID: 28227 TASK: ffff8800787780c0 COMMAND: \"loop\"",
2260
" CPU 3: 2680990954469",
2261
" 2680986059540 PID: 28226 TASK: ffff880078778b00 COMMAND: \"loop\"",
2321
2488
char *help_search[] = {
2323
2490
"search memory",
2324
"[-s start] [ -[kKV] | -u | -p ] [-e end | -l length] [-m mask]\n"
2325
" -[cwh] value ...",
2491
"[-s start] [ -[kKV] | -u | -p | -t ] [-e end | -l length] [-m mask]\n"
2492
" [-x count] -[cwh] [value | (expression) | symbol | string] ...",
2326
2493
" This command searches for a given value within a range of user virtual, kernel",
2327
2494
" virtual, or physical memory space. If no end nor length value is entered, ",
2328
2495
" then the search stops at the end of user virtual, kernel virtual, or physical",
2329
2496
" address space, whichever is appropriate.",
2331
2498
" An optional mask value may be entered to mask off \"don't care\" bits.\n",
2332
" -s start Start the search at this hexadecimal user or kernel virtual ",
2333
" address, physical address, or kernel symbol. The start address",
2334
" must be appropriate for the memory type specified; if no memory",
2335
" type is specified, the default is kernel virtual address space.",
2336
" -k If no start address is specified, start the search at the base",
2337
" of kernel virtual address space. This option is the default.",
2338
" -K Same as -k, except that mapped kernel virtual memory that was",
2339
" allocated by vmalloc(), module memory, or virtual mem_map regions",
2340
" will not be searched.",
2341
" -V Same as -k, except that unity-mapped kernel virtual memory and",
2342
" mapped kernel-text/static-data (x86_64 and ia64) will not be",
2344
" -u If no start address is specified, start the search at the base",
2345
" of the current context's user virtual address space. If a start",
2346
" address is specified, then this option specifies that the start",
2347
" address is a user virtual address.",
2348
" -p If no start address is specified, start the search at the base",
2349
" of physical address space. If a start address is specified, then",
2350
" this option specifies that the start address is a physical address.",
2351
" -e end Stop the search at this hexadecimal user or kernel virtual address,",
2352
" kernel symbol, or physical address. The end address must be",
2353
" appropriate for the memory type specified.",
2354
" -l length Length in bytes of address range to search.",
2355
" -m mask Ignore the bits that are set in the hexadecimal mask value.",
2356
" -c Search for character string values instead of unsigned longs. If",
2357
" the string contains any space(s), it must be encompassed by double",
2359
" -w Search for unsigned hexadecimal ints instead of unsigned longs.",
2360
" This is only meaningful on 64-bit systems in order to search both",
2361
" the upper and lower 32-bits of each 64-bit long for the value.",
2362
" -h Search for unsigned hexadecimal shorts instead of unsigned longs.",
2363
" value Search for this hexadecimal long, unless modified by -c, -w, or -h.",
2499
" -s start Start the search at this hexadecimal user or kernel virtual ",
2500
" address, physical address, or kernel symbol. The start address",
2501
" must be appropriate for the memory type specified; if no memory",
2502
" type is specified, the default is kernel virtual address space.",
2503
" -k If no start address is specified, start the search at the base",
2504
" of kernel virtual address space. This option is the default.",
2505
" -K Same as -k, except that mapped kernel virtual memory that was",
2506
" allocated by vmalloc(), module memory, or virtual mem_map regions",
2507
" will not be searched.",
2508
" -V Same as -k, except that unity-mapped kernel virtual memory and",
2509
" mapped kernel-text/static-data (x86_64 and ia64) will not be",
2511
" -u If no start address is specified, start the search at the base",
2512
" of the current context's user virtual address space. If a start",
2513
" address is specified, then this option specifies that the start",
2514
" address is a user virtual address.",
2515
" -p If no start address is specified, start the search at the base",
2516
" of physical address space. If a start address is specified,",
2517
" then this option specifies that the start address is a physical ",
2519
" -t Search only the kernel stack pages of every task. If one or more",
2520
" matches are found in a task's kernel stack, precede the output",
2521
" with a task-identifying header.",
2522
" -e end Stop the search at this hexadecimal user or kernel virtual",
2523
" address, kernel symbol, or physical address. The end address",
2524
" must be appropriate for the memory type specified.",
2525
" -l length Length in bytes of address range to search.",
2526
" -m mask Ignore the bits that are set in the hexadecimal mask value.",
2527
" -c Search for character string values instead of unsigned longs. If",
2528
" the string contains any space(s), it must be encompassed by double",
2530
" -w Search for unsigned hexadecimal ints instead of unsigned longs.",
2531
" This is only meaningful on 64-bit systems in order to search both",
2532
" the upper and lower 32-bits of each 64-bit long for the value.",
2533
" -h Search for unsigned hexadecimal shorts instead of unsigned longs.",
2534
" -x count Display the memory contents before and after any found value. The",
2535
" before and after memory context will consist of \"count\" memory",
2536
" items of the same size as the \"value\" argument. This option is",
2537
" not applicable with the -c option.",
2538
" value Search for this hexadecimal long, unless modified by the -c, -w, ",
2540
"(expression) Search for the value of this expression; the expression value must",
2541
" not overflow the designated size when -h or -w are used; not",
2542
" applicable when used with the -c option.",
2543
" symbol Search for this symbol value; the symbol value must not overflow",
2544
" the designated size when -h or -w are used; not applicable when ",
2545
" used with the -c option.",
2546
" string Search for character string values; if the string contains any ",
2547
" space(s), it must be encompassed by double quotes; only applicable",
2548
" with the -c option.",
2365
" If -k, -K, -V, -u or -p are not used, then the search defaults to kernel",
2550
" If -k, -K, -V, -u, -p or -t are not used, then the search defaults to kernel",
2366
2551
" virtual address space. The starting address must be long-word aligned. ",
2367
2552
" Address ranges that start in user space and end in kernel space are not",
2448
2633
" ffff8801258be748: Failure to install fence: %%d..<3>[drm:%%s] *ERROR* Failed",
2449
2634
" ffff880125f07ec9: can\'t allocate memory..<3>ACPI: Invalid data..Too many d",
2450
2635
" ffffffff813ddec1: can\'t allocate memory for key lists..<3>%%s %%s: error con",
2636
"\n Search the kernel stacks of all tasks for those that contain the inode",
2637
" address ffff81002c0a3050:\n",
2638
" %s> search -t ffff81002c0a3050",
2639
" PID: 4876 TASK: ffff81003e9f5860 CPU: 7 COMMAND: \"automount\"",
2640
" ffff8100288fbe98: ffff81002c0a3050",
2642
" PID: 4880 TASK: ffff81003ce967a0 CPU: 0 COMMAND: \"automount\"",
2643
" ffff81002c0fbdd8: ffff81002c0a3050",
2644
" ffff81002c0fbe78: ffff81002c0a3050",
2645
"\n When a kernel symbol or an (expression) is used an argument, both the",
2646
" resultant value and the input string are displayed:\n",
2647
" %s> search anon_inode_inode (__down_interruptible+191)",
2648
" ffff81000222a728: ffffffff80493d60 (anon_inode_inode)",
2649
" ffff810005a1e918: ffffffff800649d6 (__down_interruptible+191)",
2650
" ffff810005a1e9d0: ffffffff800649d6 (__down_interruptible+191)",
2651
" ffff810005a1eb48: ffffffff800649d6 (__down_interruptible+191)",
2652
" ffff81000b409c60: ffffffff80493d60 (anon_inode_inode)",
2653
" ffff81000c155b98: ffffffff80493d60 (anon_inode_inode)",
2654
" ffff8100194fac70: ffffffff80493d60 (anon_inode_inode)",
2655
" ffff81001daa1008: ffffffff80493d60 (anon_inode_inode)",
2656
" ffff810028b95830: ffffffff800649d6 (__down_interruptible+191)",
2657
" ffff81002cea0c70: ffffffff80493d60 (anon_inode_inode)",
2658
" ffff810031327268: ffffffff80493d60 (anon_inode_inode)",
2659
" ffff810031327270: ffffffff800649d6 (__down_interruptible+191)",
2660
" ffff810034b1ccd0: ffffffff800649d6 (__down_interruptible+191)",
2661
" ffff8100399565a8: ffffffff80493d60 (anon_inode_inode)",
2662
" ffff81003a278cd0: ffffffff800649d6 (__down_interruptible+191)",
2663
" ffff81003cc23e08: ffffffff800649d6 (__down_interruptible+191)",
2455
2668
char *help_irq[] = {
2458
"[[[index ...] | -u] | -d | -b]",
2671
"[[[index ...] | -u ] | -d | -b | -a | -s [-c cpu]]",
2459
2672
" This command collaborates the data in an irq_desc_t, along with its",
2460
2673
" associated hw_interrupt_type and irqaction structure data, into a",
2461
2674
" consolidated per-IRQ display. For kernel versions 2.6.37 and later",
2462
2675
" the display consists of the irq_desc/irq_data address, its irqaction",
2463
2676
" address(es), and the irqaction name strings. Alternatively, the",
2464
" intel interrupt descriptor table may be dumped, or bottom half data",
2465
" may be displayed. If no index value argument(s) nor any options are",
2466
" entered, the IRQ data for all IRQs will be displayed.\n",
2677
" intel interrupt descriptor table, bottom half data, cpu affinity for",
2678
" in-use irqs, or kernel irq stats may be displayed. If no index value",
2679
" argument(s) nor any options are entered, the IRQ data for all IRQs will",
2467
2681
" index a valid IRQ index.",
2468
" -u dump data for in-use IRQs only.",
2682
" -u dump data for in-use IRQs only.",
2469
2683
" -d dump the intel interrupt descriptor table.",
2470
2684
" -b dump bottom half data.",
2685
" -a dump cpu affinity for in-use IRQs.",
2686
" -s dump the kernel irq stats; if no cpu specified with -c, the",
2687
" irq stats of all cpus will be displayed.",
2688
" -c cpu only usable with the -s option, dump the irq stats of the ",
2689
" specified cpu[s]; cpu can be specified as \"1,3,5\", \"1-3\",",
2690
" or \"1,3,5-7,10\".",
2472
2692
" Display the relevant data for IRQ 18 from a pre-2.6.37 kernel:\n",
2545
2765
" [6] ffffffff81069090 <tasklet_action> ",
2546
2766
" [7] ffffffff81058830 <run_rebalance_domains> ",
2547
2767
" [8] ffffffff81087f00 <run_hrtimer_softirq> ",
2548
" [9] ffffffff810ca7a0 <rcu_process_callbacks> ",
2768
" [9] ffffffff810ca7a0 <rcu_process_callbacks> \n",
2769
" Display the cpu affinity for in-use IRQs:\n",
2771
" IRQ NAME AFFINITY",
2776
" 16 ehci_hcd:usb2,uhci_hcd:usb3,uhci_hcd:usb6 0,6,18",
2777
" 17 uhci_hcd:usb4,uhci_hcd:usb7 0-23",
2778
" 18 ehci_hcd:usb1,uhci_hcd:usb5,uhci_hcd:usb8,ioc0 0,11,23",
2784
" 39 megasas 0-5,12-17",
2785
" 40 lpfc:sp 0-5,12-17",
2786
" 41 lpfc:fp 0,6-11,18-23",
2787
" 42 lpfc:sp 0,6-11,18-23",
2788
" 43 lpfc:fp 0,6-11,18-23",
2790
" 80 ioat-msix 0-23",
2791
" 81 ioat-msix 0-23",
2792
" 82 ioat-msix 0-23",
2793
" 83 ioat-msix 0-23",
2794
" 84 ioat-msix 0-23",
2795
" 85 ioat-msix 0-23",
2796
" 86 ioat-msix 0-23",
2797
" 87 ioat-msix 0-23",
2799
" Display the kernel irq stats:\n",
2800
" %s>irq -c 0,2 -s",
2802
" 0: 2068161471 0 IR-IO-APIC-edge timer",
2803
" 1: 9 0 IR-IO-APIC-edge i8042",
2804
" 8: 1 0 IR-IO-APIC-edge rtc0",
2805
" 9: 0 0 IR-IO-APIC-fasteoi acpi",
2806
" 16: 36 0 IR-IO-APIC-fasteoi ehci_hcd:usb2",
2808
" 85: 3 0 IR-PCI-MSI-edge ioat-msix",
2809
" 86: 3 0 IR-PCI-MSI-edge ioat-msix",
2810
" 87: 3 0 IR-PCI-MSI-edge ioat-msix",
2811
" 88: 24 295 IR-PCI-MSI-edge eth4",
2816
char *help_ipcs[] = {
2818
"System V IPC facilities",
2819
"[-smMq] [-n pid|task] [id | addr]",
2821
" This command provides information on the System V IPC facilities. With no",
2822
" arguments, the command will display kernel usage of all three factilities.",
2824
" -s show semaphore arrays.",
2825
" -m show shared memory segments.",
2826
" -M show shared memory segments with additional details.",
2827
" -q show message queues.",
2828
" id show the data associated with this resource ID.",
2829
" addr show the data associated with this virtual address of a",
2830
" shmid_kernel, sem_array or msq_queue.",
2832
" For kernels supporting namespaces, the -n option may be used to",
2833
" display the IPC facilities with respect to the namespace of a",
2834
" specified task:\n",
2835
" -n pid a process PID.",
2836
" -n task a hexadecimal task_struct pointer.",
2838
" Display all IPC facilities:\n",
2840
" SHMID_KERNEL KEY SHMID UID PERMS BYTES NATTCH STATUS",
2841
" ffff880473a28310 00000000 0 0 666 90000 1 ",
2842
" ffff880473a28490 00000001 32769 0 666 90000 1 ",
2843
" ffff880473a28250 00000002 65538 0 666 90000 1 ",
2845
" SEM_ARRAY KEY SEMID UID PERMS NSEMS ",
2846
" ffff88047200f9d0 00000000 0 0 600 1 ",
2847
" ffff88046f826910 00000000 32769 0 600 1 ",
2849
" MSG_QUEUE KEY MSQID UID PERMS USED-BYTES MESSAGES",
2850
" ffff8100036bb8d0 000079d7 0 3369 666 16640 104",
2851
" ffff8100036bb3d0 000079d8 32769 3369 666 12960 81",
2852
" ffff810026d751d0 000079d9 65538 3369 666 10880 68",
2854
" Display shared memory usage with detailed information:\n",
2856
" SHMID_KERNEL KEY SHMID UID PERMS BYTES NATTCH STATUS",
2857
" ffff880473a28310 00000000 0 0 666 90000 1 ",
2858
" PAGES ALLOCATED/RESIDENT/SWAPPED: 22/1/0",
2859
" INODE: ffff88047239cd98",
2861
" SHMID_KERNEL KEY SHMID UID PERMS BYTES NATTCH STATUS",
2862
" ffff880473a28490 00000001 32769 0 666 90000 1 ",
2863
" PAGES ALLOCATED/RESIDENT/SWAPPED: 22/1/0",
2864
" INODE: ffff88047239c118",
2866
" SHMID_KERNEL KEY SHMID UID PERMS BYTES NATTCH STATUS",
2867
" ffff880473a28250 00000002 65538 0 666 90000 1 ",
2868
" PAGES ALLOCATED/RESIDENT/SWAPPED: 22/1/0",
2869
" INODE: ffff880470503758",
2871
" Display the shared memory data associated with shmid_kernel ffff880473a28250:\n",
2872
" %s> ipcs -M ffff880473a28250",
2873
" SHMID_KERNEL KEY SHMID UID PERMS BYTES NATTCH STATUS",
2874
" ffff880473a28250 00000002 65538 0 666 90000 1 ",
2875
" PAGES ALLOCATED/RESIDENT/SWAPPED: 22/1/0",
2876
" INODE: ffff880470503758",
2553
2880
char *help_cpu[] = {
2555
2882
"set context to the active task on a cpu",
2706
3045
" <6>Installing knfsd (copyright (C) 1996 okir@monad.swb.de).",
2707
3046
" <7>nfsd_init: initialized fhcache, entries=256",
3049
" On a system with the variable-length record format, and whose log_buf has been",
3050
" filled and wrapped around, display the log with timestamp data:\n",
3052
" [ 0.467730] pci 0000:ff:02.0: [8086:2c10] type 00 class 0x060000",
3053
" [ 0.467749] pci 0000:ff:02.1: [8086:2c11] type 00 class 0x060000",
3054
" [ 0.467769] pci 0000:ff:02.4: [8086:2c14] type 00 class 0x060000",
3055
" [ 0.467788] pci 0000:ff:02.5: [8086:2c15] type 00 class 0x060000",
3056
" [ 0.467809] pci 0000:ff:03.0: [8086:2c18] type 00 class 0x060000",
3057
" [ 0.467828] pci 0000:ff:03.1: [8086:2c19] type 00 class 0x060000",
3060
" Display the same message text as above, without the timestamp data:\n",
3062
" pci 0000:ff:02.0: [8086:2c10] type 00 class 0x060000",
3063
" pci 0000:ff:02.1: [8086:2c11] type 00 class 0x060000",
3064
" pci 0000:ff:02.4: [8086:2c14] type 00 class 0x060000",
3065
" pci 0000:ff:02.5: [8086:2c15] type 00 class 0x060000",
3066
" pci 0000:ff:03.0: [8086:2c18] type 00 class 0x060000",
3067
" pci 0000:ff:03.1: [8086:2c19] type 00 class 0x060000",
3070
" Display the same message text as above, with appended dictionary data:\n",
3072
" pci 0000:ff:02.0: [8086:2c10] type 00 class 0x060000",
3074
" DEVICE=+pci:0000:ff:02.0",
3075
" pci 0000:ff:02.1: [8086:2c11] type 00 class 0x060000",
3077
" DEVICE=+pci:0000:ff:02.1",
3078
" pci 0000:ff:02.4: [8086:2c14] type 00 class 0x060000",
3080
" DEVICE=+pci:0000:ff:02.4",
3081
" pci 0000:ff:02.5: [8086:2c15] type 00 class 0x060000",
3083
" DEVICE=+pci:0000:ff:02.5",
3084
" pci 0000:ff:03.0: [8086:2c18] type 00 class 0x060000",
3086
" DEVICE=+pci:0000:ff:03.0",
3087
" pci 0000:ff:03.1: [8086:2c19] type 00 class 0x060000",
3089
" DEVICE=+pci:0000:ff:03.1",
3613
4032
" [52] long unsigned int vm_pte;",
3616
" Display the pgd member of the mm_struct at address c2857bd0:\n",
3617
" %s> struct mm_struct.pgd c2857bd0",
3618
" pgd = 0xc168c000,\n",
3619
4035
" Display the definition and offset of the pgd member of an mm_struct:\n",
3620
4036
" %s> struct mm_struct.pgd",
3621
4037
" struct mm_struct {",
3622
" [12] pgd_t *pgd;",
4038
" [80] pgd_t *pgd;",
4040
" Display the pgd member of the mm_struct at address ffff810022e7d080:\n",
4041
" %s> struct mm_struct.pgd ffff810022e7d080",
4042
" pgd = 0xffff81000e3ac000\n",
4043
" Display the pgd_t pointed to by the mm_struct.pgd pointer above, forcing",
4044
" the output to be expressed in hexadecimal:\n",
4045
" %s> mm_struct.pgd ffff810022e7d080 -px",
4046
" pgd_t *pgd = 0xffff81000e3ac000",
4048
" pgd = 0x2c0a6067",
4050
" Display the thread_info structure pointed to by the thread_info",
4051
" member of the task_struct at ffff8100181190c0:\n",
4052
" %s> task_struct.thread_info ffff8100181190c0 -p",
4053
" struct thread_info *thread_info = 0xffff810023c06000",
4055
" task = 0xffff8100181190c0,",
4056
" exec_domain = 0xffffffff802f78e0,",
4060
" preempt_count = 0,",
4062
" seg = 18446604435732824064",
4064
" restart_block = {",
4065
" fn = 0xffffffff80095a52 <do_no_restart_syscall>,",
3624
4072
" Display the flags and virtual members of 4 contigous page structures",
3625
4073
" in the mem_map page structure array:\n",
3626
4074
" %s> page.flags,virtual c101196c 4",
3884
4359
" appended, a search will be made for an object file",
3885
4360
" consisting of the module name with a .o or .ko suffix,",
3886
4361
" starting at the /lib/modules/<release> directory on",
3887
" the host system. If an objfile argument is appended,",
3888
" then that file will be used.",
4362
" the host system, or if not found there, starting at the",
4363
" directory containing the kernel namelist file. If an",
4364
" objfile argument is appended, then that file will be",
3889
4366
" -d module Deletes the symbolic and debugging data of the module",
3891
4368
" -S [directory] Load symbolic and debugging data from the object file",
3892
4369
" for all loaded modules. For each module, a search",
3893
4370
" will be made for an object file consisting of the",
3894
" module name with a .o or.ko suffix, starting at the",
3895
" /lib/modules/<release> directory of the host system.",
3896
" If a directory argument is appended, then the search",
3897
" will be restricted to that directory.",
4371
" module name with a .o or .ko suffix, starting at the",
4372
" /lib/modules/<release> directory of the host system,",
4373
" or if not found there, starting at the directory",
4374
" containing the kernel namelist file. If a directory",
4375
" argument is appended, then the search will be restricted",
4376
" to that directory.",
3898
4377
" -D Deletes the symbolic and debugging data of all modules.",
3899
" -r Reinitialize module data. All currently-loaded symbolic",
4378
" -r Passes the -readnow flag to the embedded gdb module,",
4379
" which will override the two-stage strategy that it uses",
4380
" for reading symbol tables from module object files.",
4381
" -R Reinitialize module data. All currently-loaded symbolic",
3900
4382
" and debugging data will be deleted, and the installed",
3901
4383
" module list will be updated (live system only).",
4384
" -g When used with -s or -S, add a module object's section",
4385
" start and end addresses to its symbol list.",
3902
4386
" -o Load module symbols with old mechanism.",
4388
" If the %s session was invoked with the \"--mod <directory>\" option, or",
4389
" a CRASH_MODULE_PATH environment variable exists, then /lib/modules/<release>",
4390
" will be overridden as the default directory tree that is searched for module",
3904
4393
" After symbolic and debugging data have been loaded, backtraces and text",
3905
4394
" disassembly will be displayed appropriately. Depending upon the processor",
3906
4395
" architecture, data may also printed symbolically with the \"p\" command;",
4019
4508
char *help__list[] = {
4022
"[[-o] offset] [-e end] [-s struct[.member[,member]]] [-H] start",
4511
"[[-o] offset] [-e end] [-s struct[.member[,member]] -[xd]] [-h|-H] start",
4023
4512
" This command dumps the contents of a linked list. The entries in a linked",
4024
4513
" list are typically data structures that are tied together in one of two",
4027
4516
" 1. A starting address points to a data structure; that structure contains",
4028
" a member that is a pointer to the next structure, and so on. The list",
4029
" typically ends when a \"next\" pointer value contains one of the",
4031
" a. a NULL pointer.",
4032
" b. a pointer to the start address.",
4033
" c. a pointer to the first item pointed to by the start address.",
4034
" d. a pointer to its containing structure.",
4517
" a member that is a pointer to the next structure, and so on. This type",
4518
" of a singly-linked list typically ends when a \"next\" pointer value ",
4519
" contains one of the following:",
4521
" (a) a NULL pointer.",
4522
" (b) a pointer to the start address.",
4523
" (c) a pointer to the first item pointed to by the start address.",
4524
" (d) a pointer to its containing structure.",
4036
" 2. Most Linux lists are linked via embedded list_head structures contained ",
4037
" within the data structures in the list. The linked list is headed by an",
4038
" external LIST_HEAD, which is simply a list_head structure initialized to",
4039
" point to itself, signifying that the list is empty:",
4526
" 2. Most Linux lists of data structures are doubly-linked using \"list_head\"",
4527
" structures that are embedded members of the data structures in the list:",
4041
4529
" struct list_head {",
4042
4530
" struct list_head *next, *prev;",
4045
" #define LIST_HEAD_INIT(name) { &(name), &(name) }"
4533
" The linked list is typically headed by an external, standalone list_head,",
4534
" which is simply initialized to point to itself, signifying that the list",
4537
" #define LIST_HEAD_INIT(name) { &(name), &(name) } ",
4047
4538
" #define LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name)",
4049
" In the case of list_head-type lists, the \"next\" pointer is the address",
4050
" of the embedded list_head structure in the next structure, and not the",
4051
" address of the structure itself. The list typically ends when the",
4052
" list_head's next pointer points back to the LIST_HEAD address.",
4540
" In the case of list_head-linked lists, the \"list_head.next\" pointer is",
4541
" the address of a list_head structure that is embedded in the next data",
4542
" structure in the list, and not the address of the next data structure ",
4543
" itself. The starting point of the list may be:",
4545
" (a) an external, standalone, LIST_HEAD().",
4546
" (b) a list_head that is embedded within a data structure of the same",
4547
" type as the whole linked list.",
4548
" (c) a list_head that is embedded within a data structure that is",
4549
" different than the type of structures in the the linked list.",
4551
" The list typically ends when the embedded \"list_head.next\" pointer of",
4552
" a data structure in the linked list points back to the LIST_HEAD()",
4553
" address. However, some list_head-linked lists have no defined starting",
4554
" point, but just link back onto themselves in a circular manner.",
4054
4556
" This command can handle both types of linked list; in both cases the list",
4055
4557
" of addresses that are dumped are the addresses of the data structures",
4056
4558
" themselves.",
4058
" The arguments are as follows:\n",
4560
" The arguments are as follows:",
4059
4562
" [-o] offset The offset within the structure to the \"next\" pointer",
4060
4563
" (default is 0). If non-zero, the offset may be entered",
4061
" in either of two manners:\n",
4062
" 1. In \"structure.member\" format; the \"-o\" is not necessary.",
4564
" in either of two manners:",
4566
" 1. In \"structure.member\" format; the \"-o\" is not necessary.",
4063
4567
" 2. A number of bytes; the \"-o\" is only necessary on processors",
4064
4568
" where the offset value could be misconstrued as a kernel",
4065
" virtual address.\n",
4569
" virtual address.",
4066
4571
" -e end If the list ends in a manner unlike the typical manners that",
4067
4572
" are described above, an explicit ending address value may be",
4069
4574
" -s struct For each address in list, format and print as this type of",
4070
" structure; use the \"struct.member\" format in order to display",
4575
" structure; use the \"struct.member\" format in order to display",
4071
4576
" a particular member of the structure. To display multiple",
4072
4577
" members of a structure, use a comma-separated list of members.",
4074
" The meaning of the \"start\" argument, which can be expressed either",
4075
" symbolically or in hexadecimal format, depends upon whether the -H option",
4076
" is pre-pended or not:",
4078
" start The address of the first structure in the list.",
4079
" -H start The address of the list_head structure, typically expressed",
4080
" symbolically, but also can be an expression evaluating to the",
4081
" address of the starting list_head structure.",
4578
" -x Override the default output format with hexadecimal format.",
4579
" -d Override the default output format with decimal format.",
4581
" The meaning of the \"start\" argument, which can be expressed symbolically,",
4582
" in hexadecimal format, or an expression evaluating to an address, depends",
4583
" upon whether the -h or -H option is pre-pended:",
4585
" start The address of the first data structure in the list.",
4586
" -H start The address of a list_head structure, typically that of an",
4587
" external, standalone LIST_HEAD(). The list typically ends ",
4588
" when the embedded \"list_head.next\" of a data structure in ",
4589
" the linked list points back to this \"start\" address.",
4590
" -h start The address of a data structure which contains an embedded",
4591
" list_head. The list typically ends when the embedded",
4592
" \"list_head.next\" of a data structure in the linked list ",
4593
" points back to the embedded list_head contained in the data",
4594
" structure whose address is this \"start\" argument.",
4597
" When the \"-h start\" option is used, it is possible that the list_head-linked",
4600
" 1. pass through an external standalone LIST_HEAD(), or",
4601
" 2. pass through a list_head that is the actual starting list_head, but is",
4602
" contained within a data structure that is not the same type as all of",
4603
" the other data structures in the list.",
4605
" When that occurs, the data structure address displayed for that list_head",
4606
" will be incorrect, because the \"-h start\" option presumes that all",
4607
" list_head structures in the list are contained within the same type of",
4608
" data structure. Furthermore, if the \"-s struct[.member[,member]\" option",
4609
" is used, it will display bogus data for that particular list_head.",
4083
4611
" Note that each task_struct is linked to its parent's task_struct via the",
4084
4612
" p_pptr member:",
4242
4770
" struct vfsmount {",
4773
" The task_struct of every task in the system is linked into a circular list",
4774
" by its embedded \"tasks\" list_head. Show the task_struct addresses and the",
4775
" pids of all tasks in the system using \"-h\" option, starting with the ",
4776
" task_struct at ffff88012b98e040:\n",
4777
" %s> list task_struct.tasks -s task_struct.pid -h ffff88012b98e040",
4778
" ffff88012b98e040",
4780
" ffff8801277be0c0",
4782
" ffffffff81a2d020",
4784
" ffff88012d7dd4c0",
4786
" ffff88012d7dca80",
4788
" ffff88012d7dc040",
4790
" ffff88012d7e9500",
4793
" ffff88012961a100",
4795
" ffff880129017580",
4797
" ffff8801269ed540",
4799
" ffff880128256080",
4801
" ffff88012b8f4100",
4806
char *help_tree[] = {
4808
"display radix tree or red-black tree",
4809
"-t [radix|rbtree] [-r offset] [-s struct[.member[,member]] -[x|d]]\n [-o offset] [-p] [-N] start",
4810
" This command dumps the contents of a radix tree or a red-black tree.",
4811
" The arguments are as follows:\n",
4812
" -t type The type of tree to dump; the type string can be either ",
4813
" \"radix\" or \"rbtree\", although only the first two characters",
4815
" -r offset If the \"start\" argument is the address of a data structure that",
4816
" contains the radix_tree_root or rb_root structure, then this is",
4817
" the offset to that structure member. If the offset is non-zero,",
4818
" then this option is required. The offset may be entered in either",
4820
" 1. In \"structure.member\" format.",
4821
" 2. A number of bytes.",
4822
" -o offset For red-black trees only, the offset of the rb_node within its ",
4823
" containing data structure; if the offset is non-zero, then this",
4824
" option is required. The offset may be entered in either of two",
4826
" 1. In \"structure.member\" format.",
4827
" 2. A number of bytes.",
4828
" This option is not applicable to radix trees.",
4829
" -s struct For each entry in a tree, format and print it as this type of data",
4830
" structure; use the \"struct.member\" format in order to display a",
4831
" particular member of the structure. To display multiple members",
4832
" of a structure, use a comma-separated list of members.",
4833
" -x Override default output format with hexadecimal format.",
4834
" -d Override default output format with decimal format.",
4835
" -p Display the node's position information, showing the relationship",
4836
" between it and the root. For red-black trees, a position that",
4837
" indicates \"root/l/r\" means that the node is the right child",
4838
" of the left child of the root node. For radix trees, the height",
4839
" and slot index values are shown with respect to the root.",
4841
" The meaning of the \"start\" argument, which can be expressed either in",
4842
" hexadecimal format or symbolically, depends upon whether the -N option",
4845
" start The address of a radix_tree_root or rb_root structure, or the",
4846
" address of a structure containing the radix_tree_root or rb_root",
4847
" structure; if the latter, then the \"-r offset\" option must be",
4848
" used if the member offset of the root structure is non-zero.",
4850
" -N start The address of the structure radix_tree_node or rb_node, bypassing",
4851
" the radix_tree_root or rb_root that points to it.",
4854
" The vmap_area_root is a standalone rb_root structure. Display the ",
4855
" virtual addresses of each vmap_area in its red-black tree:\n",
4856
" %s> whatis vmap_area_root",
4857
" struct rb_root vmap_area_root;",
4858
" %s> tree -t rbtree -o vmap_area.rb_node vmap_area_root",
4859
" ffff880128c508c0",
4860
" ffff88012cb68140",
4861
" ffff88012c9afec0",
4862
" ffff88012d65c440",
4865
" Display the vmap_area's va_start and va_end members of each of",
4866
" the entries above expressing the vmap_area.rb_node offset as a",
4867
" number of bytes:\n",
4868
" %s> tree -t rbtree -o 24 vmap_area_root -s vmap_area.va_start,va_end",
4869
" ffff880128c508c0",
4870
" va_start = 0xffffc90014900000",
4871
" va_end = 0xffffc90014921000",
4872
" ffff88012cb68140",
4873
" va_start = 0xffffc900110c0000",
4874
" va_end = 0xffffc900110d1000",
4875
" ffff88012c9afec0",
4876
" va_start = 0xffffc90000640000",
4877
" va_end = 0xffffc90000642000",
4878
" ffff88012d65c440",
4879
" va_start = 0xffffc90000620000",
4880
" va_end = 0xffffc90000622000",
4883
" Alternatively, use the -N option with the rb_node address contained",
4884
" in the vmap_area_root structure:\n",
4885
" %s> p vmap_area_root",
4886
" vmap_area_root = $8 = {",
4887
" rb_node = 0xffff880128c508d8",
4889
" %s> tree -t rbtree -o vmap_area.rb_node -N 0xffff880128c508d8",
4890
" ffff880128c508c0",
4891
" ffff88012cb68140",
4892
" ffff88012c9afec0",
4893
" ffff88012d65c440",
4895
" Display the virtual address of each vm_area_struct in the red-black",
4896
" tree that has its root inside an mm_struct located at ffff880128b5a300.",
4897
" The vm_area_struct.vm_rb rb_node member has an offset of 0x38 bytes:\n",
4898
" %s> tree -t rbtree -r mm_struct.mm_rb ffff880128b5a300 -o 0x38",
4899
" ffff88012a0de080",
4900
" ffff880123e3ac78",
4901
" ffff880123e3a700",
4902
" ffff88012b2837c8",
4904
" ffff880128c02ed0",
4905
" ffff8801292e7958",
4906
" ffff880123e3a318",
4907
" ffff880123e3ad40",
4909
" Add the -p option to the command above to show postion information:\n",
4910
" %s> tree -t rbtree -r mm_struct.mm_rb ffff880128b5a300 -o 0x38 -p",
4911
" ffff88012a0de080",
4913
" ffff880123e3ac78",
4914
" position: root/l",
4915
" ffff880123e3a700",
4916
" position: root/l/l",
4917
" ffff88012b2837c8",
4918
" position: root/l/l/l",
4920
" ffff880128c02ed0",
4921
" position: root/r/r/l/r",
4922
" ffff8801292e7958",
4923
" position: root/r/r/l/r/r",
4924
" ffff880123e3a318",
4925
" position: root/r/r/r",
4926
" ffff880123e3ad40",
4927
" position: root/r/r/r/r",
4929
" Display a list of the page structs in the radix tree of an address_space",
4930
" structure located at ffff88012d364de0:\n",
4931
" %s> tree -t radix -r address_space.page_tree ffff88012d364de0",
4932
" ffffea00040d12c0",
4933
" ffffea00040d9a60",
4934
" ffffea00040d9b08",
4935
" ffffea000407eda8",
4936
" ffffea0004084288",
4938
" ffffea000407bc70",
4939
" ffffea00040baf48",
4940
" ffffea0004043f48",
4941
" ffffea000407de58",
4943
" Add the -p option to the command above to show postion information:\n",
4944
" %s> tree -t radix -r address_space.page_tree ffff88012d364de0 -p",
4945
" ffffea00040d12c0",
4946
" position: root/0/0",
4947
" ffffea00040d9a60",
4948
" position: root/0/1",
4949
" ffffea00040d9b08",
4950
" position: root/0/2",
4951
" ffffea000407eda8",
4952
" position: root/0/3",
4953
" ffffea0004084288",
4954
" position: root/0/4",
4956
" ffffea000407bc70",
4957
" position: root/3/25",
4958
" ffffea00040baf48",
4959
" position: root/3/26",
4960
" ffffea0004043f48",
4961
" position: root/3/27",
4962
" ffffea000407de58",
4963
" position: root/3/28",
4965
" Alternatively, take the address of the radix_tree_node from the",
4966
" radix_tree_root structure in the address_space structure above,",
4967
" and display the tree with the -N option:\n",
4968
" %s> struct address_space.page_tree ffff88012d364de0",
4971
" gfp_mask = 0x20, ",
4972
" rnode = 0xffff8801238add71",
4974
" %s> tree -t radix -N 0xffff8801238add71",
4975
" ffffea00040d12c0",
4976
" ffffea00040d9a60",
4977
" ffffea00040d9b08",
4978
" ffffea000407eda8",
4979
" ffffea0004084288",
4980
" ffffea00040843a0",
4983
" Using the same radix tree as above, display the flags and _count",
4984
" members of each page struct in the list, and force the output format",
4985
" to be hexadecimal:\n",
4986
" %s> tree -t radix -N 0xffff8801238add71 -s page.flags,_count -x",
4987
" ffffea00040d12c0",
4988
" flags = 0x4000000002006c",
4992
" ffffea00040d9a60",
4993
" flags = 0x4000000002006c",
4997
" ffffea00040d9b08",
4998
" flags = 0x4000000002006c",
5002
" ffffea000407eda8",
5003
" flags = 0x4000000002006c",
4248
5011
char *help_ptob[] = {
5545
6328
"the CTRL-p and CTRL-n keys instead of the up- and down-arrow keys; in vi mode",
5546
6329
"you can enter <ESC>, then \"k\" to cycle back, or \"j\" to cycle forward.",
5548
"Lastly, a set of %s commands may be entered into a regular file that can",
5549
"used as input, again using standard command line syntax:\n",
6331
"A set of %s commands may be entered into a regular file that can be used as",
6332
"input, using standard command line syntax:\n",
5550
6333
" %s> < inputfile\n",
5551
6334
"An input file may be also be run from the %s command line using the -i ",
5553
6336
" $ %s -i inputfile",
6338
"Alternatively, an input file containing command arguments may be created.",
6339
"The arguments in the input file will be passed to the command specified,",
6340
"which will be executed repetetively for each line of arguments in the file:",
6342
" %s> ps -p < inputfile",
5555
6344
"Lastly, if a command is entered that is not recognized, it is checked against",
5556
6345
"the kernel's list of variables, structure, union or typedef names, and if ",
5557
6346
"found, the command is passed to p, struct, union or whatis. That being the ",
5558
6347
"case, as long as a kernel variable/structure/union name is different than any",
5559
6348
"of the current commands, the appropriate command above will be executed. If",
5560
6349
"not, the command will be passed on to the built-in gdb command for execution.",
6350
"If an input line starts with \"#\" or \"//\", then the line will be saved",
6351
"as a comment that is visible when re-cycling through the history list.",