Struggling with mkfifo


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Struggling with mkfifo
# 15  
Old 04-15-2004
I agree there is an nfs bug here. I still would like to know if nodevs is set. What does "nfsstat -m" say?
# 16  
Old 04-15-2004
Quote:
Originally posted by Driver
Now as to why my program works while the shell doesn't... I think that maybe NFS cannot handle the open() performed by the shells, because it will be something along the lines of O_CREAT | O_TRUNC, since you use a single ``>'' (create file) as opposed to ``>>'' (append to file)...
Is it because the shell issue by default an OPEN() statement as opposed to a CREAT()??

The man page for CREAT() tells me "this system call creates a new regular file or prepares to rewrite an existing file...".

The man page for OPEN() seem to hint that when a file is first created with that system call using the general flag O_CREAT.

The first one seems to make more sense than the latter to me. Regardless of the file-system in use. It makes me think that I would better off learning C to circumvent this type of issues...
# 17  
Old 04-15-2004
Quote:
Originally posted by Perderabo
I agree there is an nfs bug here. I still would like to know if nodevs is set. What does "nfsstat -m" say?
There you go:
[dev1@la]/home/dev1% nfsstat -m
/home/dev1 from cafs:/shared/homedirs/dev1 (Addr 10.27.230.133)
Flags: vers=3,proto=udp,auth=unix,soft,intr,link,symlink,rsize=8192,wsize=8192,retrans=5
Lookups: srtt= 7 ( 17ms), dev= 3 ( 15ms), cur= 2 ( 40ms)
Reads: srtt= 8 ( 20ms), dev= 4 ( 20ms), cur= 3 ( 60ms)
Writes: srtt= 17 ( 42ms), dev= 6 ( 30ms), cur= 5 (100ms)
All: srtt= 7 ( 17ms), dev= 3 ( 15ms), cur= 2 ( 40ms)

/admin from oak:/admin (Addr 176.36.50.231)
Flags: vers=3,proto=udp,auth=unix,hard,intr,link,symlink,rsize=8192,wsize=8192,retrans=5
Lookups: srtt= 8 ( 20ms), dev= 4 ( 20ms), cur= 3 ( 60ms)
Reads: srtt= 13 ( 32ms), dev= 7 ( 35ms), cur= 5 (100ms)
Writes: srtt= 1 ( 2ms), dev= 1 ( 5ms), cur= 0 ( 0ms)
All: srtt= 8 ( 20ms), dev= 4 ( 20ms), cur= 3 ( 60ms)

/home/labcop from opsla:/users/labcop (Addr 176.36.50.207)
Flags: vers=3,proto=udp,auth=unix,soft,intr,link,symlink,rsize=8192,wsize=8192,retrans=5
All: srtt= 0 ( 0ms), dev= 0 ( 0ms), cur= 0 ( 0ms)

/export from dbsla:/export1 (Addr 172.31.50.210)
Flags: vers=3,proto=udp,auth=unix,hard,intr,link,symlink,rsize=8192,wsize=8192,retrans=5
Lookups: srtt= 3 ( 7ms), dev= 3 ( 15ms), cur= 1 ( 20ms)
Reads: srtt= 1 ( 2ms), dev= 1 ( 5ms), cur= 0 ( 0ms)
Writes: srtt= 1 ( 2ms), dev= 1 ( 5ms), cur= 0 ( 0ms)
All: srtt= 5 ( 12ms), dev= 3 ( 15ms), cur= 2 ( 40ms)

[dev1@la]/home/dev1%
# 18  
Old 04-15-2004
Quote:
Originally posted by Driver
...the NFS implementation you're using does not support it.
Thanks for taking the time to help me with this. I appreciate it.

Quote:
Originally posted by Driver ...It can never hurt to know some C.
Though I may do more harm than good, I agree with you. Smilie Any book suggestion that could get me started?
# 19  
Old 04-15-2004
Well, it doesn't even have nodevs set. This is a very nasty bug because the behavior it exhibits is hard to understand. Bugs like that are a real problem when you're learning unix.

