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

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Returns a dict with informations from /proc/uptime

        def uptime_infomation():
    """
    Returns a dict with informations from /proc/uptime
    """
    with open("/proc/uptime", "r") as f:
        raw_uptime = f.readline().strip().split(" ")[0]
        uptime_sec = float(raw_uptime)

    d = datetime.datetime.now() - datetime.timedelta(seconds=uptime_sec)
    return d
        


src/d/j/django-processinfo-0.7.0/django_processinfo/admin.py   django-processinfo(Download)
from django_processinfo.utils.human_time import timesince2, human_duration, \
    datetime2float
from django_processinfo.utils.proc_info import meminfo, uptime_infomation, \
    process_information
 
 
        # information from /proc/uptime
        updatetime = uptime_infomation()
 
        swap_total = meminfo_dict["SwapTotal"]

src/d/j/django-processinfo-HEAD/django_processinfo/admin.py   django-processinfo(Download)
from django_processinfo.utils.human_time import timesince2, human_duration, \
    datetime2float
from django_processinfo.utils.proc_info import meminfo, uptime_infomation, \
    process_information
 
 
        # information from /proc/uptime
        updatetime = uptime_infomation()
 
        swap_total = meminfo_dict["SwapTotal"]