
from collections import OrderedDict
import platform

from sysscribe import cpu
from sysscribe import memory
from sysscribe import network
from sysscribe import disk

def system_dict():
    
    sysinfo=OrderedDict()

    sysinfo['platform'] = platform.uname()

    # Add cpu info dict
    cpu_list = cpu.dev_list()
    sysinfo['cpu'] = OrderedDict()
    sysinfo['cpu']['num sockets'] = len(cpu_list)
    sysinfo['cpu']['socket type'] = cpu_list[0]
    
    # Add memory info
    sysinfo['memory'] = OrderedDict()
    sysinfo['memory']['total'] = memory.total()
    
    # Add network info
    net_list = network.dev_list()
    sysinfo['network'] = OrderedDict()
    sysinfo['network']['num devices'] = len(net_list)
    sysinfo['network']['devices'] = net_list
    
    # Storage info
    disk_sizes = disk.disk_sizes()
    sysinfo['disk'] = OrderedDict()
    sysinfo['disk']['num devices'] = len(disk_sizes)
    sysinfo['disk']['device size'] = disk_sizes
    
    return sysinfo
    
    
@@ -158,16 +158,42 @@
 ort disk
+%0Afrom sysscribe import pci
 %0A%0Adef sy
@@ -978,24 +978,204 @@
 _sizes%0A    %0A
+    # Pci info%0A    pci_list = pci.pci_list()%0A    sysinfo%5B'pci'%5D = OrderedDict()%0A    sysinfo%5B'pci'%5D%5B'num devices'%5D = len(pci_list)%0A    sysinfo%5B'pci'%5D%5B'device size'%5D = pci_list%0A    %0A
     return s

Add pci info