+ Post New Thread
Results 1 to 12 of 12
Scripts Thread, Check the status of your servers in Coding and Web Development; Take a look at the new addition to the WIKI http://www.edugeek.net/wiki/index.ph...f_your_servers Any questions post them here...
  1. #1

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,971
    Thank Post
    886
    Thanked 1,715 Times in 1,481 Posts
    Blog Entries
    12
    Rep Power
    450

    Check the status of your servers

    Take a look at the new addition to the WIKI

    http://www.edugeek.net/wiki/index.ph...f_your_servers

    Any questions post them here

  2. #2
    zag
    zag is offline
    zag's Avatar
    Join Date
    Mar 2007
    Posts
    3,767
    Thank Post
    899
    Thanked 418 Times in 351 Posts
    Blog Entries
    12
    Rep Power
    87
    Doesnt seem to work for me I get

    Line:2
    Char: 38
    Error: Expected Identifier


    Code:
    Dim logon, fndconeN, fndctwo, fnexchange
    Dim filesys, objshell, servermessage,
     
    Set filesys = CreateObject("Scripting.FileSystemObject")
    Set objshell = CreateObject("WScript.Shell")
     
    fndconeN = "OFF"
    fndctwo = "OFF"
    fnexchange = "OFF"
     
    If filesys.FileExists ("\\itnm\c$\WINDOWS\win.ini") Then fndconeN = "ON"
    If filesys.FileExists ("\\rgbackup\c$\WINDOWS\win.ini") Then fndctwo = "ON"
    If filesys.FileExists ("\\rgmail2\c$\WINDOWS\win.ini") Then fnexchange = "ON"
     
    servermessage = "itnm	= " & fndconeN & VBCR & "rgbackup		= " & fndctwo & VBCR &"rgmail2	= " & fnexchange
     
    retval = objShell.Popup(servermessage, ,"Server Status",0 + 64 )
     
    wscript.quit
    EDIT: Ok fixed it by removing the comma at the end of the second line, cool script

  3. #3

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,406
    Thank Post
    639
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    324
    Does deleting the win.ini file shut the server down?

  4. #4

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,971
    Thank Post
    886
    Thanked 1,715 Times in 1,481 Posts
    Blog Entries
    12
    Rep Power
    450
    yes, its very handy to just check your servers in seconds

  5. #5
    DMcCoy's Avatar
    Join Date
    Oct 2005
    Location
    Isle of Wight
    Posts
    3,456
    Thank Post
    10
    Thanked 494 Times in 434 Posts
    Rep Power
    113
    or you could use uptime.exe

    uptime.exe \\daedalus
    \\daedalus has been up for: 179 day(s), 0 hour(s), 45 minute(s), 59 second(s)

    You can just run it as a batch if you want and pipe the text to a file.

    179 days isn't bad for windows servers :P, even then the last power down was due an extended powercut. Means I have some patches to catch up with though!

  6. #6

    Join Date
    Feb 2006
    Location
    Derbyshire
    Posts
    1,381
    Thank Post
    181
    Thanked 211 Times in 171 Posts
    Rep Power
    65
    I find PeerMonitor very handy for a basic but useful 'at a glance' view that my servers are all still up - also added to it IPs of access points around the school that regularly get turned off etc...

    http://www.danielclarke.com/peermonitor/

    Kind of easier than running a script every time you want to check...

  7. 2 Thanks to OutToLunch:

    FN-GM (12th March 2008), webman (4th March 2008)

  8. #7

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740
    Or the no ping script I did:

    http://www.edugeek.net/forums/showth...highlight=ping

    I'll do a quick web page on getting this at some point so you can get it working with Blat. Some may find this handy.
    I'll add it to the Admin Bar too at some point.

  9. #8

    Join Date
    Dec 2005
    Location
    Essex
    Posts
    85
    Thank Post
    7
    Thanked 5 Times in 5 Posts
    Rep Power
    18
    Or you could use Vista's 'Server Ping' side bar gadget:



    http://gallery.live.com/liveItemDeta...a570&bt=1&pl=1
    Last edited by JamesC; 4th March 2008 at 12:15 PM.

  10. #9

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740
    Quote Originally Posted by JamesC View Post
    Or you could use Vista's 'Server Ping' side bar gadget:



    http://gallery.live.com/liveItemDeta...a570&bt=1&pl=1
    Thats a handy one - I'll install that. All these 'Ors' should be put in an array really.....

  11. #10

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,804
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    We have a nagios server here.

    http://www.nagios.org

    I use the firefox plugin for 'at a glance' info as to whats broken.

    https://addons.mozilla.org/en-US/firefox/addon/3607

    Along with Email notifications.

  12. #11
    Diello's Avatar
    Join Date
    Jun 2005
    Location
    Kent, England
    Posts
    1,064
    Thank Post
    112
    Thanked 228 Times in 128 Posts
    Rep Power
    74
    Spotlight for servers and Alert Ping for switches/APs

  13. #12
    Joedetic's Avatar
    Join Date
    Jan 2006
    Location
    Walsall
    Posts
    1,316
    Thank Post
    6
    Thanked 13 Times in 13 Posts
    Rep Power
    22
    Yeah there are already a number of ways to do this. I've used nagios in the past as it'll check individual services on the server too and then e-mail you if something dies. Good stuff. I've used poweradmin in the past too but that's for windows boxen.

SHARE:
+ Post New Thread

Similar Threads

  1. Script Need to check disk space on remote servers
    By screwuphead in forum Scripts
    Replies: 8
    Last Post: 26th November 2007, 05:28 PM
  2. Replies: 10
    Last Post: 21st September 2007, 01:11 PM
  3. Single Status
    By faza in forum General Chat
    Replies: 36
    Last Post: 2nd February 2007, 09:37 AM
  4. Just got ICT college status YAY!!!
    By Mr_T in forum General Chat
    Replies: 3
    Last Post: 1st February 2007, 12:20 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •