netsage-project / tstat-transport

Tstat Transport Tools for NetSage
Other
1 stars 4 forks source link

enhancement request #2

Closed bltierney closed 8 years ago

bltierney commented 8 years ago

1) Duration should be in seconds, not ms. Round to 2 decimal places

2) add a new 'meta' field: sensor_id default: results of 'gethostname()' system call ability to override default with a command line switch

montegoode commented 8 years ago

gethostbyname() by itself does not return anything so this incomplete. That resolves a hostname. I can do this one of two ways:

>>> socket.gethostname()
'Natsume.local'
>>> socket.gethostbyname(socket.gethostname())
'192.168.1.4'

What do we want?

The first option will never fail and is more human readable.

bltierney commented 8 years ago

we want socket.gethostname()