supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* >2G file support for svlogd?
@ 2013-06-19 18:07 Charlie Brady
  2013-06-19 18:10 ` Charlie Brady
  0 siblings, 1 reply; 3+ messages in thread
From: Charlie Brady @ 2013-06-19 18:07 UTC (permalink / raw)
  To: supervision


Has anyone built svlogd to handle large files?

If svlogd is set up for time based log rotation:

s0
t86400

with a very verbose service, then we see:

nanosleep({3, 0}, 0xbf9a245c)           = 0
write(6, "rverCore.setThreadName: (ServerCore.java:96) Renamed thread
to UspService-InternalServer-ServerMain\n", 100) = -1 EFBIG (File too
large)
write(2, "svlogd: pausing: unable to write to current:
/var/log/mom-server: file too big\n", 79) = 79

..so it's trying to write, getting EFBIG, sleeping, trying to write etc...



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: >2G file support for svlogd?
  2013-06-19 18:07 >2G file support for svlogd? Charlie Brady
@ 2013-06-19 18:10 ` Charlie Brady
  2013-06-19 18:58   ` Solved (Re: >2G file support for svlogd?) Charlie Brady
  0 siblings, 1 reply; 3+ messages in thread
From: Charlie Brady @ 2013-06-19 18:10 UTC (permalink / raw)
  To: supervision


On Wed, 19 Jun 2013, Charlie Brady wrote:

> Has anyone built svlogd to handle large files?

It looks like O_LARGEFILE is used when opening '.' but not when opening 
'current'.

[root@dl360p-g8 ~]# for i in $(seq 1 1048576) ; do cat /tmp/psfax ; done | 
strace -s4000 -o/tmp/svlogd.trace ./usr/bin/svlogd -t /var/log/logtest/^C
...
svlogd: pausing: unable to write to current: /var/log/logtest/: file too 
big
svlogd: pausing: unable to write to current: /var/log/logtest/: file too 
big
svlogd: pausing: unable to write to current: /var/log/logtest/: file too 
big
^C
[root@dl360p-g8 ~]# grep LARGE /tmp/svlogd.trace
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 6
[root@dl360p-g8 ~]# 
[root@dl360p-g8 ~]# grep current /tmp/svlogd.trace 
stat64("current", {st_mode=S_IFREG|0644, st_size=2147483647, ...}) = 0
rename("current", "@4000000051afe936084b38ec.u") = 0
open("current", O_WRONLY|O_CREAT|O_APPEND|O_NONBLOCK, 0600) = 6
^C
[root@dl360p-g8 ~]# 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Solved (Re: >2G file support for svlogd?)
  2013-06-19 18:10 ` Charlie Brady
@ 2013-06-19 18:58   ` Charlie Brady
  0 siblings, 0 replies; 3+ messages in thread
From: Charlie Brady @ 2013-06-19 18:58 UTC (permalink / raw)
  To: supervision


On Wed, 19 Jun 2013, Charlie Brady wrote:

> 
> On Wed, 19 Jun 2013, Charlie Brady wrote:
> 
> > Has anyone built svlogd to handle large files?
> 
> It looks like O_LARGEFILE is used when opening '.' but not when opening 
> 'current'.

...
#Change the conf-cc and conf-ld to enable large file support
echo 'gcc -O2 -Wall -D_FILE_OFFSET_BITS=64'    >src/conf-cc
echo 'gcc -s -Os -pipe' >src/conf-ld
./package/compile
...

[root@sdfds ~]# fg
for i in $(seq 1 1048576);
do
    cat /tmp/psfax;
done | ./usr/bin/svlogd -t /var/tmp/log/
svlogd: pausing: unable to write to current: /var/tmp/log/: out of disk 
space
svlogd: pausing: unable to write to current: /var/tmp/log/: out of disk 
space
svlogd: pausing: unable to write to current: /var/tmp/log/: out of disk 
space
svlogd: pausing: unable to write to current: /var/tmp/log/: out of disk 
space
svlogd: pausing: unable to write to current: /var/tmp/log/: out of disk 
space
svlogd: pausing: unable to write to current: /var/tmp/log/: out of disk 
space
svlogd: pausing: unable to write to current: /var/tmp/log/: out of disk 
space
...
svlogd: pausing: unable to write to current: /var/tmp/log/: out of disk 
space
svlogd: pausing: unable to write to current: /var/tmp/log/: out of disk 
space
^C
[root@sdfds ~]# 
[root@sdfds ~]# ls -l /var/tmp/log
total 3532880
-rw-r--r-- 1 root root         10 Jun 15 19:11 config
-rw-r--r-- 1 root root 3614130176 Jun 15 19:24 current
-rw------- 1 root root          0 Jun 15 19:12 lock
[root@sdfds ~]#


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-19 18:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-19 18:07 >2G file support for svlogd? Charlie Brady
2013-06-19 18:10 ` Charlie Brady
2013-06-19 18:58   ` Solved (Re: >2G file support for svlogd?) Charlie Brady

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).