Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cppla/ServerStatus
/ get_uptime
Function
get_uptime
clients/client-linux.py:63–66 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
61
CM = _env_str(
"CM"
, CM)
62
63
def
get_uptime():
64
with
open(
'/proc/uptime'
,
'r'
)
as
f:
65
uptime = f.readline().split(
'.'
, 2)
66
return
int(uptime[0])
67
68
def
get_memory():
69
re_parser = re.compile(r
'^(?P<key>\S*):\s*(?P<value>\d*)\s*kB'
)
Callers
1
client-linux.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected