Browse Source

ecn-robots: begun implementing hostinfo robot with psi

master
Nagy Károly Gábriel 14 years ago
parent
commit
09e83e9bf5
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      hostinfo.py

+ 17
- 0
hostinfo.py

@ -0,0 +1,17 @@
import psi
import psi.arch
import psi.process
from datetime import *
#from datetime import timedelta
a = psi.arch.arch_type()
print a.sysname
print a.release
print a.nodename
print a.machine
z = psi.process.Process(1)
print z.start_time.datetime()
print timedelta(seconds = psi.uptime()[0])
print datetime.datetime.now()

Loading…
Cancel
Save