Python script to get server information -


how can create python script server information base on these fields?

hostname, osrelease, if it's virtual or physical server. 

output

hostname1, redhat 5.8, vmware 

i have this:

import platform  print 'uname:', platform.uname()  print 'system   :', platform.system() print 'node     :', platform.node() print 'release  :', platform.release() 

the first 2 columns of required output quite simple obtain:

import platform print (platform.node(), ' '.join(platform.dist()[:2])) 

the information of last column, i.e. if python running under virtual or physical machine, seems tricky. consult following pages hints:

have @ following modules:


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

php - Symfony 2: "No route found for "GET /" - error on fresh installation -