1834149 Members
2158 Online
110064 Solutions
New Discussion

file size limit

 
brian_31
Super Advisor

file size limit

I have a situation here that there are certain apps that create log files and there seems to be no limit? My question is there a limit i can set for the size of a log file or anyfile in a filesystem? Other question is the core file? who can create it? Just anyone?

Thanks
Brian
9 REPLIES 9
Christopher McCray_1
Honored Contributor

Re: file size limit

I believe there is no limit to the file size set, as long as you have disk/file system space it will grow. You can write scripts to monitor file sizes or check them manually every day.

Cor files are the result of an application or the os have an internal error and the file is the output which can be analyzed to find problems. They are not always fatal.

Hope this helps.

Chris
It wasn't me!!!!
S.K. Chan
Honored Contributor

Re: file size limit

I think it depends. For example I used to limit my snmpd.log file by setting SNMP_LOG_SIZE variable.

Also you can limit those nasty core files which can be created by anyone when program crashes. I think for that you can use the "ulimit" command with -c option.

Rita C Workman
Honored Contributor

Re: file size limit

Well if you have largefiles set on your filesystem than large files can be created. You may want to check 'ulimit' to restrict file size.

Now for who can create a core...seems to me everybody is creating them some days. Cores can be created when something panics or aborts, that could be the system or an application.

Hope that helps,
Rita
harry d brown jr
Honored Contributor

Re: file size limit

Maybe you want to turn quota's on? I've never used them, maybe someone else can give more details?

live free or die

harry
Live Free or Die
brian_31
Super Advisor

Re: file size limit

Hi Rita/Chan

According to man core it says that *A process with an effective user id diff from its real user id does not produce core image*. What does this mean?

Brian
Roger Baptiste
Honored Contributor

Re: file size limit

hi,

you can limit the core file
size by using ulimit -c command in the
user profile file.

Log file size cannot be
limited directly. You can
maintain it by moving/trimming it at regular
intervals (week or so).
You can also create a
small Filesystem for the
logfile location and restrict
its size.

-Raj
Take it easy.
harry d brown jr
Honored Contributor

Re: file size limit

From the man pages:

man 5 quota

Disk quotas can be used by the system administrator to limit the
number of files and file blocks owned by a user on a per-file-system
basis. Separate limits can be established for both the number of
files (inodes) and the number of 1-Kbyte blocks for each user. A soft
(preferred) and a hard limit are established.


---> Of course if you turn this feature on, you will have extra overhead. So use it wisely.

live free or die
harry
Live Free or Die
S.K. Chan
Honored Contributor

Re: file size limit

Hi Brian,
Answer to your question ..
*A process with an effective user id diff from its real user id does not produce core image*.

I think what it means is.. say you got program A which called program B. Both programs have different owners. If B crashes, it will not create core file because it's effective UID (ie UID of B) is different from its real UID (ie UID of A).