And yes, a deep understanding of the kernel can be gained by being a C programmer. And that is a big help with cases like this. Advanced Programming in the UNIX Environment by Richard Stevens is the best book I know of.

I would check to see if I had the latest nfs patches. But your system administrator will need to do that.
# 20  
Old 04-19-2004
Quote:
Originally posted by Perderabo
...This is a very nasty bug because the behavior it exhibits is hard to understand...
Thanks guys for all your help. I reported your findings to our SysAdmin.

Thanks again!
# 21  
Old 04-20-2004
I really enjoyed reading this thread.

Great job everyone.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parsing file: struggling against sed command

Hello fellows, Sure you can help this poor guy that is struggling against sed command, being unable to tame it I have a lot of files like this: From this one, I need to obtain values highlighted in bold/red To do so, I am executing this piece of code inside a loop: ... (10 Replies)
Discussion started by: manolain
10 Replies

2. UNIX for Dummies Questions & Answers

Struggling to combine two Greps statements

Greetings! I have been tasked to create a report off files we receive from our hardware suppliers. I need to grep these files for two fields 'Test_Version' and 'Model-Manufacturer' ; for each field, I need to capture their corresponding values. When running each statement separately, I get... (4 Replies)
Discussion started by: alan
4 Replies

3. Homework & Coursework Questions

Help with Mkfifo and exec

Hello guys! I am doing a project for the university and I have to do that a process has to create several children through fork(). The father process sends a pathname to each one through exec and the children must send to the father a list with the files from each directory. The father... (1 Reply)
Discussion started by: dano88
1 Replies

4. Programming

Help with Mkfifo and exec

Hello guys! I am doing a project for the university and I have to do that a process has to create several children through fork(). The father process sends a pathname to each one through exec and the children must send to the father a list with the files from each directory. The father is... (1 Reply)
Discussion started by: dano88
1 Replies

5. Shell Programming and Scripting

Struggling with AWK

I know this is an easy problem, but I've been struggling with it all morning and finally admit I need help. I have two files that I need to compare. After doing this the easy way (grep -F) I realize that there are other fields in file2 that match field1 in file1, so I turned to awk. I want to... (7 Replies)
Discussion started by: moldoverb
7 Replies

6. Shell Programming and Scripting

Struggling with arrays and delimited file

Hi, I am trying to use arrays in my script but can not seem to get it to work. I have a file called sections, this contains headers from a tripwire log file, separated by "@" but could be "," if easier The headers will be used to cut sections from the log file into another to be mailed. ... (5 Replies)
Discussion started by: pobman
5 Replies

7. Shell Programming and Scripting

struggling within awk

!#/bin/bash cat input.sh | awk ' { cur1=tolower($1) cur2=tolower($2) rsh $cur1 report | grep $cur2 # i just want to make the code line to work } ' the error which i get is .... ./madh1.sh: line 1: !#/bin/bash: No such file or directory awk: cmd. line:13: rsh $cur1 report |... (4 Replies)
Discussion started by: geeko
4 Replies

8. UNIX for Advanced & Expert Users

Help- Unix File Compare- Struggling

I had posted this earlier about 3 weeks ago and had recieved a response and I did sort both the files and the comm command is still not working. Can someone please assist me, I would really appreciate it. Below is what I am trying to do I need to compare File A with File B and create FILE C... (2 Replies)
Discussion started by: guiguy
2 Replies

9. Shell Programming and Scripting

Struggling with a text file

Hi, I am struggling with the following... I try to grep out information of a text file I got with lynx, a text browser. The text file I get from lynx with dump is attached in the bottom. What I would like to get is another file containing the astro-ph/98324 (number) and title and list of... (13 Replies)
Discussion started by: pau
13 Replies

10. UNIX for Dummies Questions & Answers

struggling with addusr ...

I'm completely new to UNIX, and having got the hang of directory navigation / creation (Just about), I think it is time to create an FTP account, so that I can upload a web site remotely. Herein lies the problem... 1: I cannot find a breakdown of addusr commands, so I cannot create a... (2 Replies)
Discussion started by: Dufty
2 Replies
Login or Register to Ask a Question