Koozali.org: home of the SME Server

Open files On Server

Kelvin

Open files On Server
« on: March 20, 2002, 12:40:28 AM »
Hi,

Is there a way to find out if any files are opened from a workstation on the server ? I'm looking for something like the basic NetWatcher of Windows or better still the Server Manager utility from NT Server 4.0 ( obviously, there's no requirement for it to be graphical). A utility like top that does this would be nice (have not seen ntop - don't know where to find it - so I don't know if this will do the job).

The reason for this request is because while backing up the server from a workstation via a Windows based backup software, a few Access database files are always skipped because apparently they are still open (though we are sure all the other workstations have been shut down).

Kelvin

Scott Smith

Re: Open files On Server
« Reply #1 on: March 20, 2002, 12:45:14 AM »
lsof

command line, no fancy interface, but it works

Kelvin

Re: Open files On Server
« Reply #2 on: March 20, 2002, 12:46:25 AM »
OK. Found ntop and installed it. Will try it to see if this does what I need unless someone else knows a better program to use ?

Kelvin

Kelvin

Re: Open files On Server
« Reply #3 on: March 20, 2002, 12:50:02 AM »
Hi Scott,

Thanks for your reply. I posted another message before I saw yours. Can you tell me (being a typical newbie) if there is a command line option for lsof to say just check the files in the ibays instead of the whole server hard disk ?

Cheers,

Kelvin

Scott Smith

Re: Open files On Server
« Reply #4 on: March 20, 2002, 12:55:44 AM »
Actually, I'm not sure e-smith 4.x or SME 5.x come with lsof installed. However, you can get them here:

For e-smith 4.x:

ftp://ftp.rpmfind.net/linux/redhat/6.2/en/os/i386/RedHat/RPMS/lsof-4.47-2.i386.rpm

For SME 5.x:

ftp://ftp.rpmfind.net/linux/redhat/7.1/en/os/i386/RedHat/RPMS/lsof-4.51-1.i386.rpm

Disclaimer: I've not installed lsof on e-smith/SME, but I have used it on other platforms. In other words, I've not checked to see if there are other dependencies.

As to command line options, the man page is online here:

http://linux.ctyme.com/man/man1163.htm

I think you want to examing the +D option.

Kelvin

Re: Open files On Server
« Reply #5 on: March 20, 2002, 01:22:27 AM »
Thanks Scott. Will try as soon as I get a chance.

Kelvin

trevorb

Re: Open files On Server
« Reply #6 on: March 20, 2002, 04:16:59 AM »
If you want to look at ntop there is a thread discussing this at
http://forums.contribs.org/index.php?topic=12540.msg47058#msg47058

Trevor B

Kelvin wrote:
>
> Hi,
>
> Is there a way to find out if any files are opened from a
> workstation on the server ? I'm looking for something like
> the basic NetWatcher of Windows or better still the Server
> Manager utility from NT Server 4.0 ( obviously, there's no
> requirement for it to be graphical). A utility like top that
> does this would be nice (have not seen ntop - don't know
> where to find it - so I don't know if this will do the job).
>
> The reason for this request is because while backing up the
> server from a workstation via a Windows based backup
> software, a few Access database files are always skipped
> because apparently they are still open (though we are sure
> all the other workstations have been shut down).
>
> Kelvin

Michael

Re: Open files On Server
« Reply #7 on: March 20, 2002, 12:28:02 PM »
I think you're only interested in files which are in use by the workstations. These are served using samba. So simply use "smbstatus" on the command line to get a list of the services and files in use. And if you ever write a perl script to be included in the server manager, tell us. I'd be interested in it :-).

Michael

Kelvin

Re: Open files On Server
« Reply #8 on: March 20, 2002, 12:43:12 PM »
Thanks Michael.

You're right about smbstatus. That's all I really want to find out in this case.

Anyway, if I finally work out this frustrating thing-a-ma-bob called ntop, it should prove to be a usefull diagnostic / monitoring tool to have under my belt as well.

So thanks everyone.

Kelvin