def sysinfo(response, template_name): OS = system.init() sysinfo = { "kernel": OS.version(), "fqdn": OS.getFQDN(), "distro": OS.getArch(), "uptime": OS.uptime(), "loadavg": OS.loadavg(), "cpuavg": OS.cpuavg(), } o = {"sysinfo": sysinfo} return render_to_response(template_name, o, context_instance=RequestContext(response))
def meminfo(response, template_name): OS = system.init() o = {"meminfo": OS.meminfo()} return render_to_response(template_name, o, context_instance=RequestContext(response))