Reputation: 117
I write an app/copy/clone of this app which gets information about my server to display in my app. I have no idea how to get some of the info for eg. with python
name of connection
time and date when the server was connected/started
I used here module datetime
now = datetime.datetime.now()
strftime("%Y-%m-%d %H:%M:%S")
But I think it's not that information when the server was connected or started
kernel time
user time
address workstation/address TE
Is address NAT just an IP address? If yes I got it with module socket, it can be get with command ipconfig in cmd.exe
Upvotes: 0
Views: 69
Reputation: 3784
You can take a look at the psutil module and use cpu_times() function to get the kernel and user time and all the network related functions in order to get the network related data that you need to monitor.
Additionally you can take a look at the subprocess module in order to run the OS specific commands you would usually issue in order to get the metrics you require from the server (e.g. running ipconfig as you suggest although using socket will also be a good idea as explained on this other post).
Upvotes: 1