mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-13 01:20:24 +02:00
doc update
This commit is contained in:
@ -3,19 +3,19 @@
|
||||
|
||||
# jc.parsers.proc\_driver\_rtc
|
||||
|
||||
jc - JSON Convert `/proc/driver_rtc` file parser
|
||||
jc - JSON Convert `/proc/driver/rtc` file parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat /proc/driver_rtc | jc --proc
|
||||
$ cat /proc/driver/rtc | jc --proc
|
||||
|
||||
or
|
||||
|
||||
$ jc /proc/driver_rtc
|
||||
$ jc /proc/driver/rtc
|
||||
|
||||
or
|
||||
|
||||
$ cat /proc/driver_rtc | jc --proc-driver-rtc
|
||||
$ cat /proc/driver/rtc | jc --proc-driver-rtc
|
||||
|
||||
Usage (module):
|
||||
|
||||
@ -56,7 +56,7 @@ are attempted. If you do not want this behavior, then use `--raw` (cli) or
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat /proc/driver_rtc | jc --proc -p
|
||||
$ cat /proc/driver/rtc | jc --proc -p
|
||||
{
|
||||
"rtc_time": "16:09:21",
|
||||
"rtc_date": "2022-09-03",
|
||||
@ -78,7 +78,7 @@ Examples:
|
||||
"batt_status": "okay"
|
||||
}
|
||||
|
||||
$ cat /proc/driver_rtc | jc --proc -p -r
|
||||
$ cat /proc/driver/rtc | jc --proc -p -r
|
||||
{
|
||||
"rtc_time": "16:09:21",
|
||||
"rtc_date": "2022-09-03",
|
||||
|
@ -201,9 +201,9 @@ def parse(
|
||||
pid_mountinfo_p = re.compile(r'^\d+ \d+ \d+:\d+ /.+\n')
|
||||
pid_numa_maps_p = re.compile(r'^[a-f0-9]{12} default [^\n]+\n')
|
||||
pid_smaps_p = re.compile(r'^[0-9a-f]{12}-[0-9a-f]{12} [rwxsp\-]{4} [0-9a-f]{8} [0-9a-f]{2}:[0-9a-f]{2} \d+ [^\n]+\nSize:\s+\d+ \S\S\n')
|
||||
pid_stat_p = re.compile(r'^\d+ \(.{1,16}\) \w \d+ \d+ \d+ \d+ -?\d+ (?:\d+ ){43}\d+$')
|
||||
pid_statm_p = re.compile(r'^\d+ \d+ \d+\s\d+\s\d+\s\d+\s\d+$')
|
||||
pid_status_p = re.compile(r'^Name:\t.+\nUmask:\t\d+\nState:\t.+\nTgid:\t\d+\n')
|
||||
pid_stat_p = re.compile(r'^\d+ \(.{1,16}\) \w \d+ \d+ \d+ \d+ -?\d+ (?:\d+ ){43}\d+$')
|
||||
|
||||
scsi_device_info = re.compile(r"^'\w+' '.+' 0x\d+")
|
||||
scsi_scsi_p = re.compile(r'^Attached devices:\nHost: \w+ ')
|
||||
|
@ -1,16 +1,16 @@
|
||||
"""jc - JSON Convert `/proc/driver_rtc` file parser
|
||||
"""jc - JSON Convert `/proc/driver/rtc` file parser
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ cat /proc/driver_rtc | jc --proc
|
||||
$ cat /proc/driver/rtc | jc --proc
|
||||
|
||||
or
|
||||
|
||||
$ jc /proc/driver_rtc
|
||||
$ jc /proc/driver/rtc
|
||||
|
||||
or
|
||||
|
||||
$ cat /proc/driver_rtc | jc --proc-driver-rtc
|
||||
$ cat /proc/driver/rtc | jc --proc-driver-rtc
|
||||
|
||||
Usage (module):
|
||||
|
||||
@ -51,7 +51,7 @@ are attempted. If you do not want this behavior, then use `--raw` (cli) or
|
||||
|
||||
Examples:
|
||||
|
||||
$ cat /proc/driver_rtc | jc --proc -p
|
||||
$ cat /proc/driver/rtc | jc --proc -p
|
||||
{
|
||||
"rtc_time": "16:09:21",
|
||||
"rtc_date": "2022-09-03",
|
||||
@ -73,7 +73,7 @@ Examples:
|
||||
"batt_status": "okay"
|
||||
}
|
||||
|
||||
$ cat /proc/driver_rtc | jc --proc -p -r
|
||||
$ cat /proc/driver/rtc | jc --proc -p -r
|
||||
{
|
||||
"rtc_time": "16:09:21",
|
||||
"rtc_date": "2022-09-03",
|
||||
@ -102,7 +102,7 @@ import jc.utils
|
||||
class info():
|
||||
"""Provides parser metadata (version, author, etc.)"""
|
||||
version = '1.0'
|
||||
description = '`/proc/driver_rtc` file parser'
|
||||
description = '`/proc/driver/rtc` file parser'
|
||||
author = 'Kelly Brazil'
|
||||
author_email = 'kellyjonbrazil@gmail.com'
|
||||
compatible = ['linux']
|
||||
|
@ -47,9 +47,6 @@ class MyTests(unittest.TestCase):
|
||||
'proc_diskstats': (
|
||||
'fixtures/linux-proc/diskstats',
|
||||
'fixtures/linux-proc/diskstats.json'),
|
||||
'proc_driver_rtc': (
|
||||
'fixtures/linux-proc/driver_rtc',
|
||||
'fixtures/linux-proc/driver_rtc.json'),
|
||||
'proc_filesystems': (
|
||||
'fixtures/linux-proc/filesystems',
|
||||
'fixtures/linux-proc/filesystems.json'),
|
||||
@ -123,6 +120,10 @@ class MyTests(unittest.TestCase):
|
||||
'fixtures/linux-proc/zoneinfo2',
|
||||
'fixtures/linux-proc/zoneinfo2.json'),
|
||||
|
||||
'proc_driver_rtc': (
|
||||
'fixtures/linux-proc/driver_rtc',
|
||||
'fixtures/linux-proc/driver_rtc.json'),
|
||||
|
||||
'proc_net_arp': (
|
||||
'fixtures/linux-proc/net_arp',
|
||||
'fixtures/linux-proc/net_arp.json'),
|
||||
|
Reference in New Issue
Block a user