Porkchop

Software skärmdump:
Porkchop
Mjukvaruinformation:
Version: 0.7.3
Ladda upp dagen: 15 Apr 15
Utvecklare: Scott Smith
Licens: Gratis
Popularitet: 2

Rating: nan/5 (Total Votes: 0)

Porkchop är ett enkelt HTTP-baserat system informationsserver skrivet i Python. & Nbsp; Du skriver plugins för det och det svarar med de data baserat på din förfrågan.
Här är ett exempel:
scott @ beatbox: ~% curl http: // localhost: 5000 / cpuinfo
/ Cpuinfo / processor2 / FPU ja
/ Cpuinfo / processor2 / f00f_bug nej
/ Cpuinfo / processor2 / cache_alignment 64
/ Cpuinfo / processor2 / vendor_id AuthenticAMD
/ cpuinfo / processor2 / flaggor FPU
/ Cpuinfo / processor2 / bogomips 6384
/ Cpuinfo / processor2 / hlt_bug nej
/ Cpuinfo / processor2 / apicid 2
/ Cpuinfo / processor2 / fpu_exception ja
/ Cpuinfo / processor2 / steg 3
/ Cpuinfo / processor2 / wp ja
/ Cpuinfo / processor2 / syskon 4
/ Cpuinfo / processor2 / modell 4
/ Cpuinfo / processor2 / coma_bug nej
/ Cpuinfo / processor2 / fdiv_bug nej
/ Cpuinfo / processor3 / FPU ja
/ Cpuinfo / processor3 / f00f_bug nej
/ Cpuinfo / processor3 / cache_alignment 64
/ Cpuinfo / processor3 / vendor_id AuthenticAMD
/ cpuinfo / processor3 / flaggor FPU
/ Cpuinfo / processor3 / bogomips 6384
/ Cpuinfo / processor3 / hlt_bug nej
/ Cpuinfo / processor3 / apicid 3
/ Cpuinfo / processor3 / fpu_exception ja
/ Cpuinfo / processor3 / steg 3
/ Cpuinfo / processor3 / wp ja
/ Cpuinfo / processor3 / syskon 4
/ Cpuinfo / processor3 / modell 4
/ Cpuinfo / processor3 / coma_bug nej
/ Cpuinfo / processor3 / fdiv_bug nej
[Snip]
/ Tid 1311387215
Scott @ beatbox: ~%
Det kan också svara med JSON via .json filändelse eller ställa in Acceptera: application / json header.
scott @ beatbox: ~% curl http: // localhost: 5000 / cpuinfo.json
{"Cpuinfo": {"processor2": {"FPU": "ja", "f00f_bug": "nej", "cache_alignment": "64", "vendor_id": "AuthenticAMD", "flaggor": "FPU" , "bogomips": "6384", "hlt_bug": "nej", "apicid": "2", "fpu_exception": "ja", "kliva": "3", "wp": "ja", " syskon ":" 4 "," modell ":" 4 "," coma_bug ":" nej "," fdiv_bug ":" nej "}," processor3 ": {" FPU ":" ja "," f00f_bug ":" nej "," cache_alignment ":" 64 "," vendor_id ":" AuthenticAMD "," flaggor ":" FPU "," bogomips ":" 6384 "," hlt_bug ":" nej "," apicid ":" 3 " "fpu_exception": "ja", "kliva": "3", "wp": "ja", "syskon": "4", "modell": "4", "coma_bug": "nej", " fdiv_bug ":" nej "}," processor0 ": {" FPU ":" ja "," f00f_bug ":" nej "," cache_alignment ":" 64 "," vendor_id ":" AuthenticAMD "," flaggor ":" FPU "," bogomips ":" 6382 "," hlt_bug ":" nej "," apicid ":" 0 "," fpu_exception ":" ja "," kliva ":" 3 "," wp ":" ja " , "syskon": "4", "modell": "4", "coma_bug": "nej", "fdiv_bug": "nej"}, "processor1": {"FPU": "ja", "f00f_bug" : "nej", "cache_alignment": "64", "vendor_id": "AuthenticAMD", "flaggor": "FPU", "bogomips": "6384", "hlt_bug": "nej", "apicid": " 1 "," fpu_exception ":" ja "," kliva ":" 3 "," wp ":" ja "," syskon ":" 4 "," modell ":" 4 "," coma_bug ":" nej " "fdiv_bug": "nej"}}, "tid": "1311389934"}
Scott @ beatbox: ~%
Installation
Pip installera porkchop
eller
Python setup.py installera
Skriva Plugins
Det är ganska lätt att skriva en ny plugin. De är bara Python-moduler med några gemensamma attribut:
- Ett plugin måste underklass porkchop.plugin.PorkchopPlugin.
- Insticksprogrammet klass måste ändelsen Plugin. Dess verkliga filnamnet i plugin katalogen bör också matcha prefix. Till exempel skulle FooPlugin vara i filen foo.py
- Insticksprogrammet klass måste innehålla en metod som kallas get_data som returnerar en ordbok av den information som ska visas.
Som standard kommer en plugin s get_data metod bara anropas om uppgifterna är mer än 60 sekunder gammal. Detta kan ändras på en per-plugin basis genom att ställa self.refresh i klassens ___init___ metod.
. Dessa plugins kan placeras i valfri katalog, och laddas genom att alternativet -d att porkchop

Krav :

  • Python

Annan programvara för utvecklare Scott Smith

dvdauthor
dvdauthor

28 Sep 15

Decode Reply Tool
Decode Reply Tool

14 Apr 15

Tenderloin
Tenderloin

20 Feb 15

Kommentarer till Porkchop

Kommentarer hittades inte
Kommentar
Slå på bilder!