Questions tagged [uptime]

The tag has no usage guidance.

2
votes
0answers
34 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
40 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
36 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 ...
0
votes
0answers
35 views

Storing a grep outcome into a variable [duplicate]

I've recently begun working with Bash and I was trying to do the following: Format the output of uptime Whenever you input uptime into bash you get something along the lines of: 20:30:54 up 43 min,...
1
vote
0answers
36 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
72 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
0answers
66 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
89 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
228 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
35 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:...
0
votes
2answers
664 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"
3
votes
1answer
102 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
365 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 "...
3
votes
1answer
141 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 ...
2
votes
0answers
138 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
355 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? ...
1
vote
1answer
430 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
379 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
1k 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
93 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
810 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
1answer
1k 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
136 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
655 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.
2
votes
2answers
1k 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
3answers
425 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! ...
0
votes
1answer
850 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
6
votes
2answers
8k 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
82 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.
50
votes
3answers
10k 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 ...
1
vote
2answers
2k 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
1k 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
81 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?
-2
votes
1answer
1k 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 ...
4
votes
2answers
4k 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
2k 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
752 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
1k 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 ...
2
votes
1answer
5k views

Is there a way to find the uptime of a network card in unix?

Some of the information i am requesting can be gleaned from /var/log/syslog , e.g: grep wlan /var/log/syslog But the usefulness of that information also depends on how you are network connecting; ...
6
votes
1answer
1k views

How can I display uptime with sleep-mode time excluded?

I put my laptop to suspend mode, woke it up later, and now it shows uptime some 23 hours (with uptime), which is obviously not true. I suspect uptime simply returns the difference between the ...
1
vote
2answers
769 views

Find out at what time my machine got restarted and why?

I have my ubuntu machine which is running Ubuntu 10.10 and that machine is running my app server. I am suspecting that my machine got restarted today at some time but I don't know how to find out at ...
11
votes
1answer
5k views

How to reliably get timestamp at which the system booted?

I'm aware of the uptime command, but it returns seconds since booted, so if I just substract that number from current timestamp, in theory I can get a different result if second changes after I've ...
3
votes
1answer
3k views

get system uptime on battery?

How to know system uptime under battery ? so that i can get exact time of battery backup the uptime shows complete uptime (AC/Battery) NOTE : I am using linux Mint 17.
45
votes
7answers
92k views

How long has my Linux system been running?

Is there a command I can type in a terminal that will tell me the last time a machine was rebooted?
2
votes
2answers
1k views

Command 'uptime' returns 'average'

I wrote a simple bash script that checks the load average values using 'uptime' every 5 minutes and writes a result to the text file. Everything is OK except one thing: every day from 12:00 to 13:00 I ...
10
votes
4answers
17k views

Why/how does “uptime” show CPU load >1?

I have a 1 core CPU installed on my PC. Sometimes, uptime shows load >1. How is this possible and what does this mean? EDIT: The values go up to 2.4
5
votes
1answer
13k views

The amount of time since the system was last booted [duplicate]

I have used both uptime and cat /proc/uptime commands. I know the idle time in the later can be greater than running time (multiprocessors). However, when I add both running and idle times, and ...
4
votes
2answers
2k views

How long system has been awake / running / since restart

First and foremost I want to know how long my laptop (unix, apple, OSX 10.9 mavericks) has been 'awake' (i.e. how long its been open, or since it last 'slept'). I' also be interested in how long ...
2
votes
1answer
2k views

last reboot/uptime/… strange behaviour

I know this has been more or less asked before but I still don't have any answer. I started to investigate why on my system (it is a remote machine) who -b and uptime gave different results (~3 days ...
4
votes
2answers
595 views

Is there a tool for tracking uptimes across reboots?

A tool such as this might on the surface appear to serve no real useful purpose, but people that take care of systems like to brag, and uptime is just one of those things that they like to brag about ...