Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(4)  |  Derive(0)  |  Import(3)
<comment-ja>
OS??????????????????(df???????)???????
</comment-ja>
<comment-en>
TODO: English Comment
</comment-en>

        def get_fs_info():
    """
    OS??????????????????(df???????)???????
    
    
    TODO: English Comment
    
    """
    ret = []
    tmp_dict = {}
    pipe = os.popen("LANG=C /bin/df -m -P")
    try:
        data = []
        for line in pipe.readlines():
            data.append(re.sub(r'[ \t]', ' ', line).split())
    finally:
        pipe.close()

    for i in range(1, len(data)):
        for j in range(0,6):
            tmp_dict[data[0][j]] = data[i][j]

        ret.append(tmp_dict)
        tmp_dict = {}

    return ret
        


src/k/a/karesansui-HEAD/karesansui/gadget/hostby1watch.py   karesansui(Download)
     findby1 as m_findby1
 
from karesansui.lib.utils import is_param, get_karesansui_version, \
    get_proc_cpuinfo, get_proc_meminfo, get_hdd_list, \
    get_partition_info, get_ifconfig_info, get_fs_info
            self.view.cpu_logical_number = range(1, cpu_logical_number+1)
            self.view.memory_size = string.atol(get_proc_meminfo()["MemTotal"][0]) / 1024
            self.view.df_list = get_fs_info()
            self.view.interface_list = get_ifconfig_info().keys()
 
            ## disk info 
            self.view.disk_size_info = {}
            for disk_data in get_fs_info():
                self.view.disk_size_info[disk_data['Filesystem']] = disk_data['1048576-blocks']
 

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1reportby1.py   karesansui(Download)
from karesansui.lib.virt.virt import KaresansuiVirtConnection
from karesansui.lib.rrd.rrd import RRD
from karesansui.lib.utils import is_param, is_empty, \
    str2datetime, create_epochsec, get_proc_cpuinfo, \
    get_fs_info, get_hdd_list, get_ifconfig_info, \
            graph_type = ['default']
        elif target == "df":
            df_list = get_fs_info()
            for fs in df_list:
                if COLLECTD_DF_RRPORT_BY_DEVICE is True:

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1watchby1.py   karesansui(Download)
    findbyhost1 as m_findbyhost1
 
from karesansui.lib.utils import is_param, get_karesansui_version, \
    get_proc_cpuinfo, get_proc_meminfo, get_hdd_list, \
    get_partition_info, get_ifconfig_info, get_fs_info
        ## disk info 
        self.view.disk_size_info = {}
        for disk_data in get_fs_info():
            disk_target = re.sub(r'^/dev/', '', disk_data['Filesystem'])
            disk_target = re.sub(r'/', '_', disk_target)