# Troubleshooting
This section provides some troubleshooting tips related to BrowserMon service.
## Initial Checks
1. **Service Status**
- **Windows:** Check if the service is running
```
Start Menu > Services > BrowserMon
```
Check the status of the service if it is running or not.
- **Linux:** Check if the service is running
```bash
systemctl status borwsermon.service
```
2. **Permissions**
BrowserMon service is meant to run with the highest level of privileges. Although the service will give an error if not run as an Administrator, make sure when you install it, you run it as Admin.
3. **Logs**
- Review the service logs and the runtime-generated logs by BrowserMon. BrowserMon generates logs in the following location:
- Windows: `C:/browsermon/browsermon.log`
- Linux: `/opt/browsermon/browsermon.log`
- To see service logs that are logged by the operating system, do the following steps:
- Windows: Typically found in "Event Viewer" > "Windows logs" > "Application" > "Browsermon"
- Linux: Run the command `journalctl -u browsermon.service`
## Common Issues and Solutions
### Service Won’t start
If the service is not starting, review the logs of the service. If the service is crashing because of a runtime error, they will show in logs generated by the operating system. How to see logs? Please refer to **Logs** in the heading **Initial Checks**.
### Service is not behaving as expected
If the service is not behaving as expected in the configuration, make sure there are no errors in the `browsermon.conf` file. If it contains any errors or typos, BrowserMon service will use default configurations, which are:
```json
{
"browser": "all",
"mode": "scheduled",
"schedule_window": "1m",
"logdir": "C:\\browsermon\\history (Windows) or /opt/browsermon/history (Linux)",
"logmode": "csv",
"rotation": "1m",
"backup_count": 5
}
```
### History is not being logged
If the service is not logging history in the folder mentioned in the `browsermon.conf` file, make sure you supplied the correct folder and path, and indeed the folder exists where you wish the history to be written.
Still, if history is not being logged, you can do the following checks:
1. Make sure the "stop saving history" option in the browser is disabled.
2. Make sure sync is on; sometimes when sync is off, history might not get saved.
3. Restart the service.
4. Restart the computer.
5. Create a new profile and check if history of that file is being logged.
## Advanced Troubleshooting
### Windows
- Use **Event Viewer** to find detailed error messages.
- Execute `sfc /scannow` to check for and fix system file issues.
- Check Windows updates and apply any pending updates.
### Linux
- Run `dmesg | grep browser-monitor` to check for kernel or hardware-related errors.
- Check for and apply updates using your distribution’s package manager (e.g., `apt`, `yum`, etc.).
- Use `strace` to monitor system calls made by the service for advanced debugging.
## Contacting Support
### Using the Troubleshooter
Download the BrowserMon troubleshooter from the website, which will collect all logs and relevant information and save it into a file named `browsermon_archive.zip`, which you can then transfer to the team that will help you fix the issue.
### Privacy Disclaimer
BrowserMon troubleshooter collects all relevant information that can help debug the issue. For transparency, here is the list of items BrowserMon troubleshooter will collect:
1. `browsermon.log`
2. Installed Browser’s version Information
3. System Information (i.e., platform, platform version, architecture, IP address, MAC address, processor, and RAM)
4. Service Information
5. Troubleshooter will run `procmon` to fetch real-time event properties related to BrowserMon. For more information on what `procmon` monitors, please take a look at their site [here](https://learn.microsoft.com/en-us/sysinternals/downloads/procmon).
## How to run troubleshooter?
`browsermon_ts troubleshoot -v`
## BrowserMon Troubleshooting CLI Options
The BrowserMon Troubleshooting CLI provides several options to customize the execution of the troubleshooting process. These options allow you to specify the location to store logs, set the verbosity level, and choose specific information to fetch.
## CLI Options
`--logs-dir`
- **Description**: Specifies the directory where a copy of the logs should be stored.
- **Default**:
- On Windows: `C:\browsermon\logs`
- On other platforms: `/opt/browsermon/logs`
- **Usage**: `--logs-dir `
- **Example**: `--logs-dir C:\custom\log\directory`
`-vv` (Verbose Mode)
- **Description**: Collects all information, including procmon details, for a comprehensive troubleshooting report.
- **Usage**: `-vv`
- **Example**: `browsermon_ts troubleshoot -vv`
`-v` (Standard Mode)
- **Description**: Runs all troubleshooting functions except for procmon, providing a standard level of detail in the report.
- **Usage**: `-v`
- **Example**: `browsermon_ts troubleshoot -v`
`--browser-version`
- **Description**: Fetches only the browser version information. When this flag is used, no other information is collected unless explicitly specified with other flags.
- **Usage**: `--browser-version`
- **Example**: `browsermon_ts troubleshoot --browser-version`
`--system-info`
- **Description**: Fetches only the system information. This flag can be used alone or in conjunction with other flags to include additional information in the report.
- **Usage**: `--system-info`
- **Example**: `browsermon-ts troubleshoot --system-info`
`--service-info`
- **Description**: Fetches only the service information. This option is useful for narrowing down the troubleshooting to service-specific issues.
- **Usage**: `--service-info`
- **Example**: `browsermon_ts troubleshoot --service-info`
## Examples
1. To generate a verbose troubleshooting report (wihtout procmon) and store logs in the default directory:
`browsermon_ts troubleshoot -v`
2. To generate complete verbose troubleshooting report (including prcomon) and store logs in the default directory
`browsermon_ts troubleshoot -vv`
NOTE: For this to work you must place procmon executeable in the same location from where you run the browsermon_ts
You can download the procmon from Microsofts official site.
The troubleshooter uses it to monitor real-time file system, Registry, and process/thread activity of BrowserMon process. This is only supported on Windows.
This will open a `procmon` window; minimize it and let it run in the background until the troubleshooter has collected all the information. Once the status is at 100%, you can exit the `procmon` window and the troubleshooter window. The troubleshooter will create a file named `browsermon_archive.zip` in the directory provided with command line option *--logs-dir*