From: sam on 17 Mar 2010 12:50 How do I keep my log.nmbd from getting so big and bringing my web server to a grinding halt? Thanks, s
From: Lew Pitcher on 17 Mar 2010 13:40 On March 17, 2010 12:50, in alt.os.linux.slackware, nospam(a)nospam.spam wrote: > How do I keep my log.nmbd from getting so big and > bringing my web server to a grinding halt? First off, why would a Samba log bring your web server to a halt? Are you trying to serve the contents of the log through your server, or is it a space/access-time problem? As for /how/ to keep log.nmbd small, set up a logrotate schedule for it. Either add a text-file to /etc/logrotate.d/ with the specific rotation instructions, or modify your /etc/logrotate.conf, again with the specific rotation instructions. When I ran Samba on my server, my logrotate.conf contained (among other things) /var/log/samba/* { rotate 7 daily ifempty sharedscripts olddir /var/log/archive/samba } which rotated the samba logs into my (locally created) /var/log/archive/samba directory. Your logrotate rules will likely be different. -- Lew Pitcher Master Codewright & JOAT-in-training | Registered Linux User #112576 Me: http://pitcher.digitalfreehold.ca/ | Just Linux: http://justlinux.ca/ ---------- Slackware - Because I know what I'm doing. ------
From: sam on 17 Mar 2010 14:18 In article <6u8on.102697$Ye4.20415(a)newsfe11.iad>, lpitcher(a)teksavvy.com says... > > On March 17, 2010 12:50, in alt.os.linux.slackware, nospam(a)nospam.spam > wrote: > > > How do I keep my log.nmbd from getting so big and > > bringing my web server to a grinding halt? > > First off, why would a Samba log bring your web server to a halt? Are you > trying to serve the contents of the log through your server, or is it a > space/access-time problem? > > As for /how/ to keep log.nmbd small, set up a logrotate schedule for it. > Either add a text-file to /etc/logrotate.d/ with the specific rotation > instructions, or modify your /etc/logrotate.conf, again with the specific > rotation instructions. > > When I ran Samba on my server, my logrotate.conf contained (among other > things) > /var/log/samba/* { > rotate 7 > daily > ifempty > sharedscripts > olddir /var/log/archive/samba > } > which rotated the samba logs into my (locally > created) /var/log/archive/samba directory. Your logrotate rules will likely > be different. Hi Lew, Thanks 1 It's a space issue. It leaves 0 space for anything to happen. s
From: Lew Pitcher on 17 Mar 2010 14:51 On March 17, 2010 14:18, in alt.os.linux.slackware, nospam(a)nospam.spam wrote: > In article <6u8on.102697$Ye4.20415(a)newsfe11.iad>, lpitcher(a)teksavvy.com > says... >> >> On March 17, 2010 12:50, in alt.os.linux.slackware, nospam(a)nospam.spam >> wrote: >> >> > How do I keep my log.nmbd from getting so big and >> > bringing my web server to a grinding halt? >> >> First off, why would a Samba log bring your web server to a halt? Are you >> trying to serve the contents of the log through your server, or is it a >> space/access-time problem? >> >> As for /how/ to keep log.nmbd small, set up a logrotate schedule for it. >> Either add a text-file to /etc/logrotate.d/ with the specific rotation >> instructions, or modify your /etc/logrotate.conf, again with the specific >> rotation instructions. >> >> When I ran Samba on my server, my logrotate.conf contained (among other >> things) >> /var/log/samba/* { >> rotate 7 >> daily >> ifempty >> sharedscripts >> olddir /var/log/archive/samba >> } >> which rotated the samba logs into my (locally >> created) /var/log/archive/samba directory. Your logrotate rules will >> likely be different. > > Hi Lew, > > Thanks > 1 It's a space issue. It leaves 0 space for > anything to happen. OK then. I'll add to my advice a bit: in your Samba configuration, you can set the "maximum log file size" for a Samba log. This isn't /really/ helpful, as all it does is split the log into multiple files, each one no more than the maximum size big. You'll wind up with a number of smaller logfiles, that total the size of one large logfile. But, with that, and a cron job, you can move and/or delete the older logfiles, freeing up space that will be needed by your webserver. With logrotate, you get the same sort of behaviour; old logs will be compressed and archived (really old logs will be discarded and deleted), and you'll still have space. You might also want to look into /why/ your Samba logs are getting big; either there's a lot of activity (and there probably shouldn't be, if you are running Samba for a home environment), or you are logging too much trivial information (which can be adjusted via the log level options in Samba), there are lots of errors (which will need to be diagnosed and fixed), or you just haven't maintained your log backup process (which probably is the case, if you haven't set up logrotate). Get the logs down to a reasonable size, and rotate them (keeping only /recent/ logs) and all should be well. Luck be with you -- Lew Pitcher Master Codewright & JOAT-in-training | Registered Linux User #112576 Me: http://pitcher.digitalfreehold.ca/ | Just Linux: http://justlinux.ca/ ---------- Slackware - Because I know what I'm doing. ------
From: GOEF on 21 Mar 2010 03:25 Lew Pitcher <lpitcher(a)teksavvy.com> trolled: Lew Pitcher is a domain thief. Read the full story at http://www.lewpitcher.ca
|
Pages: 1 Prev: Domain Thief Lew Pitcher Next: What's the state of bluetooth? |