• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 572
  • Last Modified:

Uptime for a Redhat Linux based OS?

Hi,
Is there a way that you can find the Up-time for a Redhat linux based OS? I'm actually trying to find that for VMWare ESX server which is based on redhat (Service Console)
0
datacomsmt
Asked:
datacomsmt
  • 2
  • 2
  • 2
2 Solutions
 
Deepak KosarajuCommented:
uptime command give u that information
on the command console type


#uptime

Open in new window

0
 
datacomsmtAuthor Commented:
it looks like "uptime" as a command has no switchs with it, the man pages say

NAME
       uptime - Tell how long the system has been running.

SYNOPSIS
       uptime
       uptime [-V]

DESCRIPTION
       uptime gives a one line display of the following information.  The cur-
       rent 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.

       This is the same information contained in the header line displayed  by
       w(1).

FILES
       /var/run/utmp  information about who is currently logged on
       /proc     process information




when I tried running just "uptime", it gave me the total uptime since the last reboot (see below), I'm looking for uptime since a specific number of days.

16:12:15  up 17 days, 20:10,  1 user,  load average: 0.00, 0.00, 0.00
0
 
Deepak KosarajuCommented:
I have no Idea what other commands you have in linux for your requirement, except this uptime to know system uptime since last reboot.
Sorry!
 
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
WizRd-LinuxCommented:
To achieve what you want to do would require a script to use something like date to do the conversion.  The command uptime displays exactly what it should, the uptime since the server / node was booted.

If you can explain with an example what you are looking for I can assist with writing the script for you.
0
 
datacomsmtAuthor Commented:
wizRd-Linux,

what I exactly need is the total uptime in the last 30 days regardless of how many times the server was rebooted.
i need to run this script once a month so that it gives me the uptime in the previous 30 days.

thanks.
0
 
WizRd-LinuxCommented:
In that case, there isn't a "command" that can be ran on Linux to provide this for you.  You will need to look at something like Nagios which has historical reporting.  You would be able to group between servers, individual servers or even ever server showing their uptime for the past day, 7 days, 30 days, 3 months or custom reporting.

http://www.nagios.org/ - Simply add all of your hosts and it will automatically monitor their uptime.  Turn off reporting and you will be ready to start "logging" for lack of a better word the uptime of these servers.

This won't work exactly as needed if the monitoring server goes offline for any reason so I would suggest a UPS to help you through.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now