testing for remote fs


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting testing for remote fs
# 1  
Old 11-05-2003
testing for remote fs

ok i need to test to make sure a remote fs is mounted.

im not finding anything.

the shell is ksh. wish i could tell you which version but it is the default version shipped w/ solaris 8.

df -Fnfs

that will give me a list of remotes..... mmm possably this is as close as i get?

Last edited by Optimus_P; 11-05-2003 at 12:38 PM..
# 2  
Old 11-05-2003
Maybe look at /etc/mnttab
# 3  
Old 11-05-2003
Quote:
Originally posted by Ygor
Maybe look at /etc/mnttab
going that route requires alot of work.

sucks i cant find any test condtions for filesystems.
# 4  
Old 11-05-2003
How about:

df -n /usr/share | read junk junk fstype
[[ $fstype = nfs ]] && echo mounted
# 5  
Old 11-12-2003
You could always key off the return, for example:

df -Fnfs /usr/share || echo "/usr/share not mounted"

or better yet

df -Fnfs /usr/share || logger -p local2.err -t NFS "ERROR: /usr/share not mounted"

I like to feed syslog and use swatch or logwatch to handle errors. Like always, there are a million ways to accomplish the same task.

There are centralized tools out there for system health checks that can include watching mounts - Big Brother is a good example.

Cheers,

Keith

Last edited by kduffin; 11-17-2003 at 10:54 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

scp auto logon to remote using remote authorized_keys

Hi~ i have an authorized key which it made remote host(B). i want log on without password from local(A) to the remote host(B) using authorized key of remote host. what shell i do? anybody help me. (1 Reply)
Discussion started by: tomato00
1 Replies

2. Shell Programming and Scripting

awk remote multiple hosts print remote hostname and output

Hi all, i'm trying to gether multiple pattern on remote hosts, and trying to print hostname and the pattern, ssh remoteserver1 -C 'hostname 2>&1;cat /var/log/server1.log | awk -F ";" '"'"'{ print " "$2" "$5}'"'"'| sort | uniq -c | sort -g -r ' The output is the following, remoteserver1 ... (8 Replies)
Discussion started by: charli1
8 Replies

3. Shell Programming and Scripting

Script connect to remote server, not find files and exit only from remote server, but not from scrip

I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code TARFILE=${NAME}.tar TARGZFILE=${NAME}.tar.gz ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
Discussion started by: digioleg54
3 Replies

4. Shell Programming and Scripting

Check/get the exit status of a remote command executed on remote host through script

Geeks, Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s). Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies

5. Shell Programming and Scripting

How to store remote variable from remote cat file ??

I am trying to cat on a file located on remote server and assign it to remote variable. I have both local and remote variables. Running below script from local. test.sh J_NAME=XXX2 J_IP=XXX ssh $J_IP "ps auxw |grep java | grep -v grep |grep $J_NAME | awk '{print ... (2 Replies)
Discussion started by: oraclermanpt
2 Replies

6. UNIX for Dummies Questions & Answers

Remote FTP Backup -Tar archive+ encrypt+ split to a remote ftp

I have a huge directoy(200+ gb) for backup. I want upload the tar file(split files) simultaneous to a remote ftp. (pipeline, stdout, stdin etc.) I don't want write a data to local hdd. I have a ssd hdd. thanks. this code doesn't work.( yes i know the problem is split command!) tar cvzf -... (8 Replies)
Discussion started by: tara123
8 Replies

7. Shell Programming and Scripting

Triggering remote UNIX shell script from Remote desktop

I m trying to run a batch script in remote desktop which executes unix commands on the unix server...the problem is i wnt the output in HTML format.so in my batch script i m giving the cmd like ssh hostname path ksh HC_Report.ksh>out.html ...but it generates the HTML file in remote desktop .i... (2 Replies)
Discussion started by: navsan
2 Replies

8. Debian

Launch remote gui apps in remote hosts

Hi, I've been looking for a way to execute a console program (is in windows but by now I accept the linux way) from a linux machine, but this program has to be opened in the remote side. Linux machine acts only as a "signaling" host. My program has to open the camera in the remote side, but only... (7 Replies)
Discussion started by: zauberberg
7 Replies

9. Solaris

how to login with ssh to remote system with out applying the remote root/usr password

how to login with ssh to remote system with out applying the remote root/user password with rlogin we can ujse .rhosts file but with ssh howits possible plz guide (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

10. Solaris

Remote Dial-up Modem Printing With Out Cpu On The Remote Side!

I am looking for a dial-up remote printing solution as under : 1. We have a Centralized location where Sun Solaris (A) is installed. From here printing command will be despatched. 2. This printing command will be routed to WAN cloud to Main Branches (B1,B2,B3)and from there, printer at... (0 Replies)
Discussion started by: jayvee
0 Replies
Login or Register to Ask a Question