Help with fuser


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Help with fuser
# 8  
Old 04-07-2005
This particular code doesn't do that:
That's why i wrote something like, it doesn't write after every minute, for that there is a small script which uses prstat.
Presently i am somewhere else thats why i was unable to give you the code.

Further i am unable to understand the meaning of your second post.
Please clarify.
# 9  
Old 04-07-2005
Quote:
Originally Posted by vibhor_agarwali
This particular code doesn't do that:
That's why i wrote something like, it doesn't write after every minute, for that there is a small script which uses prstat.
Presently i am somewhere else thats why i was unable to give you the code.

Further i am unable to understand the meaning of your second post.
Please clarify.
i hate to say this ... but please clarify your last post ...

which code doesn't do what?
what does the script look like?

just wait until you get to where you need to be before you answer this post ...
# 10  
Old 04-07-2005
Quote:
Originally Posted by vibhor_agarwali
Oops,

You totally misunderstood me, what you are talking about is perfeclty ok.

But when i do a Cat, the background process which was writing to that file stopped. ( I found out this by doing a ps -ef | grep name_of_bak_ground )

It showed stopped, whats this stopped and it never resumed.
I thought to do a fuser, so when the process is not writing then i should Cat the file, but on using fuser the same thing happened.
My backgournd process stopped again. Why?

I can;t do a tail because i need the whole file, so what should i do now.

Ahh, you were talking about the script stopping... I believe you can restart a script if it is "stopped" with the kill command.

From teh man page.

26 SIGCONT Continue Run a stopped process


Run this.

# Kill -26 <pid>
# 11  
Old 04-18-2005
Phew,

Back to my workstation.

I was using:
prstat -n 5 1 >> file_name &
This stopped the process even on doing a ls.

But your suggestion:
prstat -n 5 1 < /dev/null >> file_name &
Worked perfect.

Can you give me a hint, what is achieved by doing < /dev/null.

Kill -26 <pid>
isn't starting my stopped process, it still remains stopped.

Thanks
# 12  
Old 04-18-2005
STDIN is set to /dev/null so any action on the keyboard doesn't distract the process ...

per "man -s 3HEAD signal" on a solaris box ... 26 is stopped ... you might be sending the wrong signal ...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unable to get pid from fuser

bash-3.2$ fuser -f /bin/nohup.out /bin/nohup.out: 13136o 13111o The pid is 13136. Can you tell me how can i extract just the pid 13136 from the above output ? bash-3.2$ uname -a SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v I was trying on this lines but i get strange... (3 Replies)
Discussion started by: mohtashims
3 Replies

2. UNIX for Advanced & Expert Users

Fuser alternative OR running fuser on a script

Hi, Not sure whether there is a fuser alternative or any better way to check for file in use or not. I am wanting to check whether files are in use or not before removing them. Using fuser, the awk seems to be giving me 'weird' output not to mention that it is giving me 2 lines instead of... (0 Replies)
Discussion started by: newbie_01
0 Replies

3. AIX

Fuser on VXFS not reporting processes

I have a perl script like : #! /usr/bin/perl open FILE1,">/tmp/openfile.test.out"; open FILE2,"</tmp/openfile.test.in"; open FILE3,">/data/openfile.test.out"; open FILE4,"</data/openfile.test.in"; <STDIN>; close FILE1; close FILE2; close FILE3; close FILE4; /tmp is jfs2... (0 Replies)
Discussion started by: petervg
0 Replies

4. UNIX for Dummies Questions & Answers

fuser on aix vs. linux

Pls. advise why on AIX the exit status is always '0' and on Linux it is always '1' even if the I just created a new file. I'm thinking if there is a background process monitoring the created 'file1' on AIX even if it is just a dummy or new file. How can I resolve this. (I need to justify that... (1 Reply)
Discussion started by: budz26
1 Replies

5. UNIX for Dummies Questions & Answers

fuser

if filename.txt is in used, exit, else continue. i tried to use fuser -c filename.txt, but returned bunch out PIDs eventhough filename.txt is not in used. any idea ? (10 Replies)
Discussion started by: tjmannonline
10 Replies

6. Solaris

FUSER problems

Greetings, I need help understanding why FUSER will not bring back PSID's on mounted filesystems. Is this a common error? Thanks in advance for your feedback. (11 Replies)
Discussion started by: Harleyrci
11 Replies

7. UNIX for Dummies Questions & Answers

fuser

Anyone ever use fuser, i tried this command fuser /database.bk but it only returns datbase.bk: I read some of the forums online, one of them said when he used fuser, it broke down the box, i really don't want that happen. I thought fuser is to see who is accessing that file, right? any... (8 Replies)
Discussion started by: adrianlearnpro
8 Replies

8. Shell Programming and Scripting

help needed in fuser command

Hi all, I want to know if fuser command can be used to check if a file is being written or not??? Thanks In Advance Anju (1 Reply)
Discussion started by: anju
1 Replies

9. UNIX for Advanced & Expert Users

fuser ?? Look at the script !!

#SCRIPT TO CHECK WHO HAS ACCESSED THE LOG/FILE IN PAST 'N' MINUTES, AND MAIL ACCORDINGLY. MYPATH="/clocal/mqbrkrs/user/mqsiadm/sanjay/" MAIL_RECIPIENTS="abc@xyz.com" Subject="File accessed in last few minutes" >tempmail.txt >tempfind.txt find "$MYPATH" -type f -amin -1 > tempfind.txt cat... (0 Replies)
Discussion started by: varungupta
0 Replies

10. AIX

fuser brought down the box

I issued fuser -k -x -u ./amqcc_r It brought down the whole box The unix admin says if I had issued fuser -k -x -u amqcc_r then it would have not brouht down the box. Does it make sense to you guys (5 Replies)
Discussion started by: bandaru
5 Replies
Login or Register to Ask a Question