use /proc/uptime
This commit is contained in:
parent
f3545980b7
commit
d701098d84
2
status
2
status
@ -11,7 +11,7 @@ psql -w <<EOF
|
|||||||
RETURNING id
|
RETURNING id
|
||||||
)
|
)
|
||||||
INSERT INTO host_uptime (host_id, uptime)
|
INSERT INTO host_uptime (host_id, uptime)
|
||||||
SELECT id, '$(uptime -r | awk '{print $2}' | awk -F. '{print $1}')'
|
SELECT id, '$(cat /proc/uptime | awk -F. '{print $1}')'
|
||||||
FROM host_upsert
|
FROM host_upsert
|
||||||
RETURNING *;
|
RETURNING *;
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user