script for checking uptime (431 Views)
Reply
Frequent Advisor
Posts: 100
Registered: ‎06-20-2013
Message 1 of 8 (431 Views)

script for checking uptime

HI,

 

I need to know is it possible to check uptime for multiple server.

 

for example :from server A, I need to check the uptime of server B,C,D,E in a html format.

 

Can I have some idea ?

Regular Advisor
Posts: 204
Registered: ‎06-09-2009
Message 2 of 8 (425 Views)

Re: script for checking uptime

Hi

 

Write a script

 

ssh x ,y,z and then check the uptime

Thanks & Regards
Ajin.S
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Occasional Advisor
Posts: 8
Registered: ‎08-03-2011
Message 3 of 8 (418 Views)

Re: script for checking uptime

from server A:

 remsh <server B> -n 'uptime'

 

or 

ssh <server B> -n 'uptime'

Frequent Advisor
Posts: 100
Registered: ‎06-20-2013
Message 4 of 8 (409 Views)

Re: script for checking uptime

hi,

 

I want the output to display in a html format.

 

 

Acclaimed Contributor
Posts: 25,446
Registered: ‎03-06-2006
Message 5 of 8 (400 Views)

Re: script for checking uptime

>I want the output to display in a html format.

 

Then you may want to look at some perl scripting.

Frequent Advisor
Posts: 100
Registered: ‎06-20-2013
Message 6 of 8 (386 Views)

Re: script for checking uptime

hi

 

can you share me a sample script ?

Acclaimed Contributor
Posts: 25,446
Registered: ‎03-06-2006
Message 7 of 8 (377 Views)
Honored Contributor
Posts: 14,261
Registered: ‎05-29-2000
Message 8 of 8 (359 Views)

Re: script for checking uptime

For HTML, just insert <PRE> before the output from uptime and </PRE> after the output.

 

If you are looking for a complete web page that identifies the server name, date and time, etc, you need to read  about how to create web pages.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.