{"id":115,"date":"2021-05-15T09:12:34","date_gmt":"2021-05-15T09:12:34","guid":{"rendered":"https:\/\/webhostingnoida.in\/blog\/?p=115"},"modified":"2021-09-01T09:14:06","modified_gmt":"2021-09-01T09:14:06","slug":"linux-uptime-command","status":"publish","type":"post","link":"https:\/\/webhostingnoida.in\/blog\/linux-uptime-command\/","title":{"rendered":"Linux Uptime Command"},"content":{"rendered":"<p><strong>The Linux Operating System<\/strong>\u00a0is filled with several commands which any aspiring Linux expert or power user e.g. system admin must have a good grasp of. One of such commands is\u00a0<code>uptime<\/code>\u00a0and today, I\u2019ll briefly discuss its purpose and syntax.<\/p>\n<p><strong>Uptime<\/strong>\u00a0is a command that returns information about how long your system has been running together with the\u00a0<strong>current time<\/strong>,\u00a0<strong>number of users with running sessions<\/strong>, and\u00a0<strong>the system load averages<\/strong>\u00a0for the past\u00a0<strong>1<\/strong>,\u00a0<strong>5<\/strong>, and\u00a0<strong>15<\/strong>\u00a0minutes.<\/p>\n<p><strong>uptime<\/strong>\u00a0uses a simple syntax:<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_83 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/webhostingnoida.in\/blog\/linux-uptime-command\/#Using_Uptime\" >Using Uptime<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/webhostingnoida.in\/blog\/linux-uptime-command\/#Check_Linux_Server_Uptime\" >Check Linux Server Uptime<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/webhostingnoida.in\/blog\/linux-uptime-command\/#Check_Linux_Server_Starting_Time\" >Check Linux Server Starting Time<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/webhostingnoida.in\/blog\/linux-uptime-command\/#Uptime_Version_Help\" >Uptime Version &amp; Help<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"has-luminous-vivid-amber-color has-text-color\"><span class=\"ez-toc-section\" id=\"Using_Uptime\"><\/span>Using Uptime<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can run the uptime command without any options<\/p>\n<pre class=\"wp-block-code\"><code># uptime<\/code><\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-116\" src=\"https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/vps3-300x23.png\" alt=\"\" width=\"965\" height=\"74\" srcset=\"https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/vps3-300x23.png 300w, https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/vps3-768x59.png 768w, https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/vps3.png 957w\" sizes=\"auto, (max-width: 965px) 100vw, 965px\" \/><\/p>\n<figure class=\"wp-block-image size-full\"><\/figure>\n<p>Let\u2019s see some useful\u00a0<strong>uptime command<\/strong>\u00a0usage with examples.<\/p>\n<h2 class=\"has-luminous-vivid-amber-color has-text-color\"><span class=\"ez-toc-section\" id=\"Check_Linux_Server_Uptime\"><\/span>Check Linux Server Uptime<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can filter uptime\u2019s result to show only the running time of the system with the command:<\/p>\n<pre class=\"wp-block-code\"><code># uptime -p<\/code><\/pre>\n<p>Output:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-117\" src=\"https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/VPS4-300x47.png\" alt=\"\" width=\"977\" height=\"153\" srcset=\"https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/VPS4-300x47.png 300w, https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/VPS4.png 547w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/p>\n<figure class=\"wp-block-image size-full is-resized\"><\/figure>\n<h2 class=\"has-luminous-vivid-amber-color has-text-color\"><span class=\"ez-toc-section\" id=\"Check_Linux_Server_Starting_Time\"><\/span>Check Linux Server Starting Time<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Using option\u00a0<code>-s<\/code>\u00a0will display the date\/time since when the system has been running.<\/p>\n<pre class=\"wp-block-code\"><code># uptime -s<\/code><\/pre>\n<figure class=\"wp-block-image size-full is-resized\"><\/figure>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-118\" src=\"https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/vps5-300x45.png\" alt=\"\" width=\"947\" height=\"142\" srcset=\"https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/vps5-300x45.png 300w, https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/vps5.png 535w\" sizes=\"auto, (max-width: 947px) 100vw, 947px\" \/><\/p>\n<h2 class=\"has-luminous-vivid-amber-color has-text-color\"><span class=\"ez-toc-section\" id=\"Uptime_Version_Help\"><\/span>Uptime Version &amp; Help<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>As it is with most command line apps, you can display uptime\u2019s version information and quick help page with the following command.<\/p>\n<pre class=\"wp-block-code\"><code>uptime -h<\/code><\/pre>\n<figure class=\"wp-block-image size-full\"><\/figure>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-119\" src=\"https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/vps6-300x98.png\" alt=\"\" width=\"842\" height=\"275\" srcset=\"https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/vps6-300x98.png 300w, https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/vps6-768x252.png 768w, https:\/\/webhostingnoida.in\/blog\/wp-content\/uploads\/2021\/09\/vps6.png 894w\" sizes=\"auto, (max-width: 842px) 100vw, 842px\" \/><\/p>\n<p>These are the command which we use\u00a0<strong>uptime<\/strong>\u00a0for your daily runs.<\/p>\n<p>We hope you\u2019ve found this useful!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Linux Operating System\u00a0is filled with several commands which any aspiring Linux expert or power user e.g. system admin must have a good grasp of. One of such commands is\u00a0uptime\u00a0and today, I\u2019ll briefly discuss its purpose and syntax. Uptime\u00a0is a command that returns information about how long your system has been running together with the\u00a0current<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-115","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/webhostingnoida.in\/blog\/wp-json\/wp\/v2\/posts\/115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostingnoida.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostingnoida.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostingnoida.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostingnoida.in\/blog\/wp-json\/wp\/v2\/comments?post=115"}],"version-history":[{"count":1,"href":"https:\/\/webhostingnoida.in\/blog\/wp-json\/wp\/v2\/posts\/115\/revisions"}],"predecessor-version":[{"id":120,"href":"https:\/\/webhostingnoida.in\/blog\/wp-json\/wp\/v2\/posts\/115\/revisions\/120"}],"wp:attachment":[{"href":"https:\/\/webhostingnoida.in\/blog\/wp-json\/wp\/v2\/media?parent=115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostingnoida.in\/blog\/wp-json\/wp\/v2\/categories?post=115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostingnoida.in\/blog\/wp-json\/wp\/v2\/tags?post=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}