Файлы System/bin Android 12. Справочник.


  Все     Команда     Скрипт     Служба     Приложение  

librank
Показать процессы

Тип файла: команда
  Рус  
usage:  librank [ -P | -L ] [ -v | -r | -p | -u | -s | -h ]


Sort options:

  • -v Sort processes by VSS.

  • -r Sort processes by RSS.

  • -p Sort processes by PSS.

  • -u Sort processes by USS.

  • -s Sort processes by swap. (Default sort order is PSS.)

  • -a Show all mappings, including stack, heap and anon.

  • -P /path Limit libraries displayed to those in path.

  • -R Reverse sort order (default is descending).

  • -m [r][w][x] Only list pages that exactly match permissions

  • -c Only show cached (storage backed) pages

  • -C Only show non-cached (ram/swap backed) pages

  • -k Only show pages collapsed by KSM

  • -f [raw][json][csv] Print output in the specified format. (Default format is raw text.)

  • -h Display this help screen.
  •    

    Комментарии
    https://android.googlesource.com/platform/system/extras/+/android-6.0.1_r62/librank/librank.c

    switch (c) {
    case 'a':
    all = true;
    break;
    case 'c':
    required_flags = 0;
    flags_mask = PM_PAGE_SWAPBACKED;
    break;
    case 'C':
    required_flags = PM_PAGE_SWAPBACKED;
    flags_mask = PM_PAGE_SWAPBACKED;
    break;
    case 'k':
    required_flags = PM_PAGE_KSM;
    flags_mask = PM_PAGE_KSM;
    break;
    case 'h':
    usage(argv[0]);
    exit(EXIT_SUCCESS);
    case 'm':
    perm = parse_perm(optarg);
    break;
    case 'p':
    compfn = &sort_by_pss;
    break;
    case 'P':
    prefix = optarg;
    prefix_len = strlen(prefix);
    break;
    case 'u':
    compfn = &sort_by_uss;
    break;
    case 'v':
    compfn = &sort_by_vss;
    break;
    case 'r':
    compfn = &sort_by_rss;
    break;
    case 's':
    compfn = &sort_by_swap;
    break;
    case 'R':
    order *= -1;
    break;
    case '?':
    fprintf(stderr, "Invalid argument \"%s\".\n", argv[optind - 1]);
    usage(argv[0]);
    exit(EXIT_FAILURE);
    default:
    abort();