Donate Share

sarg

Code

Programming Languages: C

License: GNU General Public License (GPL)

Repositories

browse code, statistics, last commit on 2009-11-12 cvs -d:pserver:anonymous@sarg.cvs.sourceforge.net:/cvsroot/sarg login

cvs -z3 -d:pserver:anonymous@sarg.cvs.sourceforge.net:/cvsroot/sarg co -P modulename

Show:

What's happening?

  • Followup: RE: Report by user (in old reports)

    On the issue of the directory: I tried to add as you recommended, but it did not work. It returns: date: invalid date `f1840.html ' He even raises the *. html in the export / and it contains links to the reports, but these links are wrong. They point to export / export / As for questions about whether the user exists before creating the. Html, also Do not Work. It returns: If...

    2009-11-13 19:57:25 UTC by sneves

  • sarg

    fmarchal committed patchset 103 of module sarg to the sarg CVS repository, changing 1 files.

    2009-11-12 12:21:28 UTC by fmarchal

  • Followup: RE: SARG with Ubuntu Server 9.04

    *Sarg-reports daily* did not skip any day. It just created the report for the previous day only. This is the expected behavior. If you want the reports of the missing days, extract the call to sarg in the debug output of sarg-reports and change the date. For instance, I took the line from your post and changed the date: /usr/bin/sarg -f /etc/squid/sarg.conf -d 10/11/2009 -o...

    2009-11-12 08:47:05 UTC by fmarchal

  • Followup: RE: Report by user (in old reports)

    You can detect if the user exists and skip if it doesn't exists with something like this: [ $(find . -type d -name "$user" -print -quit | wc -l) == 1 ] || continue You may place it just after the test that check that $user is not empty. The option -print is necessary for wc to have something to count. -quit interrupts the search at the first match instead of scanning the whole tree...

    2009-11-12 08:09:33 UTC by fmarchal

  • Followup: RE: SARG with Ubuntu Server 9.04

    Might of found out what was going wrong. It was looking at the DG logs which were being rotated to frequently. Sorry I didn't spot it earlier, it was plain old human error. I won't know until morning that it's going happy, I will report back with my results.

    2009-11-12 03:04:10 UTC by jarr0d

  • Followup: RE: SARG with Ubuntu Server 9.04

    Sorry about that stuff up, I was using the wrong machine. Now this is the box I am using. I have setup /etc/logrotate.d/squid as follows # # Logrotate fragment for squid. # /var/log/squid/*.log { # daily weekly compress delaycompress rotate 2 missingok nocreate...

    2009-11-11 00:03:17 UTC by jarr0d

  • Followup: RE: Report by user (in old reports)

    Hello again. Again, thank you for your attention. Last Saturday, I went to a meeting of a group of free software to which I participate and discuss a little about this subject. I got a little idea I have, joined with his, edited here and there and came to this script: # / bin / sh # CREATED AND ADAPTED BY SERGIO NEVES EM NOV_2009, in collaboration with FMARCHAL...

    2009-11-10 17:37:52 UTC by sneves

  • Followup: RE: Report by user (in old reports)

    The first command is not supposed to be run alone as it contains two undefined variables $user and $index that are replaced by empty strings. This is the reason for the ambiguous redirection. Moreover, since ".html" is not found, it outputs nothing. The error in the script is my fault. It is produced by the single quotes around the sed expression. Replace the single quotes by double quotes...

    2009-11-05 13:34:42 UTC by fmarchal

  • Followup: RE: Report by user (in old reports)

    Hum, I understand. Well, I tried again the first command, but he now returns: bash: $ index: ambiguous redirect I tried without the '>> index' at the end and did not return any "error", but did not generate anything. I did not know that the script could receive the variable USER has called on him. Interesting. =) Anyway, he returned: . / script f1059 sed:-e...

    2009-11-05 12:29:28 UTC by sneves

  • Followup: RE: Report by user (in old reports)

    Of course, I assumed your date would be formated as dd-mmm-yyyy. Here is the change to use the correct date. find export -name "$user.html" -exec sh -c 'p=$0 ; d=${p#export/} ; d=${d%%-*} ; d1=`echo "$d" | sed -e 's/\([0-9]*\)\([A-Z][a-z]*\)\([0-9]*\)/\3-\2-\1/'` ; date "+%s $d" --date "$d1" ' {} \; | sort -n | sed -e 's/[0-9]* //' >> $index I use a...

    2009-11-05 12:08:01 UTC by fmarchal

Our Numbers