compspec / compspec-go

Prototype compatibility plugin in go for testing compspec descriptive metadata
MIT License
0 stars 0 forks source link

Add memory to compspec system #23

Closed vsoch closed 8 months ago

vsoch commented 8 months ago

I'm not sure why this isn't parsed in nfd - the most I can find is some metadata in kernel extractors. But it's relatively straight forward to get it so I'll just add an extractor for it:

~$ cat /proc/meminfo 
MemTotal:       32516520 kB
MemFree:          704968 kB
MemAvailable:   22285732 kB
Buffers:         1653028 kB
Cached:         20310916 kB
SwapCached:           80 kB
Active:          7483312 kB
Inactive:       21044348 kB
Active(anon):      13744 kB
Inactive(anon):  8176016 kB
Active(file):    7469568 kB
Inactive(file): 12868332 kB
Unevictable:      848256 kB
Mlocked:             128 kB
SwapTotal:       2097148 kB
SwapFree:        2094844 kB
Zswap:                 0 kB
Zswapped:              0 kB
Dirty:              1156 kB
Writeback:             0 kB
AnonPages:       7405204 kB
Mapped:          2115348 kB
Shmem:           1626044 kB
KReclaimable:    1708964 kB
Slab:            2048224 kB
SReclaimable:    1708964 kB
SUnreclaim:       339260 kB
KernelStack:       44000 kB
PageTables:       100728 kB
SecPageTables:         0 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    18355408 kB
Committed_AS:   33317300 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      114112 kB
VmallocChunk:          0 kB
Percpu:            28736 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:   761856 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      528576 kB
DirectMap2M:    25339904 kB
DirectMap1G:     8388608 kB