SunQuest
           UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old September 7th, 2004, 08:01 PM
hchou hchou is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 7 hchou User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Help w/ script (checking systems up/down)

I am new to here. Hopefully, I don't say or write something stupid.

------------------------------------------------
Anyway, i got this script question. I have to write a script to check for block of ip addresses of server (192.168.1.1-254)

If the system is up, check the uptime and disk space. Record the finding.
If the system is down, e-mail admin with the list of systems.

If the system is not UNIX, skip.

------------------------------------------------
I can perform the ip lookup and ping to verify the system up and down, but how to verify the system is UNIX or other?
Also, how to check the systems' uptime and disk space remotely?

Thanks in advance.

Reply With Quote
  #2  
Old September 7th, 2004, 09:19 PM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,083 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 19 h 44 m 45 sec
Reputation Power: 9
this is OK: ping to verify the system up and down
this is the probl: but how to verify the system is UNIX
'ssh' does this: how to check the systems' uptime and disk space remotely?

Q: on wich OS runs the script ?

apart from ftp and telnet (they give in banner the os-type of
remote sys) i cannot remember any other cmd giving this info.

by ftp|telnet you get 2 other probls:
- how to quit them in NOT interactive mode, i mean: input of ^D, quit, bye or exit.
- you need to know ALL banner of differents *nix OS

you could try 'expect' (you need a user on rem sys)

i would:
- put this info manually (once) in your ip-list
- delete non *nix ip from the list
- by new installs, organize better your ip, say odd-ip = *nix
or group them aa.bb.cc.[x-y] = *nix

alternatively, reverse the problem, let the remote sys (over cron)
send you the infos. this suppose the script is installed on
rem-sys, but you do it once.

finally the best way is 'nis',
- an extra nickname in 'hosts' table.
- put the required info direct in a special table.

Last edited by guggach : September 7th, 2004 at 09:25 PM. Reason: typo

Reply With Quote
  #3  
Old September 9th, 2004, 01:47 AM
hchou hchou is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 7 hchou User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you very much. I guess i will go with Expect. Consider the script might need to check on some network gears. Those devices have telnet ability.

The reason I am not running this from all the systems has to do with central control, and some of the systems are network device, like Cisco.

Thanks for the suggestion. By the way, how can I capture the information from Expect back to script?

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Help w/ script (checking systems up/down)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway