LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-11-2006, 07:08 AM   #1
Uday123
Member
 
Registered: Nov 2005
Posts: 80

Rep: Reputation: 15
command for finding the Network status


Hi all,
I need a command/script which gives the network status of particular system.I want know that whether it is in network or not.i want to use it in a shell script.
(Note: I know Ping will work for the same.But i need other than that.)

Please help me.
 
Old 01-11-2006, 07:13 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Why don't you want to do it with ping (it will help us giving you a specific answer)

There is checkservice but it goes further that checking a host is alive. Ping is really aimed at this...
 
Old 01-11-2006, 07:16 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
"Network Status" could mean a bunch of different things. as above, a ping would do fine, and personally my version of what network status would be would be wholly based around a ping. but maybe ICMP is filtered of blocked on your LAN, maybe you only care about a layer 2 link?
 
Old 01-11-2006, 08:17 AM   #4
gombwe
LQ Newbie
 
Registered: Aug 2005
Location: Zimbabwe
Posts: 11

Rep: Reputation: 0
You can use netstat -r or netstat -nr commands.I hope this will help you

Regards,

Gombwe
 
Old 01-11-2006, 08:19 AM   #5
gombwe
LQ Newbie
 
Registered: Aug 2005
Location: Zimbabwe
Posts: 11

Rep: Reputation: 0
You can use netstat -r or netstat -n commands.I hope this will help you

Regards,

Gombwe
 
Old 01-11-2006, 09:54 AM   #6
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
How about nmap?

nmap -sP 192.168.1.0/24 |grep Host

or

nmap -sP 192.168.1.2 |grep Host
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Network status from within C/C++ tbruer1138 Linux - Software 1 02-27-2005 12:11 AM
Ps command status description gstasica Linux - General 1 11-10-2004 09:01 AM
command(s) for checking ip status stupidloser Linux - Wireless Networking 5 08-10-2004 10:21 AM
Linux doesnt boot after showing finding modules OK status praveenk13 Linux - Software 0 02-26-2004 11:04 PM
ps (process status) command, PS_FORMAT how to set? alexander Linux - General 2 12-18-2002 03:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration