1
주로 Windows 또는 Linux를 실행하는 시스템에 대한 특정 정보를 얻을 python 스크립트를 작성하려고합니다. 여기 내가 지금까지 얻은 것이 있습니다.Python을 사용하여 컴퓨터 시스템 정보 얻기
import socket
import os
import sys
import platform
import psutil
import uuid
print "Name: " +socket.gethostname()
print "FQDN: " +socket.getfqdn()
print "System Platform: "+sys.platform
print "Machine: " +platform.machine()
print "Node " +platform.node()
print "Platform: "+platform.platform()
print "Pocessor: " +platform.processor()
print "System OS: "+platform.system()
print "Release: " +platform.release()
print "Version: " +platform.version()
print "Number of CPUs: " +str(psutil.cpu_count())
print "Number of Physical CPUs: " +str(psutil.cpu_count(logical=False))
#Need Model of Computer i.e. HP Compaq 8100 Elite SFF, HP X600 workstation
#need Ram
#need Disk space
#Need Manufacturer i.e. HP, Dell, Lenova
Linux 및 Windows에서 시스템 및 모델 번호를 얻는 방법을 잘 모르겠습니다. psutil을 사용하여 RAM 및 디스크 공간을 확보 할 수 있다고 생각합니다.
흠, 셸 명령을 실행하여 df 및 기타 등의 정보를 얻을 수 있습니까? –
쉘을 사용하여이 작업을 수행 할 수 있지만 파이썬에서이 작업을 수행 할 수 있는지 궁금합니다. – user990951