Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: running out of space during cutting



Hello Klaus,

Sunday, August 31, 2003, 12:56:43 PM, you wrote:
...
>> What do you think about checking the oldest directory with the fuser
>> command. It shows open files and the pids which are accessing the files.
>> And if you find something then skip it.
>> 
>> Actual example:
>> 
>> stereo:~ # fuser /video/Der_König_von_Dulsberg/*/*
>> /video/Der_K\37777777766nig_von_Dulsberg/2003-08-17.14.51.50.14.rec/001.vdr:  8869  8871  8872  8873  8886  8890  8891  9123  9124  9125
>> /video/Der_K\37777777766nig_von_Dulsberg/2003-08-17.14.51.50.14.rec/index.vdr:  8869  8871  8872  8873  8886  8890  8891  9123  9124  9125

> Do you know whether this information (a directory being used by some
> other process) can be obtained without having to call an external
> program (fuser)?

> One problem I see here is that this doesn't seem to work with NFS
> mounted volumes...

> Klaus

An alternative seems to be the command lsof (list open files). This
has also an option for listing NFS mounted directories. But again its
an external command. But by googeling around in the related news
groups this seem to be the more powerful solution and the tip often
was to look into the source code to use the relevant parts of this
command to include it in your own code.

Here you will find the source for the debian distribution:
http://packages.qa.debian.org/l/lsof.html

But if this is to much effort to implement this check I think I can
live with the actual solution because it will not happen very often
that I cut the oldest recording on my disk and if this will happen
than I should make enough space so that no automatic delete occurs.
Maybe you can make a note in the manual about this circumstance.

Kind regards
Manfred




-- 
-------                   Manfred Schmidt-Voigt                  -------
-----                  Günzweg 10, 22393 Hamburg                   -----
-----                                                              -----
-------          mailto:manfred.schmidt-voigt@mannitec.de         -------



-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index