Here's one way:
$delta = 264200;
$daysPassed = int($delta / 86400);
$deltaDays = $delta % 86400;
$hoursPassed = int($deltaDays / 3600);
$deltaHours = $deltaDays % 3600;
$minsPassed = int($deltaHours / 60);
$deltaMins = $deltaHours % 60;
$secsPassed = $delta;
$deltaSecs = $deltaMins % 60;
print "
Chad Kellerman wrote:
> Hi everyone,
>
> What would be the easiest way to find the uptime of a linux
> machine? I don't want to use a system call. Is there a module I can
> use? Or do I have to open /proc/uptime and calculate it thru there?
>
>
> Thanks for the help..
>
> Chad
>
yes.
On 03 Oct 2002 09:25:03 -0400, [EMAIL PROTECTED] (Chad Kellerman)
wrote:
>Hi everyone,
>
>What would be the easiest way to find the uptime of a linux
>machine? I don't want to use a system call. Is there a module I can
>use? Or do I have to open /proc/uptime and calculate it thru there?
He
On 3 Oct 2002, chad kellerman wrote:
> Hi everyone,
>
> What would be the easiest way to find the uptime of a linux
> machine? I don't want to use a system call. Is there a module I can
> use? Or do I have to open /proc/uptime and calculate it thru there?
>
Prase the output of the command
Here is a script I use to check system up time. You can specify a remote
server as an argument and it will remotely check the uptime for that server.
This goes into the perfmon stats and gets the information from there.
Keith
--cut here-
#!c
you could try snmp but that (in my experience) always reports the wrong
time if over 2 days.
On Sun, Aug 11, 2002 at 01:19:13PM -0800, Mark Weisman wrote:
> Hello List:
> What is the command structure to grab an uptime request from a remote
> computer? I have several systems in my organization
On Sunday, August 11, 2002, at 02:19 , Mark Weisman wrote:
> Hello List:
> What is the command structure to grab an uptime request from a remote
> computer? I have several systems in my organization that I would like to
> grab the uptime for, then post them to a dynamic web page. The web page
On 2002-08-12 01:50:50 -0800, Mark Weisman wrote:
> I built the script as you said, however, I'm getting an error that I
> can't get around in my error file;
>
> Could not create directory '/nonexistent/.ssh'.^M
> Aborted by user!^M
>
> Any ideas?
This is a ssh problem. ssh is not set up to use
n Group
Anchorage,AK USA
http://www.outlander.us
[EMAIL PROTECTED]
-Original Message-
From: Morten Liebach [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 11, 2002 6:00 PM
To: [EMAIL PROTECTED]
Subject: Re: Uptime on Remote computer?
On 2002-08-11 13:19:13 -0800, Mark Weisman wrote:
&g
There are many ways. Check out one method on my site @ www.stevenet.net.
..
Like it ? Its pretty simple ... Let me know and Ill tell you how I did it.
Thank you,
Steve Maroney
On Sun, 11 Aug 2002, Mark Weisman wrote:
> Hello List:
> What is the command structure to grab an uptime request
On 2002-08-11 13:19:13 -0800, Mark Weisman wrote:
> Hello List:
> What is the command structure to grab an uptime request from a remote
> computer? I have several systems in my organization that I would like to
> grab the uptime for, then post them to a dynamic web page. The web page
> I've alre
11 matches
Mail list logo