mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
fix for uptime calculation
This commit is contained in:
parent
6fbfb3d28b
commit
bb4ac2f115
1 changed files with 2 additions and 2 deletions
|
@ -37,8 +37,8 @@ get_srv_state() {
|
||||||
mem=$((mem / 1024))
|
mem=$((mem / 1024))
|
||||||
|
|
||||||
# Get pid date
|
# Get pid date
|
||||||
if [ ! -z $pid ] && [ -e "/proc/$pid/cmdline" ]; then
|
if [ ! -z $pid ] && [ -e "/proc/$pid" ]; then
|
||||||
mtime=$(stat -c "%Y" /proc/$pid/cmdline)
|
mtime=$(stat -c "%Y" /proc/$pid)
|
||||||
rtime=$((ctime - mtime))
|
rtime=$((ctime - mtime))
|
||||||
rtime=$((rtime / 60))
|
rtime=$((rtime / 60))
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue