LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 02-03-2008, 08: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, 01: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, 09:52 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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



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
C Library for lsof loki.guz_BR Linux - Security 2 01-08-2021 01:06 AM
lsof permission champak Programming 4 11-26-2007 02:57 AM
lsof redirect WRXSTi Programming 8 10-02-2006 03:45 PM
What to do when lsof fails.... SpacedCowboy Linux - Security 2 10-29-2005 02:39 PM
Lsof Is Useless?? Philip_38 Linux - Software 3 01-30-2005 09:24 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 11:05 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration