[email protected]Support 24/7 · Billing 09:00 – 00:00LinkedInXFacebook
NexonHost
Netherlands Dedicated ServersAmsterdam · Equinix AM6Germany Dedicated ServersFrankfurt · Equinix FR4Romania Dedicated ServersBucharest · VoxilityAustria Dedicated ServersVienna · Interxion VIEBulgaria Dedicated ServersSofia · TelepointFrance Dedicated ServersParis · Interxion PAR — Marseille · Digital Realty MRS3Ireland Dedicated ServersDublin · Equinix DB2Italy Dedicated ServersMilan · Irideos AvalonPoland Dedicated ServersWarsawSpain Dedicated ServersMadrid · Equinix MD2United States Dedicated ServersAshburn · Equinix DC
All articles
Getting startedMay 5, 2023

How to use Uptime Command.

How To Use Uptime Command.

In this tutorial, we will cover the uptime command.

As its name suggests, the uptime command shows how long the system has been running. It also displays the current time, the number of logged-in users, and the system load averages for the past 1, 5, and 15 minutes.

 

How to Use the Uptime Command

The syntax for the uptime command is as follows:

uptime [OPTIONS]

To display the system uptime, invoke the command without any options:

uptime

The output will look something like below:

11:43:35 up 21 days, 18:06,  1 user,  load average: 0.00, 0.01, 0.05

The information displayed by uptime is the same as the information contained in the header of the w command.

The load average on Linux can be a little confusing. Unlike other operating systems that show CPU load averages, Linux is showing system load averages.

System load average measurement of the number of jobs that are currently running or waiting for disk I/O. It basically tells you how busy your system has been over the given interval.

If the load averages are 0.0, then the system is mostly idle. If the load average for the past 1 minute is higher than the 5 or 15-minute averages, then the load is increasing. Otherwise, the load is decreasing.

The load average usually increases due to higher CPU consumption or disk workload.

To better understand the Linux load averages check the Brendan Gregg’s article: Linux Load Averages: Solving the Mystery .

 

uptime options

The uptime command accepts only a few options that are rarely used.

The -p, –pretty option tells uptime to display the output in a pretty format:

uptime -p

The command will display only how long the system has been running:

up 3 weeks, 18 hours, 7 minutes

The -s, –since option shows the date and time since the system is up:

uptime -s
2023-04-13 17:36:51

Other two options are:

  • -h, –help – Display a help message and exit.

  • -V, –version – Shows the version information and exit.

 

Conclusion

The uptime command gives you information about the current time, online users, how long your system has been up and running, and the system load average.

Keep reading
How to use iconv command in Linux.
September 15, 2023

How to use iconv command in Linux.

How To Use Iconv Command. iconv command is used to convert some text in one encoding into another encoding. If no input file is provided then it reads from standard input. Similarly, if no output file is given then it writes to standard output. If no from-encoding or to-encoding is provided then…

Read article
How to use getopts command in Linux.
September 15, 2023

How to use getopts command in Linux.

How To Use Getopts Command. Shell scripting is a powerful way to automate tasks and create custom utilities in Unix-like operating systems such as Linux. When writing shell scripts, it’s common to need to process command-line arguments and options provided by users. The getopts command is a…

Read article
How to use gawk command in Linux.
September 15, 2023

How to use gawk command in Linux.

How To Use Gawk Command. The basic gawk syntax looks like this: gawk [options] [actions/filters] input_file The command cannot be run without any arguments. The options are not mandatory, but for gawk to produce output, at least one action should be assigned. Actions and filters are different…

Read article
Get in Touch

Together, Let’s Build a Faster, Safer Internet.

Build scalable infrastructure with NexonHost — high-performance dedicated servers, VPS hosting, cloud hosting, and DDoS protection across Europe.

Get Started →Contact Us
[email protected]Support 24/7 · Billing 09:00 – 00:00