Change .felix OSGi cache directory

조회 수: 7 (최근 30일)
Michael Robbert
Michael Robbert 2017년 10월 31일
댓글: Michael Robbert 2018년 4월 10일
When we use the figure command in Matlab there is a directory created called /tmp/.felix/ and our /tmp file system is very small so sometimes it fills up causing errors. Is there a way to direct Matlab to create that directory somewhere else?
  댓글 수: 11
Gregory
Gregory 2018년 4월 10일
Is there any reason to keep this files not delete. Perhaps making the delete automatic?
Michael Robbert
Michael Robbert 2018년 4월 10일
Gregory, That is a good question for the folks at Matlab. I presume, given the name implies it is a cache, that there is some performance benefit for keeping it around at least within a single session. While looking it up using Google I found references to its use outside of Matlab and if I recall correctly some people indicated that it had long term usefulness, but in our use case which is a shared cluster we can't have it persisting on local disks so we do clean up at the end of the users session. My original problem was that it was actually filling up a local partition thereby causing other problems.

댓글을 달려면 로그인하십시오.

채택된 답변

Michael Robbert
Michael Robbert 2017년 11월 2일
I contacted support and was given a list of variables and properties that are checked in order for a valid place to put this cache along with some suggestions on how to set it up. Here is an excerpt from that response that gives the list: There are a few locations where MATLAB will try to create this cache, in order of precedence (where MATLAB will try the next option if the specified variable is not set or the location which it specifies is not writable by the user who is running MATLAB):
- Directory specified by environment variable TMPDIR
- Directory specified by environment variable TMP
- Directory specified by environment variable TEMP
- Directory specified by Java property java.io.tmpdir
- Directory specified by environment variable HOME
- Directory specified by Java property user.home
Changing the TMPDIR variable to a different path would resolve the issue. However I would not suggest doing that as it might temper with the other processes that use the /tmp to store the temporary files.
What I would suggest is setting this variable 'TMPDIR' only in a given MATLAB session. This can be don by setting this variable in "startup.m" and resetting it back in "finish.m".
  댓글 수: 1
Walter Roberson
Walter Roberson 2017년 11월 2일
If you set it using setenv() then it only applies to the current process and children, and there would be no need to set it back in finish.m

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by