-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInventar_1_Initial.py
More file actions
44 lines (39 loc) · 1009 Bytes
/
Inventar_1_Initial.py
File metadata and controls
44 lines (39 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/local/bin/python3
##############################################
#
# Name: Inventar_1_Initial.py
#
# Author: Peter Christen
#
# Version: 1.0
#
# Date: 10.11.2017
#
# Purpose: Server Inventar Script
# Basis Script
#
##############################################
import platform,multiprocessing,os,sys,time
###Variabeln
timestamp=time.time()
inventar={}
###Funktionen
def getdata():
inventar["name"]=platform.node()
inventar["nrcpu"]=multiprocessing.cpu_count()
inventar["system"]=platform.system()
inventar["release"]=platform.release()
inventar["machine"]=platform.machine()
inventar["timestamp"]=int(timestamp)
def showdata():
print ("Server Angaben\n##############")
print ("Name:",inventar["name"])
print ("Nr.CPU:",inventar["nrcpu"])
print ("System:",inventar["system"])
print ("Release:",inventar["release"])
print ("Machine:",inventar["machine"])
print ("Timestamp:",inventar["timestamp"])
###Daten ausgeben
getdata()
showdata()
sys.exit(0)