Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Users might experience few discrepancies in Search results. We are working on this on our side. We apologize for the inconvenience it may have caused.
New Member

when each server was last re-booted

I want to identify when each server was last re-booted in IPCC Enterprise 7.5 setup.
There are about 50+ servers hence it it would be tedious to log into each and every device and check.


Can you please advise how to do this task  ?
I think, we can use batch file but don't know how to use to run in network and output the result to a log file.
Thanks,
Naresh

3 REPLIES

Re: when each server was last re-booted

These are all Windows machines correct?  You could utilize the Windows Local Computer Policy Editor and configure the Startup and Shutdown scripts.

You could technically have a single script for all servers and for both startup and shutdown tasks, which takes two parameters: hostname and (startup|shutdown).

You script could just write this to a flat file or to a database, and then you could run reports on how often servers are rebooted, how long do they stay down, how long do they stay up, etc.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
Green

Re: when each server was last re-booted

Interesting problem - do you have Support Tools?

* On the router (or rogger - not sure what you have) - run rttest status

* On each PG, run opctest status

You can do this from Support Tools.

Another way is to run dumplog nm /last on each server using Support Tools and find when the Node Manager service started last.

Also, you can run the following net command on Windows and pull out the line with "since":

C:\>net stats srv | findstr "since"

Statistics since 11/12/2010 6:09 PM

But this can only run on the local computer.

You could download the free uptime utility from Microsoft and install it on every machine - then you can execute this remotely - check the following link

http://support.microsoft.com/kb/232243

Finally, if you are a geek like me, you can write some code ....

Wscript.Echo "server: " & Wscript.Arguments.Named("s")

Set objWMIService = GetObject("winmgmts:\\" & Wscript.Arguments.Named("s") & "\root\cimv2")

Set colOperatingSystems = objWMIService.ExecQuery _

    ("Select * From Win32_PerfFormattedData_PerfOS_System")

For Each objOS in colOperatingSystems

    intSystemUptime = Int(objOS.SystemUpTime / 60)

    Wscript.Echo intSystemUptime & " minutes"

Next

Save this as (say uptime.vbs) and execute with cscript passing the server name in as a "s" argument (with a colon between s and server_name - no spaces). This connects to the WMI service which should be running on each of your ICM servers.

For example ....

D:\temp>cscript uptime.vbs /s:GT2045297

Microsoft (R) Windows Script Host Version 5.7

Copyright (C) Microsoft Corporation. All rights reserved.


server: GT2045297

865 minutes

You can put this in  a BATCH file - a line for each server - and send the output to a text file. That would look cool for 50+ servers. Should work OK because all the machines are in the ICM domain. I tried it on one of my systems and it worked fine. It even worked to CVP servers not in the ICM domain but which have the same Administrator password.

Regards,
Geoff
Green

Re: when each server was last re-booted

You could download the free uptime utility from Microsoft and install it on every machine - then you can execute this remotely - check the following link

http://support.microsoft.com/kb/232243

Well, that was rubbish. I should have checked before saying you had to "install it on every machine".

Just install uptime on ONE machine, then execute it as

uptime REMOTE_SERVER_NAME_OR_IP_ADDRESS

Put that in a batch file and Bob's your uncle.

Regards,

Geoff

222
Views
5
Helpful
3
Replies
CreatePlease to create content