Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

TCL(Tool Command Language) Scripting

pure tcl windows uptime?


Is ther a way, some command to execute, to get the uptime of
a windows box as easy as getting the uptime of a unix box? I
can easily grab the uptime in unix with a 'set l [exec uptime]'.
I know about twapi and for political reasons I want to install
as little as possible on my windows boxes.

Mike

Mike wrote:
> Is ther a way, some command to execute, to get the uptime of
> a windows box as easy as getting the uptime of a unix box? I
> can easily grab the uptime in unix with a 'set l [exec uptime]'.
> I know about twapi and for political reasons I want to install
> as little as possible on my windows boxes.

Then take your application (with twapi) and wrap it as a starpack -- then
you only have one file to install.

--
+--------------------------------+---------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+

Mike wrote:
> can easily grab the uptime in unix with a 'set l [exec uptime]'.

And 'set l [exec systeminfo]' isn't sufficient?

--
   Darren New / San Diego, CA, USA (PST)
     His kernel fu is strong.
     He studied at the Shao Linux Temple.

google for "uptime.exe" It's either
MS or systeminterals free program.

If you can't find a copy I can send you
one.

Roy

On Jun 7, 12:17 am, Darren New <d@san.rr.com> wrote:

> Mike wrote:
> > can easily grab the uptime in unix with a 'set l [exec uptime]'.

> And 'set l [exec systeminfo]' isn't sufficient?

Yes but on my system it is awfully slow.
One quicker alternative is 'set l [exec net stats server]'.

-Alex

Alexandre Ferrieux wrote:
> One quicker alternative is 'set l [exec net stats server]'.

Oh yeah. I knew there was a better one.

--
   Darren New / San Diego, CA, USA (PST)
     His kernel fu is strong.
     He studied at the Shao Linux Temple.

Mike wrote :

> Is ther a way, some command to execute, to get the uptime of
> a windows box as easy as getting the uptime of a unix box? I
> can easily grab the uptime in unix with a 'set l [exec uptime]'.
> I know about twapi and for political reasons I want to install
> as little as possible on my windows boxes.

> Mike

This is of course more a hack than a very clean solution, but you may
infer boot time from:
   set boottime [file mtime [file join $::env(SystemRoot) bootstat.dat]]

At least, it doesn't have any external dependencies.

Eric

In article <46673267$0$30636$4c368@roadrunner.com>, Darren New wrote:
> Mike wrote:
>> can easily grab the uptime in unix with a 'set l [exec uptime]'.

> And 'set l [exec systeminfo]' isn't sufficient?

Oops, my mistake. I found systeminfo for uptime. Someone was talking to
me while I typed the message. I have uptime from systeminfo.exe. I was
thinking that on unix I get the load average from uptime, so I typed
uptime instead of load average.

Is there a way to get the load average from windows or tye instantaneous(?)
cpu usage and I'll compute my own load average.

Mike

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc