Steve Edwards wrote: > Or, as a quick & dirty... > DATE=$(date +%F-%H-%M-%S) > COUNT=$(sudo /usr/sbin/asterisk -r -x "sip show channels" | wc -l) > echo $DATE $COUNT >>/tmp/channel-counts > > in a shell script executed every second in cron. > every *second* from cron? how the heck would I you do that? sub-minute accuracy from cron is something I don't know how to do.
Maybe it's a different version of cron...? The only way I would achieve that would be to run something every minute that self-perpetuated for the rest of that minute... for x in `seq 1 58`; do ( DATE=$(date +%F-%H-%M-%S) COUNT=$(sudo /usr/sbin/asterisk -r -x "sip show channels" | wc -l) echo $DATE $COUNT >>/tmp/channel-counts ) & sleep 1s done which is honestly very messy. I promise I'm not being sarcastic. I actually *am* curious if there are versions of cron that will go sub-minute. Moj _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
