Empty CSV file is created

This forum is retired in support of the new SurfLog for Automate plugin Forum. If you have not updated to Build 2.0.0.+ and are a current subscriber, you can log into Plugins4Automate.com and cancel the current subscription and then purchase the new version.

Forum to support the operation and usage of SurfLog plugin for LabTech
ddennell
Posts: 8
Joined: Wed Jun 05, 2019 2:16 am
4

Empty CSV file is created

Post by ddennell »

I am seeing no data returned on a Terminal Server.
I have run the command manually on the server, and the csv file is created but is only 1 KB and contains no data except for the column headers.
Examining the commands tab reveals this error at the "Read Text File" command

ERR an error occurred: Could not find file 'C:\Windows\LTSvc\Surflog\SurfLog.sql'.

Any help would be appreciated.

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Empty CSV file is created

Post by Cubert »

Thats accurate,

If no browers were used during the last 12 hours then there will be no data in the history to pull from. This will lead to a file with headers only but no data. We then try to make a sql file from the text file and that fails as there is no data to parse so SQL file is not created. Then script tries to download file and that's when script fails with error you see.


So things to check. Log into terminal server and run google over several web pages to makes sure a history is being created. Then monitor the next Surflog scan to see what the output is. You should see the pages you surfed. If you watch the commands (tab) window you will actually see the shell command we run to launch the probe. You can copy and paste that into a command window on the actual PC itself to see the output in real time. Are you getting any output errors from the manual run of the command to pull history?

ddennell
Posts: 8
Joined: Wed Jun 05, 2019 2:16 am
4

Re: Empty CSV file is created

Post by ddennell »

Hi, Thanks,
The server has plenty of browse activity going on each day,
I've run the command below directly on the server and it produces the csv file with no data.

The command runs with no errors, just returns almost straight away to the command prompt

c:\windows\ltsvc\SurfLog\BHV.exe /HistorySource 1 /LoadIE 1 /LoadFirefox 1 /LoadChrome 1 /LoadSafari 1 /scomma c:\windows\ltsvc\SurfLog\surflog.csv /VisitTimeFilterType 2 /VisitTimeFilterValue 24

Regards,

David

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Empty CSV file is created

Post by Cubert »

David,

If you copy that entire line... and run it in a command shell

Code: Select all

c:\windows\ltsvc\SurfLog\BHV.exe /HistorySource 1 /LoadIE 1 /LoadFirefox 1 /LoadChrome 1 /LoadSafari 1 /scomma c:\windows\ltsvc\SurfLog\surflog.csv /VisitTimeFilterType 2 /VisitTimeFilterValue 24
Do you get this?
Capture.PNG
Capture.PNG (31.46 KiB) Viewed 14007 times

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Empty CSV file is created

Post by Cubert »

If no errors do you now have a surflog.csv file? Try running shell as administrator to see if output changes.

Capture2.PNG
Capture2.PNG (63.21 KiB) Viewed 14007 times

ddennell
Posts: 8
Joined: Wed Jun 05, 2019 2:16 am
4

Re: Empty CSV file is created

Post by ddennell »

Running from command shell I get the Access is Denied error you indicate in your screenshot and no surflog.csv file is created.
Running from command shell as Administrator I get no error and the surflog.csv file is created but is 1KB and contains no data.
Running the script, I get the surflog.csv file created, but again it contains no data and the script fails with the error below,
Attachments
Surflog 1.jpg
Surflog 1.jpg (246.03 KiB) Viewed 13991 times

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Empty CSV file is created

Post by Cubert »

Ok I need you to run a second manual test for us.


On this terminal server using an Administrative shell window run the command again.

This time add the following switch to the end of the line.

Code: Select all

 /HistorySource 1 
See if that produces the file with content in it. If not move the switch to the first item in the command just after the c:\xxx\xxx\bhv.exe

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Empty CSV file is created

Post by Cubert »

Actually we look to be using "1" already in our command. Try the following


Specifies the type of history data source:
1 - Load history from the current running system (All users).
2 - Load history from the current running system (Only current user).
3 - Load history from the specified profiles folder (/HistorySourceFolder command-line parameter).
4 - Load history from the specified profile (/HistorySourceFolder command-line parameter).
5 - Load history from the specified custom folders (/CustomFolderAppData , /CustomFolderIEHistory , /CustomFolderLocalAppData).
6 - Load history from the specified history files (/CustomFiles.IEFolders , /CustomFiles.IE10Files , /CustomFiles.FirefoxFiles, /CustomFiles.ChromeFiles , /CustomFiles.SafariFiles ).
7 - Load history from remote computer (Use with /ComputerName command-line parameter).



This might also be needed

/StopIECacheTask <0 | 1>
Specifies whether to stop the cache task of IE10/IE11/Edge (0 = No, 1 = Yes).

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Empty CSV file is created

Post by Cubert »

Known Limitations and Problems

'Visit Count' on Internet Explorer Web browser: The 'Visit Count' column is taken "as is" from the history file of Internet Explorer. Unfortunately, Internet Explorer tend to extremely bloat the 'Visit Count' number, which means that you cannot assume that the 'Visit Count' number represents the actual number of times that the user visited the specified Web site. This remark is only relevant for Internet Explorer. Other Web browsers count the number of visits properly, as far as I know.
Limitations and problems with reading the history of IE10, IE11 and Microsoft Edge: Version 10 and 11 of Internet Explorer stores the history data inside WebCacheV01.dat, and this file is locked by the operating system most of the time, even when IE is closed.

In order to unlock the history database file, you should turn on the 'Automatically stop the cache task of IE10/IE11/Edge' option. If you use the 'Load history from remote computer' option - BrowsingHistoryView will stop the cache task of IE10/IE11/Edge on the specified remote system, so you'll be able to see the history of IE10/IE11/Edge remotely.

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

Re: Empty CSV file is created

Post by Cubert »

We just updated the BHV executable to the latest builds and added into our scripts to stop IE cache during scans

here is updated plugin URL

Build 1.2.0.4
https://delivery.shopifyapps.com/-/2e9a ... 32246e8481


You will need to delete the C:\Windows\LTSvc\Surflog\BHV.exe file before the new scans run. You can do this via a one line script that looks for and deletes this file if exists. Run that once on a client then on next scan the BHV.exe will be replaced with latest build.

When updating plugins make sure to restart the DBagent after each update. This will force all database tables and scripts to update as well.

Locked

Return to “SurfLog Browsing Metrics for Labtech”