Counting Sessions
Posted in 2007
Topics: General Discussion
Hi, I'm Using IDS V10.00.UC5 on SUSE linux. I want to keep a count the number of sessions occurring hourly/daily on my instance. I was using a cron script to execute the following sql and store the result hourly; select DBINFO('sessionid') from systables where tabid = 99; Then I thought I could simply subtract the last session id from the current one to get the number of sessions used in that hour period. This doesn't seem to work as sometimes sessionids are smaller than ids taken from an earlier period. Anyone know if there's another way to do this? ta
On Dec 4, 7:14 am, Nog <n...@gfm.co.uk> wrote: > Hi, > > I'm Using IDS V10.00.UC5 on SUSE linux. > > I want to keep a count the number of sessions occurring hourly/daily > on my instance. I was using a cron script to execute the following > sql and store the result hourly; > > select DBINFO('sessionid') from systables where tabid = 99; > > Then I thought I could simply subtract the last session id from the > current one to get the number of sessions used in that hour period. > This doesn't seem to work as sometimes sessionids are smaller than ids > taken from an earlier period. > > Anyone know if there's another way to do this? > > ta I've never seen session ids go down. Is it possible that your session ids are wrapping past 2^31 and starting over? Art S. Kagel
On Dec 4, 12:23 pm, "Art S. Kagel" <art.ka...@gmail.com> wrote: > On Dec 4, 7:14 am, Nog <n...@gfm.co.uk> wrote: > > > > > Hi, > > > I'm Using IDS V10.00.UC5 on SUSE linux. > > > I want to keep a count the number of sessions occurring hourly/daily > > on my instance. I was using a cron script to execute the following > > sql and store the result hourly; > > > select DBINFO('sessionid') from systables where tabid = 99; > > > Then I thought I could simply subtract the last session id from the > > current one to get the number of sessions used in that hour period. > > This doesn't seem to work as sometimes sessionids are smaller than ids > > taken from an earlier period. > > > Anyone know if there's another way to do this? > > > ta > > I've never seen session ids go down. Is it possible that your session > ids are wrapping past 2^31 and starting over? > > Art S. Kagel No, it's not starting over as the id's go up again after the spurious one, here's an snippet from a fews days ago; Hour Session ID sessions count 01:00 27703795 --- 02:00 27715073 11278 03:00 27720194 5121 04:00 27722863 2669 05:00 27721660 -1203 06:00 27730787 9127 07:00 27732274 1487 anyone know of any good documentation on session id's and how they're generated?