LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 02-03-2008, 09:34 PM   #1
champak
LQ Newbie
 
Registered: Nov 2007
Posts: 20

Rep: Reputation: 0
lsof in Solaris


Hi...
I have written a cronjob to invoke a script that would transfer files based on some criteria.
Consider folders A and B. Say I FTP a large file to A. Before the file gets fully transfered say the cronjob gets invoked. The script will move the file before its fully transfered. To detect such I used "lsof" in Redhat.
lsof |grep <filename> will give me the filename that is currently under transfer.But this is not working exactly the same way in Solaris..
I mean the command is working but it doesn list the file that is currently under transfer. It doesn give the open file descriptors..It displays the devices and stuff but not the file that is currently under transfer..

Any ideas??
Thanks..
 
Old 02-04-2008, 02:00 AM   #2
champak
LQ Newbie
 
Registered: Nov 2007
Posts: 20

Original Poster
Rep: Reputation: 0
Correction to previous post

Last post I had said that "lsof" is not working properly in Solaris.
It does works fine but like this..

Say I transfer a file to my home directory through ftp, I can detect the file transfer using "lsof |grep <filename>"

But the same file if I transfer to a directory, outside my home directory Im not able to detect. I own the target directory and I have given 777 permissions to it. Even then also lsof is not listing the file..

Why is this?

Any ideas..

Thanks
 
Old 02-04-2008, 10:52 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,520

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Can you provide more details about the ftp transfer and lsof commands used. i.e. a small scenario showing both the working and the failing case.
lsof is not part of Solaris and is known to have some limitations, especially with Solaris 10 and newer.
You may want to use pfiles instead.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
lsof permission champak Programming 4 11-26-2007 03:57 AM
lsof redirect WRXSTi Programming 8 10-02-2006 04:45 PM
What to do when lsof fails.... SpacedCowboy Linux - Security 2 10-29-2005 03:39 PM
Lsof Is Useless?? Philip_38 Linux - Software 3 01-30-2005 10:24 AM
C Library for lsof loki.guz_BR Linux - Security 1 05-19-2004 03:19 PM


All times are GMT -5. The time now is 08:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration