{"id":3960,"date":"2010-06-25T08:45:42","date_gmt":"2010-06-25T13:45:42","guid":{"rendered":"http:\/\/granades.com\/?p=3960"},"modified":"2010-06-25T08:41:57","modified_gmt":"2010-06-25T13:41:57","slug":"changing-uptime-to-use-more-relevant-units","status":"publish","type":"post","link":"https:\/\/granades.com\/?p=3960","title":{"rendered":"Changing Uptime to Use More Relevant Units"},"content":{"rendered":"<p><code><br \/>\n[stephen@sargent ~]$ uptime<br \/>\n8:58:08 up 10 Isner-Mahuts, 06:10,  1 user,  load average: 0.00, 0.00, 0.00<br \/>\n<\/code><\/p>\n<p>For those of you wanting to actually make the change to uptime.c, note that, instead of<\/p>\n<p><code><br \/>\nupdays = uptime \/ 86400;<br \/>\nuphours = (uptime - (updays * 86400)) \/ 3600;<br \/>\nupmins = (uptime - (updays * 86400) - (uphours * 3600)) \/ 60;<br \/>\n<\/code><\/p>\n<p>use something like<\/p>\n<p><code><br \/>\nupims = uptime \/ 39900;<br \/>\nuphours = (uptime - (upims * 39900)) \/ 3600;<br \/>\nupmins = (uptime - (upims * 39900) - (uphours * 3600)) \/ 60;<br \/>\n<\/code><\/p>\n<p>(Note: it&#8217;s a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Isner%E2%80%93Mahut_match_at_the_2010_Wimbledon_Championships\">tennis joke<\/a>. And a Unix joke. I can only imagine the size of the overlap in <i>that<\/i> Venn diagram.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[stephen@sargent ~]$ uptime 8:58:08 up 10 Isner-Mahuts, 06:10, 1 user, load average: 0.00, 0.00, 0.00 For those of you wanting to actually make the change to uptime.c, note that, instead of updays = uptime \/ 86400; uphours = (uptime &#8211; (updays * 86400)) \/ 3600; upmins = (uptime &#8211; (updays * 86400) &#8211; (uphours * &hellip; <a href=\"https:\/\/granades.com\/?p=3960\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Changing Uptime to Use More Relevant Units<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[],"tags":[],"class_list":["post-3960","post","type-post","status-publish","format-standard","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/granades.com\/index.php?rest_route=\/wp\/v2\/posts\/3960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/granades.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/granades.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/granades.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/granades.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3960"}],"version-history":[{"count":8,"href":"https:\/\/granades.com\/index.php?rest_route=\/wp\/v2\/posts\/3960\/revisions"}],"predecessor-version":[{"id":3968,"href":"https:\/\/granades.com\/index.php?rest_route=\/wp\/v2\/posts\/3960\/revisions\/3968"}],"wp:attachment":[{"href":"https:\/\/granades.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/granades.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/granades.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}