Questions tagged [uptime]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
3answers
25 views

Unable to get the nth column data due to changing output of uptime command

Below is the output of uptime from Solaris where I am extracting the third last column: uptime 8:30pm up 23 day(s), 17:46, 5 users, load average: **2.79**, 1.79, 1.53 I always need to get the ...
0
votes
0answers
26 views

machine uptime is not consistent with last command

we have 3 rhel servers version 7.6 ( part of cluster with 8 machines ) on rhel server 1 machine uptime is uptime 10:25:51 up 23:48, 1 user, load average: 0.02, 0.09, 0.13 on rhel server 2 machine ...
1
vote
1answer
61 views

Uptime information updated in the command prompt

I want to put the uptime command information into the command prompt and have it updated every 750ms (regardless of whether I'm typing at the prompt or not). I usually use bash but I've used zsh too, ...
0
votes
1answer
102 views

Get system uptime with better precision then seconds

My system is running Linux for embedded. At the moment I didn't sync the system clock or gave the user an option to do it but it's going to change. Different parts in my application are using ...
2
votes
0answers
91 views

Understanding load average on Digital Ocean droplets

I apologize for this being a stupid question. I spend most of my time on stackoverflow and feel like a fish out of water over here. I have a standard Digital Ocean droplet, paying $5 a month, and ...
0
votes
1answer
64 views

Trying to calculate uptime and email if greater than a number of days

I need to create a script that will execute daily (cron job), calculate the uptime of the system (days only), and if that number is greater than a defined value (e.g. 30), email the system's ...
0
votes
1answer
39 views

System Uptime of last boot

If system shutdown abruptly. Then will it be possible to tell at what time it was shut ? Abruptly means due to power failure or due to sysrq magic keys. If I am logging something every few seconds ...
0
votes
2answers
350 views

How to get server uptime of AIX server results in seconds

In Linux, I can get the server uptime results in seconds (value) by using below command cat /proc/uptime But in AIX, we do not have uptime in /proc. If I just type uptime, I get results in days, ...
0
votes
1answer
49 views

no1 record in uptimed report

I have recently installed uptimed to track history of when my electricity was off. Everything is clear but there's one thing I cannot decipher. What does the label "no1" stand for in the following ...
0
votes
1answer
8k views

CPU load average + how to get cpu load average for history of X hours

We all know we can get average CPU load as: uptime 10:09:22 up 2 days, 1:44, 1 user, load average: 20.01, 20.03, 22.05 but this shows only load average over the last 1 minute is 22.05 load ...
0
votes
1answer
369 views

Incorrect System Uptime

Recently, in an Oracle Linux (either 6 or 7) based virtual machine, I faced any issue where system uptime was apparently wrong. # who -b system boot 2019-07-24 13:21 # last reboot reboot system ...
1
vote
0answers
45 views

Docker container started before host?

Look at the output: ubuntu@iBug-Server:~$ uptime -s 2019-07-07 20:33:07 ubuntu@iBug-Server:~$ docker inspect -f '{{ .State.StartedAt }}' ibot 2019-07-07T12:30:37.871925503Z ubuntu@iBug-Server:~$ ...
3
votes
0answers
303 views

Uptime requires sudo password

I was wondering if anyone could give me some info on why does uptime keeps requiring sudo password? Indeed uptime runs without any sudo access from my trminal. $ id -u; uptime 1000 17:39:48 up 2:27,...
2
votes
0answers
200 views

Why do my software RAID1 superblocks keep getting corrupted and how can I prevent this?

How might I be repeatedly corrupting my superblocks on RAID1 I have had two occasions in the past six months of RAID1 root arrays becoming unusable because of problems with the superblock. ...
0
votes
2answers
183 views

Replacing output with awk or sed

So what I've been trying to do is replace a certain output in bash with awk. But I can't seem to get it to work. I'm trying to replace the $6 output from "uptime" to 'user' instead of 'users'. How can ...
0
votes
1answer
160 views

Fix the output of uptime

So I've been experimenting with Bash not too long ago, and I want to manipulate the output from the "uptime" command. I managed to change the output of up x minutes to 0:05 for example if the up time ...
1
vote
0answers
116 views

Different output from uptime command

When I use the uptime command on my linux vb, it shows its output like this before it has been on for longer than 1 hour; 13:45:25 up 40 min, 3 users, load average: 0.41, 0.37, 0.27 But after the ...
0
votes
3answers
134 views

Why is there a single space before the output of `uptime`?

Perhaps a trivial question, but I found myself in the situation of needing to strip the leading space off the output of uptime and it got me wondering why it was there in the first place. An example ...
1
vote
2answers
255 views

High CPU load average; how to find the root cause?

It is hard task to find the root cause of CPU load average many commands are used to give partial picture. I am not sure if somewhere we can find a tool that knows how many CPU's we have on machine ...
1
vote
2answers
669 views

Most ironclad way to make root installation redundant and maximize uptime? RAID, ZFS or something else?

I would like to set up my desktop computer (which is actually a server for the KVM guests I do my actual work in) to have a redundant root installation. If one drive dies I want to quickly get back ...
0
votes
2answers
959 views

Finding the Percentage from a grep variable

I want to display the calculation of the CPU load in percentage. num2=$(uptime | grep "average:" | tr -d " " | cut -d ':' -f 5 | cut -d ',' -f 2) percent=$((num2(*100))) echo 'CPU percentage' $...
0
votes
2answers
70 views

Find number of cores available in a given node

I need to fix the following piece of code. The code aims to determine the number of cores available in a given node. Step 1: Get the number of cores with TC=$(grep -c process /proc/cpuinfo) Step 2:...
2
votes
3answers
3k views

Convert linux uptime to well format date

I want to convert uptime to date DD:MM:YY without the | and I want to put a string like "the computer is on since 23-feb-16"
4
votes
2answers
578 views

Uptime command misconception with suspend and resume states

The definition for uptime is "Tell how long the system has been running." but if you change your system power state to suspend or resume: # uptime 09:50:33 up 8 min, 2 users, load average: 0,24, 0,...
2
votes
2answers
2k views

uptime Script help [closed]

I am looking to build a script that will log in to multiple servers using a host file and run uptime, hostname -I and hostname Script so far echo"" ; echo "hostname:" $(ssh $HOST hostname) ; echo "...
4
votes
1answer
396 views

How is the “users” field of `uptime` calculated?

For me, uptime yields 9 users, but ps -Af | cut -f1 -d' ' | sort | uniq | wc -l yields 14. I'm not exactly sure where the 9 is coming from. Before I jump to conclusions though, please let me ...
3
votes
0answers
331 views

Time of Last Power Cycle

I know how to use uptime To see how long the OS has been running, and last reboot To see a log of recent OS reboots. Is there an easy way to see when the box was last power cycled? The ...
0
votes
1answer
783 views

Is it possible to calculate CPU utilization from load average & top CPU% column

I have a file which contains 2 output of uptime load average & CPU% column like an output from top command. So, is it possible to calculate it into CPU utilization or CPU usage at a time? ...
2
votes
1answer
892 views

Monit alert/exec when host is back to normal

I use Monit to quick check uptime of Elasticsearch service. Here is my configuration: check host [Elasticsearch]-test with address 1.2.3.4 if failed port 9200 protocol http ...
0
votes
1answer
1k views

How to suppress Debian uname message when ssh'ing into the machine? Plus changing it to something else, if possible

I would love to get rid of this uname message when ssh'ing into the Debian 9 machine: Linux backup-server 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 This line I would like to ...
7
votes
2answers
2k views

Total runtime of machine

Is there any way to read total running time of a linux system from BIOS or CPU? I've searched BIOS informations by dmidecode. But it gives release date which is not proper for my question. Then I've ...
0
votes
2answers
239 views

Linux Output Into Table

I have a cronjob that run monthly to generate some report from our system. However, the current output is as below: Uptime 100 45 50 Average CPU 2.36 15.6 70.8 How can I generate the output into a ...
5
votes
1answer
1k views

getting uptime in Weeks, Days, Hours, Minutes

Basically I an using conky to ssh into an android tv box and get the uptime and display it on the conky screen. I have this so far, found on net and hacked by me but it works, please amend if its ...
2
votes
2answers
2k views

How to display uptime in i3status bar?

I would like to display uptime in common units (so not just in minutes if it is over an hour; also not just in seconds if it is over a minute; e.g., "1:02:30" for 1 hour, 2 minutes and 30 seconds ...
3
votes
0answers
163 views

What is the right time when linux suffer drift time?

Supose that a linux server, at startup, report the following btime: boot btime -> 1493875000 This server is virtualized inside a busy box and the I/O load is high, in spite of have ntp running, a ...
0
votes
1answer
1k views

Get uptime for multiple Linux based Vms with powershell

Is there a way to find out the uptime for the Linux based Vms through powershell script. I am able to find the uptime for windows based VMs but I am unable to find uptime for the Linux based VMs.
3
votes
2answers
2k views

CPU and Load Average Conflict on EC2 server

I am having touble understanding what server resource is causing lag in my Java game server. In the last patch of my game server, I updated my EC2 lamp server from apache2.2, php5.3, mysql5.5 to ...
1
vote
4answers
774 views

How to keep an 'uptime record' log in Debian?

Currently, I have my server output my uptime to a HTML page using: TIME=$(uptime -p) echo ""${TIME}"!" >> /var/www/html/index.new Which generates an output of: up 1 day, 1 hour, 2 minutes! ...
1
vote
1answer
1k views

last reboot in local time zone?

Is there a way to tell this command to output the data in local time (not UTC)? last reboot Version: last --version last von util-linux 2.27.1
8
votes
2answers
12k views

High load average: Which processes are waiting in the queue?

I have an Ubuntu server running Redis, which suffers from a high load problem. Forensics Uptime # uptime 05:43:53 up 19 min, 1 user, load average: 2.96, 2.07, 1.52 sar # sar -q 05:24:00 AM ...
2
votes
3answers
90 views

How can I see when my PC was rebooted?

How can I see when my PC was rebooted? I need to know the last 10 times.
56
votes
3answers
17k views

On Linux, when does “uptime” start counting from?

My computer says: $ uptime 10:20:35 up 1:46, 3 users, load average: 0,03, 0,10, 0,13 And if I check last I see: reboot system boot 3.19.0-51-generi Tue Apr 12 08:34 - 10:20 (01:45) And ...
3
votes
2answers
4k views

How do I get the time when the system booted up in epoch format?

I need to write a script that figures out if a reboot has occurred after an RPM has been installed. It is pretty easy to get the epoch time for when the RPM was installed: rpm -q --queryformat "%{...
0
votes
3answers
2k views

Time in seconds since boot on AIX [duplicate]

I need to get the number of seconds since the last reboot, using ksh. What is the command or function to achieve this?
1
vote
0answers
95 views

Get uptime for multiple VM's

Is it possible to get the uptime for other VM's that are on the same cluster without the need to ssh?
-1
votes
1answer
2k views

Uptime on solaris

I have logged into school server which is running Solaris. I am to print the number of minutes from booting the server. I am using uptime and recieve this output 8:05pm up 12 day(s), 1:56, 11 ...
5
votes
2answers
6k views

How to print kernel time from command line?

How can I convert the uptime output to seconds since epoch to compare with dmesg output? Does uptime have the same resolution as the kernel message time? Is there a way to more directly get the ...
3
votes
1answer
3k views

How is uptime calculated?

I was wondering how uptime is calculated. Is it simply the difference between now and boot time? More specifically-- If I were to boot up, run for 5 minutes, and put the machine to sleep for a year; ...
0
votes
4answers
1k views

How do I find files that are created/modified/accessed before reboot?

On a remote system (that I am not an administrator of) I have configured an alternative TMPDIR in my `.profile (because the system default has very limited space). This alternative TMPDIR is of ...
0
votes
1answer
2k views

Why is load average being reported as 0.00 though system is busy doing work?

uptime, top, cat /proc/loadavg all reporting load averages for the last 1/5/15 minutes as 0.00, but the system is definitely busy doing work. Why is this? Server is running Red Hat Enterprise Linux ...