PROPHET/OS

NAME

state: shows the info page the kernel keeps for programs

SYNOPSIS

state

DESCRIPTION

Shows the info page the kernel keeps for programs.

The page is mapped read-only into every address space, so reading it costs a memory access and no system call. It is read over a counter: odd means the kernel is writing. Whoever sees the same even value before and after has seen a state that really stood there, instead of half of an old one and half of a new one.

EXAMPLE

$ state
  info page, version 1, 672 bytes, 16507 ticks old

  Runtime       166120 ms
  CPU clock      2611 MHz
  Cores          8 of 8
  Modules        90 of 96
  Threads        35
  Processes      14
  Memory         15.9 GiB free of 18.0 GiB
  Heap           3.2 MiB open in 3.7 MiB
  Stacks         540 KiB
  Switches       256803
  Slices         256803 in total, 128399 idle
  Programs       208 started, 72367 calls, 0 refused

  Core  APIC        Ticks
     0     0   2231428788
     1     1   2258249146
     2     2   2260729800
     3     3   2263388792
     4     4   2265963540
     5     5   2268694420
     6     6   2271236274
     7     7   2273699788

  Module            Loaded at           Bytes
  can               0xFFFFFFFFD0034000  32768
  net               0xFFFFFFFFD021A000  204800
  netd              0xFFFFFFFFD021A000  204800
  queue             0xFFFFFFFFD021A000  204800
  audio             0xFFFFFFFFD0162000  364544
  bochs             0xFFFFFFFFD00E0000  12288
  buses             0xFFFFFFFFD0432000  24576
  fat32             0xFFFFFFFFD034E000  20480
  floating          0xFFFFFFFFD0060000  184320
  integer           0xFFFFFFFFD02F7000  212992
  intel             0xFFFFFFFFD0137000  49152
  intel_gbe         0xFFFFFFFFD02E5000  20480
  lux               0xFFFFFFFFD03E4000  32768
  bigbinary         0xFFFFFFFFD05DF000  1236992
  fraction          0xFFFFFFFFD05DF000  1236992
  rational          0xFFFFFFFFD05DF000  1236992
  algebra           0xFFFFFFFFD05DF000  1236992
  polynomial        0xFFFFFFFFD05DF000  1236992
  analysis          0xFFFFFFFFD05DF000  1236992
  complex128        0xFFFFFFFFD05DF000  1236992
  signal            0xFFFFFFFFD05DF000  1236992
  choose            0xFFFFFFFFD05DF000  1236992
  decimal           0xFFFFFFFFD05DF000  1236992
  binary128         0xFFFFFFFFD05DF000  1236992
  matrix            0xFFFFFFFFD05DF000  1236992
  fixed             0xFFFFFFFFD05DF000  1236992
  statistics        0xFFFFFFFFD05DF000  1236992
  calculus          0xFFFFFFFFD05DF000  1236992
  geometry          0xFFFFFFFFD05DF000  1236992
  optimization      0xFFFFFFFFD05DF000  1236992
  bignum            0xFFFFFFFFD05DF000  1236992
  probability       0xFFFFFFFFD05DF000  1236992
  modctl            0xFFFFFFFFD0543000  4096
  matrix_nvidia     0xFFFFFFFFD04A0000  495616
  fletcher4_nvidia  0xFFFFFFFFD04A0000  495616
  nvidia            0xFFFFFFFFD04A0000  495616
  pool              0xFFFFFFFFD00C9000  16384
  regions           0xFFFFFFFFD02B7000  24576
  rv64i             0xFFFFFFFFD07D7000  45056
  state             0xFFFFFFFFD09D3000  20480
  store             0xFFFFFFFFD03E2000  4096
  tpm               0xFFFFFFFFD0947000  32768
  tty               0xFFFFFFFFD03D1000  45056
  virtio            0xFFFFFFFFD02A6000  36864
  hda               0xFFFFFFFFD0B61000  12288
  uac               0xFFFFFFFFD0B3F000  49152
  dx3               0xFFFFFFFFD002F000  12288
  complex           0xFFFFFFFFD08C5000  36864

  Screen
  surface       gfx.bochs
  width         1280
  height        720
  bpp           32
  stride        5120 bytes
  format        BGR
  cards         1
  card          gpu.bochs
  outputs       1
  mode_change   yes
  fb_phys       4244635648
  owner         QEMU
  owner_bar     0

  Locks  87 listed, 87 name their holder, the rest show a ?, 89 stand alone in the tree
  Lock                Held by         Taken      Waited    Wait
  rohr                -                 287          11    3.8%
  pcid                -               89375           7    0.0%
  console-wake        -               17483           1    0.0%
  keys                -               12290          68    0.5%
  tty                 -               30340        1333    4.3%
  pfs-zugriff         -               42942          15    0.0%
  ahci                -              358000         189    0.0%
  cmos                -                4801          31    0.6%
  thread-fine         -              368439        7212    1.9%
  lauf3               -              335860           6    0.0%
  lauf2               -              330535           6    0.0%
  lauf7               -              278609           5    0.0%
  lauf6               -              297555           1    0.0%
  lauf4               -              329811          10    0.0%
  lauf1               -              322738           5    0.0%
  lauf5               -              325334          11    0.0%
  lauf0               -              335739           2    0.0%
  thread-ring         -              134166          72    0.0%
  heap                -              109556          32    0.0%
  zone                -               99979          12    0.0%
  tabellen            -              140215           4    0.0%
  frame               -              145039         109    0.0%
  serial              c7             247632        2107    0.8%
  provider            -              644514          73    0.0%
  provider-gesperrt   -                6582           3    0.0%

  the page came without a single system call, the image table over /state/modules,
  the screen over /state/screen,
  the locks over /state/locks and CAP_CONTROL

SEE ALSO

kernel, top, memory