Посмотреть uptime сервера linux

Команда Uptime в Linux

В этом руководстве мы рассмотрим команду uptime .

Как следует из названия, команда uptime показывает, как долго работает система. Он также отображает текущее время, количество вошедших в систему пользователей и среднюю загрузку системы за последние 1, 5 и 15 минут.

Как использовать команду Uptime

Синтаксис команды uptime следующий:

Чтобы отобразить время безотказной работы системы, вызовите команду без каких-либо параметров:

Результат будет выглядеть примерно так:

  • 22:20:33 — Текущее системное время.
  • up 620 days, 22:37 — Продолжительность работы системы.
  • 1 user — количество вошедших в систему пользователей.
  • load average: 0.03, 0.10, 0.10 — load average: 0.03, 0.10, 0.10 системы за последние 1, 5 и 15 минут.

Информация, отображаемая uptime аналогична информации, содержащейся в заголовке команды w .

Средняя загрузка Linux может немного сбивать с толку. В отличие от других операционных систем, которые показывают среднюю загрузку процессора, Linux показывает среднюю загрузку системы.

Измерение средней загрузки системы количества заданий, которые в настоящее время выполняются или ожидают ввода-вывода диска. Он в основном сообщает вам, насколько загружена ваша система в течение заданного интервала.

Если средние значения нагрузки равны 0.0 , то система в основном простаивает. Если среднее значение нагрузки за последнюю 1 минуту выше, чем среднее значение за 5 или 15 минут, то нагрузка увеличивается. В противном случае нагрузка уменьшается.

Средняя загрузка обычно увеличивается из-за более высокой загрузки ЦП или нагрузки на диск.

Чтобы лучше понять среднюю загрузку Linux, ознакомьтесь со статьей Брендана Грегга: Средние нагрузки Linux: разгадывая тайну .

варианты uptime

Команда uptime принимает только несколько редко используемых параметров.

Параметр -p , —pretty указывает uptime отображать вывод в —pretty формате:

Команда отобразит только время работы системы:

Параметр -s , —since показывает дату и время с момента —since системы:

Два других варианта:

  • -h , —help — отобразить справочное сообщение и выйти.
  • -V , —version — показать информацию о версии и выйти.

Выводы

Команда uptime предоставляет информацию о текущем времени, онлайн-пользователях, длительности работы вашей системы и средней загрузке системы.

Если у вас есть какие-либо вопросы или отзывы, не стесняйтесь оставлять комментарии.

Источник

Linux Server Uptime Command To Find Out How Long The System Has Been Running

Linux Server Uptime Command

Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following command:
$ uptime
Sample outputs:

The uptime command gives a one line display of the following information.

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard
Читайте также:  Рабочий активатор windows 10 домашняя

Join Patreon

  • The current time (21:54:11)
  • How long the system has been running (up 13 days)
  • How many users are currently logged on (1 user)
  • The system load averages for the past 1, 5, and 15 minutes (0.21, 0.21, 0.12)

See uptime in pretty format pass the -p option to the uptime command

$ uptime -p
Sample outputs:

This is the same information contained in the header line displayed by the w command and top command:
$ w
Sample outputs:

Getting help about uptime command

To check system uptime in Linux and Unix we use the uptime command. However, if you need more information on command option type the following man command:
$ man uptime
OR
$ uptime —help
Sample outputs:

Use top command to display Linux system uptime

Type the following command:
$ top
Sample outputs:

Fig.01: UNIX uptime top command output

Conclusion

In this quick tutorial, you learned how to use uptime, w, and top commands to see system uptime and other information from the command line.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Category List of Unix and Linux commands
Documentation help • mandb • man • pinfo
Disk space analyzers df • duf • ncdu • pydf
File Management cat • cp • less • mkdir • more • tree
Firewall Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04
Linux Desktop Apps Skype • Spotify • VLC 3
Modern utilities bat • exa
Network Utilities NetHogs • dig • host • ip • nmap
OpenVPN CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04
Package Manager apk • apt
Processes Management bg • chroot • cron • disown • fg • glances • gtop • jobs • killall • kill • pidof • pstree • pwdx • time • vtop
Searching ag • grep • whereis • which
Shell builtins compgen • echo • printf
Text processing cut • rev
User Information groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w
WireGuard VPN Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04

Comments on this entry are closed.

my favorite 🙂 updates every second….

Nice looking site; useful and clear information. Good job!

The only problem with the uptime command is that it isn’t always obvious what units of measure to the time it has been up. Just a bit confusing for those new to it, especially those from the Windoze world trying to come over to Linux. Just fleshing out the units (up 5 hours:54 minutes (days:hours:minutes)) on this would certainly help in bringing more over, especially if we can get into the man&info pages.

$ uptime
07:55:56 up 3 days, 17:37, 6 users, load average: 0.04, 0.06, 0.01
$

by default it will give how many days the OS is up, and how many hours:mins.
if it less than 1 day, it will give only hours:mins.

what is the command for checking how many bites are already downloaded in your server

How do I get only time information excluding other load information

How do I get only time information excluding other load information

# 1. run Command
# 2. strip unneeded leading data
# 3. check if the uptime is greater than 24 hours
# 4. make the output human readable
# 5. trim any leading space

For people who want to get uptime within a C program I would suggest having a look at sysinfo() too…

nice and so useful
thank you

How can i know uptime of a server machine without logging in it ?? Is there any way?

Hello Buddies , plz specify whats the value ‘4:29’ in the above output.

@Kunal It’s 4 hours and 29mins. So from the output the server uptime is 13 days, 4 hours and 31 mins.

thanks for this!

Did you see the output within one hour of startup? Is it, e.g. 0:15, :15 or 15 for the 15 minutes after startup?

On most systems you can do cat /proc/uptime if you’re only interested in the uptime. The first number is how many seconds the system has been up for, and the second number is how many seconds it’s spent idle.

Tuptime is a uptime with steroids, nice tool for getting uptime, downtime and other interesting stuff:
https://github.com/rfrail3/tuptime

How can i see the only up time without any other information is there Any command to know only the Uptime i mean to say the if i issue a command it should print 21:54:11 up 13 days, 4:29

Источник

How do you find the uptime of a Linux server?

I am a new Linux system user. I need to find the uptime of a Linux server located in AWS cloud. How do I check Linux system uptime?

Linux command ship with various command line tools to find out server uptime command. File /proc/uptime has uptime information, and file /var/run/utmp has information about who is currently logged on. However, data from /proc/uptime or /var/run/utmp file is not directly readable by humans, so you need to use the following commands.

Tutorial details
Difficulty level Easy
Root privileges No
Requirements Linux terminal
Est. reading time 2 minutes

Command to find the uptime of a Linux server

To find the uptime of a Linux server use any one of the following command. First, open the terminal window and then type:

  1. uptime command – Tell how long the Linux system has been running
  2. w command – Show who is logged on and what they are doing including the uptime of a Linux box
  3. top command – Display Linux server processes and display system Uptime in Linux too.

Let us see examples.

How to check system uptime in Linux

Open the terminal application on Linux and type the following uptime command:
uptime

My Linux system is running from last 13 days

Show uptime in pretty and human readable format by passing the -p as follows:
uptime -p
Sample outputs:

Want to find out the system is up since what time?

Try passing the -s as follows to see information in yyyy-mm-dd HH:MM:SS format:
uptime -s
Sample outputs:

Check Linux system uptime with w command

Run the w command to show information about the users currently on the Linux machine, and their processes. The header shows, in this order, the current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes. For example, type the following w command:
w

Display server uptime in Linux using top command

The top command provides a dynamic real-time view of a running system. It can display system summary information as well as a list of processes including system uptime. Open the terminal and run:
top

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard

Join Patreon

Conclusion

You learned how to use the uptime command that display the current time, the length of time the Linux system has been up, the number of users online, and the load average. For more information, see this page and the following pages using the man command:
man uptime
man w
Also see:

  • Linux Server see the historical and statistical uptime of system with tuptime utility

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Источник

linux-notes.org

Как узнать uptime в Linux/Unix

Нужно проверить uptime сервера? Нужно узнать когда был последний reboot ( перезагрузка)? Не знаете как? Я расскажу вам как можно проверить uptime вашей ОС (Linux\Unix), приведу в своей статье «Как узнать uptime в Linux/Unix» 3 способа как это можно сделать.

1. Команда top.

Top — программа для слежения за активностью процессора в реальном времени. Он отображает список наиболее ресурсоемких задач в системе и может обеспечить интерактивный интерфейс для управления процессами. Программа может сортировать задачи по загрузке процессора, использование памяти и времени автономной работы. Так же есть улучшенная версия под названием htop, которая дает возможность пролистывать и смотреть каждый процесс. Так же данная программа может показать время последней перезагрузки (uptime), чтобы посмотреть это, выполните:

посмотреть uptime с помощью утилиты top

2. Команда w.

Команда (утилита) w — отображает информацию о пользователях которые в настоящее время есть на машине, и их процессов. Внутри заголовка, показывается текущее время, как долго система работает, сколько пользователей в настоящее время вошли в систему, и среднюю нагрузку системы за последние 1, 5 и 15 минут

посмотреть uptime с помощью утилиты w

3. Команда uptime.

uptime дает одно строчную информацию на экран. Он показывает текущее время, как долго система работает уже, сколько пользователей в настоящее время залогинились в системе и среднюю нагрузку системы за последние 1, 5 и 15 минут.

посмотреть uptime с помощью утилиты uptime

Моя тема «Как узнать uptime в Linux/Unix» завершена. Спасибо за посещение моего сайта http://linux-notes.org

Добавить комментарий Отменить ответ

Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.

Источник

Читайте также:  Elan smart pad windows 10 что это
Оцените статью