From 8d8cf23d9acd9292f8b718856518b33f99c68b7f Mon Sep 17 00:00:00 2001 From: "sandipsamal117@gmail.com" Date: Thu, 9 Sep 2021 12:36:03 -0400 Subject: [PATCH] add bogomips & distribution --- setup.py | 2 +- sys_info/sys_info.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index 311b162..a836d44 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name = 'sys_info', - version = '0.1', + version = '0.2.0', description = 'An app to display systen information', long_description = readme, author = 'Sandip Samal', diff --git a/sys_info/sys_info.py b/sys_info/sys_info.py index 3f66b31..17a16e1 100644 --- a/sys_info/sys_info.py +++ b/sys_info/sys_info.py @@ -11,8 +11,6 @@ from chrisapp.base import ChrisApp import os import platform -import socket - Gstr_title = r""" _ __ @@ -136,8 +134,7 @@ def run(self, options): print("Machine: " + platform.machine()) # node - #print("Node: " + platform.node()) - print("Node: " + socket.gethostname()) + print("Node: " + platform.node()) # processor print("Processors: ") @@ -145,8 +142,9 @@ def run(self, options): info = f.readlines() cpuinfo = [x.strip().split(":")[1] for x in info if "model name" in x] + bogoinfo = [x.strip().split(":")[1] for x in info if "bogomips" in x] for index, item in enumerate(cpuinfo): - print(" " + str(index) + ": " + item) + print(" " + str(index) + ": " + item + " bogomips:" + bogoinfo[index]) # system print("System: " + platform.system()) @@ -154,7 +152,7 @@ def run(self, options): # distribution #dist = platform.dist() #dist = " ".join(x for x in dist) - #print("Distribution: " + dist) + print("Distribution: " + platform.version()) # Load with open("/proc/loadavg", "r") as f: