Uptime on login page
Posted: Fri Jun 16, 2017 10:46 am
I have been having some issues with an access point so I would like to add uptime to the login.sh page. I was able to do it by adding my own section:
However, the formatting isn't the same as what Gargoyle provides on the overview page. I can't seem to find how Garoyle computes the uptime.
It puts uptime in a variable and then it magically turns into output. Can anyone tell me where the logic is?
Thanks
Code: Select all
<fieldset id="up_time" style="display:block">
<legend class="sectionheader">Uptime</legend>
<div class="nocolumn" id="up_time"><% echo "$(uptime | awk -F'( |,|:)+' '{print $6,$7",",$8,"hours,",$9,"minutes."}')" %></div>
</fieldset>
It puts uptime in a variable and then it magically turns into output. Can anyone tell me where the logic is?
Code: Select all
echo "var uptime=\"$(cat /proc/uptime)\";"
<div>
<span class='leftcolumn'><%~ Uptm %>:</span><span id="uptime" class='rightcolumn'></span>
</div>