Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logging time (timestamp) without transmitting it

Status
Not open for further replies.

heneghan

Technical User
Jul 31, 2005
1
US
I am trying to timestamp a procomm log, but I don't want
the time stamp to be transmitted, just show up in the log!
Thanks in advance!
Joe Heneghan
 
Joe, are you trying to timestamp the data received in the logfile, or create a logfile based on the time and date on the PC? Either way, I have some examples on the samples page of my site that should get you started.


 
I'am looking for a simular script.
All i want is to open a vt100 session and timetamp every line that comes in tot the terminal in logfile and/or screenoutput.
 
Another user sent me this script:


in the past, but it only stamps every 60 seconds instead of every line.

To do what you want with every line, you would need to use the rget command (which causes data to not appear to the screen) to first get the line from the screen. You would then need to create the time stamp, probably using ltimeints or the $DATE and $TIME system variables. Finally, you would use strcat to combine the timestamp and the line, and then use fputs to write that to an open text file.


 
You could do something like the following, this only sends to the terminal window not the remote device and will be captured in the log file.

string DateString,TimeString,timestmp
proc main

ltimestrs $LTIME DateString TimeString


; Now concatenate the capture filename together

strcat timestmp DateString
strcat timestmp " "
strcat timestmp TimeString
termmsg "* %s *`r`n" timestmp

endproc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top