![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mount a remote file system | mirciulicai | SUN Solaris | 4 | 05-30-2008 09:54 PM |
| File system and disc mount | ailnilanjan | SUN Solaris | 7 | 02-06-2008 09:34 AM |
| how to mount a file system of a remote machine to local file system | cy163 | UNIX for Dummies Questions & Answers | 2 | 01-31-2008 09:04 AM |
| System usage check | pushkar.verma | AIX | 3 | 01-25-2008 02:11 PM |
| How to mount/make a FAT system on Linux | kyoist | Filesystems, Disks and Memory | 2 | 10-23-2005 02:37 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
check the system mount
I have a system mount between , but sometimes the connection will be broken because the network unstable , so that some process will be fail to run , it will cause some problems to us , could suggest is there any method that I will be informed once connection is lost ? or could suggest any script that can check ( eg. every hour ) the connection is normal or not ? thx in advance.
|
|
|||||
|
No, I don't mind at all, only that I don't have it at home, only at work.
Anyway, here is a script that looks like it. Code:
#! /bin/sh
for ip in `cat file.txt`
do
ping -c 1 $ip > /dev/null
if [ $? -gt 0 ]; then echo -e "Host is down !\a";
else echo -e "Host is alive !"
fi
sleep 20;
done
The file.txt is a file where you have the list of IPs to ping, one IP on each line. And... by the way, it is a for loop, not while like I sayd before... .I hope it's usefull... Bye ! Last edited by Sergiu-IT; 04-01-2005 at 07:24 PM.. |
|
||||
|
know ping can check whether host is exist or not , however , what my problem is sometimes the host is exist but the mount connection is lost between two servers , I just want to make sure the mount is connected ,
The above script seems only check the remote host is exist or not , but can't know the status of the system mount , could suggest what can I do ? thx |
|
|||||
|
Quote:
But why don't you try to make a simple C program. Using sockets is not so difficult and that will be a much "professional" solution ![]() Sorry I couldn't help you... Bye ! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|