Berkeley CSUA MOTD:Entry 21788
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/24 [General] UID:1000 Activity:popular
5/24    

2001/7/12-13 [Computer/SW/WWW/Server] UID:21788 Activity:moderate
7/12    Hello MOTD, sorry to bother you (again) but you always know
        all the good (and bad) apps.  I am looking for log utilities
        to manage my apache logs.  I need something to rotate/gzip/etc.
        the logs and something to do simple analysis (and some historical)
        I'd prefer a script where i can see what is going on over a binary
        like webalizer, but whatever.  As for the rotatelog utility that
        comes with apache, it is broke in the version i am running and i
        don't want to upgrade.
        \_ If you want to do this correctly, you need Apache's rotatelogs
           utility, which almost certainly works in the version you have, but
           not in the way you want it to.  What rotatelogs does is accept web
           logs on stdin and write them to files with seconds-since-the-epoch
           filenames, starting a new file once a week.  You need that, because
           you can't move the logs out from under Apache safely (and if
           you do, you need to restart the server, which would cause
           disruption of service).  So then you just write a cron job to
           gzip the logs, and use analog to analyze them (analog will also
           analyze gzip'ped logs).  -tom
                \_ I have an error_log.0994896000 that goes back to yesterday
                   AND i have an error_log that goes back a long long time.
                   This is broke or (perhaps more likely) i am doing something
                   wrong. What would you suggest i am doing wrong?
                        \_ you have to set up rotatelogs on your ErrorLog
                           line as well as your TransferLog or CustomLog
                           line in httpd.conf.  -tom
           \_ Or cronolog, which lets you specify the naming scheme --dbushong
                \_ rotatelogs blows. cronolog is much better.  -ERic
           \_ Hey tom, why is it unsafe to move logs out from under Apache
              if you restart it?  Also, restarting Apache takes something
              on the order of seconds, so the disruption of service is
              nigh-invisble, is it not?
              - Rotates logs manually and restarts Apache
                \_ It depends what you're serving.  If someone is downloading
                   a big file, for example, either their download will hold up
                   the server respawning, or the download will be killed when
                   you restart.  If you have only small content and don't
                   care if you occasionally serve broken images or pages,
                   it's not so bad.  Still, it doesn't cost much to do it
                   right.  -tom
                   \_  I ran an app that was using jserv, and stopping and
                       restarting apache was a major pain.  rotatelogs was
                       the best solution.  -ERic
2025/05/24 [General] UID:1000 Activity:popular
5/24    

You may also be interested in these entries...
2010/4/19-5/10 [Computer/SW/Security, Computer/SW/WWW/Server] UID:53791 Activity:nil
4/18    http://Apache.org hacked:
        http://www.theinquirer.net/inquirer/news/1601103/apache-hacked
	...
2010/4/22-5/10 [Computer/SW/Languages/Misc] UID:53797 Activity:nil
4/22    In Linux is there an easy way to rename the scripts in /etc/rc?.d ?
        For example I want to set all the /etc/rc?.d/S91apache to S100apache
        so that it'll run the ramdisk BEFORE going to apache.
        \_ Sure, just move them.
           \_ I mean is there a script that will rename all of them
              for me? Like: setrc apache2 0 0 1 1 1 1
	...
2010/1/22-30 [Computer/HW/Laptop, Computer/SW/OS/OsX] UID:53655 Activity:high
1/22    looking to buy a new development laptop
        needs ssdrive, >6 hr possible batt life, and runs linux reasonably
        Anyone have a recommendation? Thx.
        \_ thinkpad t23 w ssdrive and battery inplace of drive bay
        \_ Ever wondered what RICHARD STALLMAN uses for a laptop?  Well,
           wonder no more!
	...
2010/1/12-29 [Computer/SW/Apps/Media] UID:53627 Activity:kinda low
1/12    How do I get a job NOT related to internet DNS social network cloud
        twitter GOOG EC2 amazon API ???
        \_ A CS job not related to API?
        \_ Chip design, or maybe software that does chip design. What is
           your major? How about game developer?
        \_ DNS? DNS? What era ado you live in? I agree that social network
	...
2009/12/7-2010/1/3 [Computer/HW/Memory, Computer/HW] UID:53574 Activity:nil
12/7    How many TCP retransmits are too many? Here is what I get:
            3594143433 segments received
            3760174421 segments send out
            3801829561 segments retransmited
        \_ rephrase. you can never have too much money. or too little.
           what is, is.
	...
2009/5/7-14 [Computer/SW/WWW/Server] UID:52963 Activity:nil
5/7     I am trying to reproduce a customer bug where their apache header
        has the content-encoding as the last line in the header.
        My test platform is running apache2.2 on ubuntu. Is there a way
        to do this ?i I have already read the apache 2.0 docs and
        I dont see anything obvious ? page is txt/html
	...
2009/3/8-17 [Computer/SW/Unix] UID:52685 Activity:kinda low
3/8     I'm reading about an old exploit where someone used a buffer overflow
        in a printer daemon to get "daemon privileges," which allowed them
        to use another exploit on the mail delivery program to get root.  I'm
        not sure what daemon privileges are.  Is there some set of priveleges
        that most daemons run on that is higher than user but lower than root?
        What are they?  I've never heard this before.
	...
2008/10/14-20 [Computer/SW/Languages/Misc, Computer/SW/Languages/Web] UID:51527 Activity:nil
10/14   2 apache 2.0.52 servers running on Linux boxes.  Identical httpd.conf
        files (except for ServerName).  But on one, if a CGI script takes
        longer than 300 seconds, it times out.  The other, not.  Why is that?
        \_ Perhaps network equipment configuration. Or try comparing settings
           in /proc/sys/net.
           \_ I ran /sbin/sysctl -a | grep tcp, all settings are the same.
	...
2008/9/3 [Computer/SW/Unix] UID:51030 Activity:nil
9/3     Okay, my sed and awk skills are obviously not up to par here.
        I want to only see the "500's" in my apache error log, how do I
        do that? I want to see the whole line, not just the 500 error code.
        Never mind, grep " 500 " is close enough.
	...
2008/3/10-13 [Computer/SW/SpamAssassin] UID:49412 Activity:nil
3/10    Is there a reliable way to control spam on soda?
        Can someone write an "any undergrad can do it" level FAQ?  Thanks.
        \_ echo "/dev/null" > ~/.forward
        \_ I use Thunderbird to check my soda mail.
        \_ Forward to gmail.  Let google's spam filter work for you.
        \_ I use spamassassin. I just checked and it caught all but one of
	...
2007/12/11-14 [Computer/SW/OS/Linux, Computer/SW/WWW/Server] UID:48785 Activity:nil
12/11   Apache/Linux question: I've got apache 2.0.52 on an idle redhat
        box (2.6.9-55 kernel).  Every so often one to four apache procs
        will run the cpu at 100% for any where from 15 to 90 mins, then
        drop back to normal.  USR and SYS time both increase to levels
        that the production boxes don't reach when serving traffic at
        noon.  I've checked apache and linux kernel versions, several
	...