Skip to content

Commit

Permalink
add bogomips & distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Sep 9, 2021
1 parent b907d42 commit 8d8cf23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
10 changes: 4 additions & 6 deletions sys_info/sys_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from chrisapp.base import ChrisApp
import os
import platform
import socket


Gstr_title = r"""
_ __
Expand Down Expand Up @@ -136,25 +134,25 @@ def run(self, options):
print("Machine: " + platform.machine())

# node
#print("Node: " + platform.node())
print("Node: " + socket.gethostname())
print("Node: " + platform.node())

# processor
print("Processors: ")
with open("/proc/cpuinfo", "r") as f:
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())

# 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:
Expand Down

0 comments on commit 8d8cf23

Please sign in to comment.