Not sure whether to post this in the scripting one or to advance and experts. Am posting on both since there is two things that am wanting to achieve.
Am currerntly having NFS server errors where it is having problems NFS mounting some of the volumes from the same NFS NAS server. Unfortunately, our UNIX SAs is the least helpful of the type of SAs that you can ever have all he can say is no problem that he/she can see.
I don't know which ones are having the NFS problems. so I decided I want to write a script to check which ones are having NFS mount problems but my script stalls whenever it reaches one that is having NFS problem and hence I cannot check the rest of the mount point.
To illustrate what am wanting to do, for example, the /etc/mnttab file have the following mount entries:
So what am wanting to achieve is giving df maybe only 10 seconds and if it does not response due to the NFS error, then terminate and process the next one in the list.
Would be best of course if someone know of a command besides df that I can use to check for NFS-filesystem mounts that are having problems.
Am thinking can I put the df into a script that creates/removes a lock file and run that script in the background then let the script sleep 10, then after 10 seconds, if the lock file still exists, it does a kill -9 of the script that is running in the background.
This is what I have in mind. Will it work?
Any response / feedback will be much appreciated. Thanks in advance.
What we use to do is , to redirect the stdout of df to a file, check for content change(i.e. number of lines) frequently sar every 10 secs, if that doesn't change the content of the file,then kill the last df command and go for next.
I think this is simple to implement and serves the purpose.
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hi there
After making a backup copy of it sometimes happens that when I want to unmount an NFS indicates the error:umount: /path_mount busy: Device busy (Error 16)
if I run lsoff, I can not find the process that is blocking the application.
I'm using OpenServer 5.0.2c as one NFS server ... (14 Replies)
Hi, i checked on rhel VPS is running sshd
(service ssh status)
But i cant connect via putty: "Network error: Connection refused"
Please which log file in my centos rhel linux i need to watch or what are steps to do to discover cause? (3 Replies)
I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this:
$ look "string" "/home/patrick/filename.txt"
However, this gives me the following message:
"look: /home/patrick/filename.txt: File too large"
So, I have two... (14 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi There,
I have been googling for this error and try solution provided but still not avail to resolve Kickstart Issue.
Any expert have encounter this problem? Thanks.
Regards,
Regmaster (4 Replies)
Hi,
I have small script written in korn shell. When it is called from different script, its dumping core, but no core dump when we run it standalone.
And its not dumping core if we run the script using "/bin/sh" instead of "ksh"
Can some body please help me how to resolve this issue.
... (9 Replies)
Hi
I have a script that execute every X minute for checking new files in a folder and converting to pdf.
Is there any way to start this script automatically on linux startup?. I use sleep function in script with infinite loop.
while
do
killall -u `whoami` -q soffice
soffice... (0 Replies)
Hello. I am new to the unix environment. Currently, I am taking existing COBOL source code and attempting to compile and run on our new UNIX machine. I have succesfully compiled an object. When I try to run I get the follwing error:
0509-036 Cannot load program abeunix.o because of the... (16 Replies)