Hey, this counterize II thing is pretty cool. I can see what searches bring people to my site. An item in the logs shows that someone is searching for ‘cron pisg’, which brings up this page. Pointything does not use cron to generate the PISG stats, but before I made the jump to an event driven system he did.
His current source code has the line $f['fd']=proc_open('/usr/share/pisg/pisg -ch '.$channel.' -d '.$logdir.' -ne '.$network.' -o '.$outfile.' -co pisg.cfg -nf '.$count,array(0=>array('pipe','w'),1=>array('pipe','r'),2=>array('pipe','r')),$f['pipes']);. To summarize, it runs pisg -ch channel -d logs -ne network -o outfile -co pisg.cfg -nf 1. The -ch and -ne arguments change what channel and network are mentioned in the output HTML. The -nf argument says how many files to process. Pointything creates one logfile per day, allowing PISG to only work on at most the last 60 days, depending on the channel’s configuration (which defaults to one day). For reference, my pisg.cfg is:
<set Format="eggdrop">
<set DailyActivity="31">
<set ShowActiveTimes="1">
<set ShowActiveNicks="1">
<set ShowBigNumbers="1">
<set ShowTopics="1">
<set ShowLines="1">
<set ShowWpl="1">
<set ShowCpl="1">
<set ShowWords="1">
<set ShowLastSeen="1">
<set ShowTime="1">
<set ShowRandQuote="1">
<set ShowFoulLine="1">
<set ShowVoices="1">
<set ShowMostNicks="1">
<set ShowSmileys="1">
<set ShowMostActiveByHour="1">
<set ShowOnlyTop="1">
<set NickTracking="0">
<set Maintainer="Pointything">
<set CacheDir="/var/cache/pisg">
<set PicLocation="../">
Pointything automagically sets up the process to parse only one channel’s data.
Now, if I were to have cron automagically run PISG for #gmg I would use pisg -ch #gmg -d /var/netpub/pointything2/logs -ne slashnet -o gmg.htm -co pisg.cfg -nf 1. To run it daily at 1:37 pm (as was done in the past), the full line would be: 37 13 * * * pisg -ch #gmg -d /var/netpub/pointything2/logs -ne slashnet -o gmg.htm -co pisg.cfg -nf.
To help you out, add this (which I copied right out of the manpage) to the top of your crontab file. It’ll help you out loads:
#field allowed values
#----- --------------
#minute 0-59
#hour 0-23
#day of month 1-31
#month 1-12 (or names, see below)
#day of week 0-7 (0 or 7 is Sun, or use names)
# minute hour dayofmonth month dayofweek command