Re: report showing who logged in/out of nt 4 server
From: Al Dunbar (LuigiDunbar@hotmail.com)Date: 03/10/02
- Previous message: Jason Pirsley: "Welcome to WINUTILS"
- In reply to: robot: "Re: report showing who logged in/out of nt 4 server"
- Next in thread: Al Dunbar: "Re: report showing who logged in/out of nt 4 server"
- Reply: Al Dunbar: "Re: report showing who logged in/out of nt 4 server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Al Dunbar" <LuigiDunbar@hotmail.com> Date: Sun, 10 Mar 2002 01:06:42 GMT
"robot" <nospam@antispam.com> wrote in message
news:D4Jh8.28951$ro5.13733742@typhoon.ne.ipsvc.net...
> Thank you Al for the suggestion. Being inexperienced in this, I am not
sure
> how to script the kixtart approach. Would it be possible for you to post a
> small segment of code that demonstrates what you did?
It is shown below. Cut-and-paste with care, as the "$tab" variable is set to
a string containing a tab character, not the series of space characters that
my newsreader editor will substitute for it. Also, the "$_site_LogRoot"
variable is set elsewhere to the UNC where the \log\sessions\ directory is
found. That directory needs to be read-write-able by all users. Finally, the
statement that follows the one that defines the "$_tab" variable is wrapped
onto the following line.
The gist of this is that the active log file never gets too long, as it is
named yyymmdd.txt. At the end of each month I run a batch file that
concatenates the month's log files into one representing the entire month.
To display one of these log files, another batch file concatenates them all
into one temp file, adds a header line, and loads the works into excel with:
start excel %temp%\logfile.txt
The fields included are:
date, in yyyy-mm-dd format
time, in hh:mm format
logonserver (authenticating bdc)
workstation name
responsibility centre (*)
username
The responsibility centre is a code that is specific to our environment, and
indicates the financial coding for each facility in our organization. All
servers belonging to such a facility are named such that this code forms the
2nd, 3rd, and 4th characters of the name. It is there only to help identify
when we have "guests" from elsewhere.
/Al
;;;;;;;;;;;;;;
; extract various fields and generate the log record to be written
$__hm = substr(@time,1,5)
$__mm = substr(@date,6,2)
$__dd = substr(@date,9,2)
$__yy = substr(@date,1,4)
$__rc = substr(@homeshr,4,3)
$tab = ' '
$_sessions_data =
'$__yy-$__mm-$__dd$tab$__hm$tab@lserver$tab@wksta$tab$__rc$tab@userid'
; update the log file
$_sessions_file = '$_site_LogRoot\log\sessions\$__yy$__mm$__dd.txt'
shell 'command.com /c >>$_sessions_file echo.$_sessions_data'
;;;;;;;;;;;;;;
> many thanks.
>
> "Al Dunbar" <LuigiDunbar@hotmail.com> wrote in message
> news:DrCh8.87073$kb.5433857@news1.calgary.shaw.ca...
> > Do you have login scripts? If so, add code to them to capture the info
you
> > want (date, time, username, workstation name, more?) and write it to a
> file.
> > Then write a script that you run periodically to load this info into
> excel.
> >
> > We have done this in batch and kixtart, and may soon re-do it in WSH.
> >
> > /Al
> >
> > "robot" <nospam@antispam.com> wrote in message
> > news:I1ph8.27550$ro5.12983450@typhoon.ne.ipsvc.net...
> > > Newbie admin here with basic need. I would like to get a weekly report
> > > showing when users have logged into and out of our win nt 4 server.
> > Ideally,
> > > it should be in a format I could read with Access, but I'm willing to
> > settle
> > > for anything, at least to start.
> > >
> > > I would expect this to be easy and basic, but I'm not sure where to
> look.
> > >
> > > All suggestions appreciated.
> > >
> > > thanks
> > >
> > >
> >
> >
>
>
- Next message: robot: "Re: report showing who logged in/out of nt 4 server"
- Previous message: Jason Pirsley: "Welcome to WINUTILS"
- In reply to: robot: "Re: report showing who logged in/out of nt 4 server"
- Next in thread: Al Dunbar: "Re: report showing who logged in/out of nt 4 server"
- Reply: Al Dunbar: "Re: report showing who logged in/out of nt 4 server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|