Page 1 of 1 1
Topic Options
#2040 - 2000-03-14 10:14 AM Collecting login data
Anonymous
Unregistered


I need to be able to collect information from workstations into a central file on the server as users login. I have had this working where it creates a separate file for each user, but I need the information to be clloected into 1 file for the whole network. I thought I had this working but then often got file in use type errors.

Any ideas ?

Top
#2041 - 2000-03-15 02:24 AM Re: Collecting login data
Anonymous
Unregistered


This is what I use:

:InfoLog
$OS=%OS%
If $OS <> "Windows_NT" $OS = "Windows_9x" Endif
RedirectOutput("$Xdrive\InfoLog.csv")
? "@IPADDRESS0,@WKSTA,$OS,@ADDRESS,@USERID,@DATE,@TIME"
RedirectOutput("")
return

Hope this helps,
Bonk

Top
#2042 - 2000-03-15 08:11 AM Re: Collecting login data
Anonymous
Unregistered


Hi there!

Maybe the example below can help you!
http://kixtart.to/script/board/ubbhtml/Forum2/HTML/000318.html

Regards,

Marc

------------------
M.A.C. Duiker (Marc)
Migration Specialist (MCSE)
MarcDuiker@CompuServe.com


Top
#2043 - 2000-03-16 09:11 AM Re: Collecting login data
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
here is the log file that i use in my system.

You call it with a GOSUB LogFile, edit $file to point where you want the log file to be.


code:

;****************************************************
:logfile ;v1.62 by Bryce Lindsay
;****************************************************
; write a log file of when people logon to the system

dim $file ;set temp $file variable
dim $linetowrite ;set test $linetowrite variable
dim $ip
dim $a
dim $b
dim $c
dim $d
dim $abcd


$file = "\\houston\syswr\log\logon.log"
$IP = @ipaddress0 ; #ip#
$a = LTRIM(SUBSTR(@IPADDRESS0, 1, 3)) ; #ip#
$b = LTRIM(SUBSTR(@IPADDRESS0, 5, 3)) ; #ip# Get the IP# and assign it to $ipadr
$c = LTRIM(SUBSTR(@IPADDRESS0, 9, 3)) ; #ip#
$d = LTRIM(SUBSTR(@IPADDRESS0, 13, 3)) ; #ip#
$IPADR = "$a.$b.$c.$d" ; #ip#
$linetowrite = "@fullname, @userid, @wksta/$abcd, @monthno/@mdayno/@year, @time"

:logfile2
if open(10, $file, 4) = 0
$q = writeline(10, $linetowrite + chr(13) + chr(10))
$q = close (10)
else
if open (10,$file,1) = 0
$q = close (10)
$q = open(10, $file, 4)
$q = writeline(10, "KIX Log file 1.5" + chr(13) + chr(10))
$q = writeline(10, "By bryce.lindsay@@oshmans.com" + chr(13) + chr(10))
$q = writeline(10, "===============================================" + chr(13) + chr(10))
$q = writeline(10, "Full Name, UserID, computername/IP#, Date, Time" + chr(13) + chr(10))
$q = close (10)
goto logfile2
else
? "Log File could Not be created."
endif
endif
return



Bryce

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.053 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org