Skip to content
jc-rs
GitHub

proc-locks

--proc-locksv1.0.0

Converts `/proc/locks` file to JSON

Linuxfileslurpable
$ jc-rs /proc/locks

A real pair

From the reference corpus (linux-proc/locks.json). The left pane is the input the fixture ships; the right pane is the corpus's expected JSON. CI compares jc-rs with it field by field under the published differential. Hover a value to see where it came from.

/proc/lockslinux-proc
1: POSIX  ADVISORY  WRITE 877 00:19:812 0 EOF
2: FLOCK  ADVISORY  WRITE 854 00:19:805 0 EOF
3: POSIX  ADVISORY  WRITE 701 00:19:702 0 EOF
4: FLOCK  ADVISORY  WRITE 870 fd:00:264967 0 EOF
expected outputjson
Use the Left and Right arrow keys to highlight the matching value in the input.
[
  {
    "id": 1,
    "class": "POSIX",
    "type": "ADVISORY",
    "access": "WRITE",
    "pid": 877,
    "maj": "00",
    "min": "19",
    "inode": 812,
    "start": "0",
    "end": "EOF"
  },
  {
    "id": 2,
    "class": "FLOCK",
    "type": "ADVISORY",
    "access": "WRITE",
    "pid": 854,
    "maj": "00",
    "min": "19",
    "inode": 805,
    "start": "0",
    "end": "EOF"
  },
  {
    "id": 3,
    "class": "POSIX",
    "type": "ADVISORY",
    "access": "WRITE",
    "pid": 701,
    "maj": "00",
    "min": "19",
    "inode": 702,
    "start": "0",
    "end": "EOF"
  },
  {
    "id": 4,
    "class": "FLOCK",
    "type": "ADVISORY",
    "access": "WRITE",
    "pid": 870,
    "maj": "fd",
    "min": "00",
    "inode": 264967,
    "start": "0",
    "end": "EOF"
  }
]

Fixture coverage

1/1oracle-valid pairs match under the published structural JSON comparison

Magic syntax

jc-rs /proc/locksjc-rs reads this kernel-interface file directly and dispatches it through the matching /proc parser.

Source: crates/jc-rs-parsers/src/proc/proc_locks.rs. jc-rs targets the schemas defined by the original Python tool. Fixture coverage above is the measured evidence for this parser; test the inputs your pipeline depends on. Compare