0

i ma creating a server monitoring tool , which will be installed on any machine and that will provide server statics. i have created a script that can be deployed on any machine and can print server statics for that machine. my task here is to detect from which machine the output came. how can i do that plese help. i have used following python command.

import socket
socket.gethostbyname(socket.gethostname())

but this return only ip .i want all server parameters ,like public dns, private dns, location name,dns ,hostname ,private_dns, public_dns .

A. Jesse Jiryu Davis
  • 23,641
  • 4
  • 57
  • 70
jugadengg
  • 99
  • 1
  • 3
  • 15

1 Answers1

0
import platform 
platform.node()

may help

There are some clues here and here

Community
  • 1
  • 1
doctorlove
  • 18,872
  • 2
  • 46
  • 62