HTPC-Manager icon indicating copy to clipboard operation
HTPC-Manager copied to clipboard

Alternative to OHM for those running headless on linux

Open EZarnosky opened this issue 10 years ago • 6 comments

I know I asked about this before (https://github.com/Hellowlol/HTPC-Manager/issues/226). But since then I have tried to get OHM working on my headless linux system, without any luck. Can you provide an alternative tool(s) for those of us running headless?

EZarnosky avatar Jun 29 '15 15:06 EZarnosky

I'll allow pretty much anything as long as I don't have to code it ;)

Hellowlol avatar Jun 29 '15 17:06 Hellowlol

Lol, does that also include not coding the data scrapping? :P

EZarnosky avatar Jun 29 '15 17:06 EZarnosky

Yes :D but I'll welcome a pr and I'll help if anybody wants to to start on this.

Hellowlol avatar Jun 29 '15 17:06 Hellowlol

I'd love to - but, so many projects and most important - my python skill sucks!

I will keep my eyes open to see if there is any python source out there that might be a good foundation for the addition.

EZarnosky avatar Jun 29 '15 17:06 EZarnosky

There you go: https://github.com/nima/python-dmidecode

Hellowlol avatar Jun 29 '15 17:06 Hellowlol

Or parse dmesg (does not req root)

Dunno if you can find anything usefull but here an example:

d  = {}
with open('pathto.txt', 'r') as f:
    for line in f.readlines():
        line = line.strip()
        try:
            if ':' in line:
                s = line.split(':')
                # remove time
                key = s[0][15:]
                value = s[1]
                d[key] = value
        except Exception as e:
            print e

print d

Hellowlol avatar Jun 30 '15 16:06 Hellowlol