# voxl-logger to log files at my computer

Source: https://forum.modalai.com/topic/3106/voxl-logger-to-log-files-at-my-computer
Category: VOXL SDK and Software (https://forum.modalai.com/category/47/voxl-sdk-and-software)
Posted: 2024-02-09 18:11:38 UTC by riteshsharma
Replies: 8 · Views: 1805

## riteshsharma · 2024-02-09 18:11:38 UTC

Can I use voxl-logger to record images at my computer via SSH?

## Reply by Guest · 2024-02-09 22:38:33 UTC

@rsr4z 

You can use `voxl-logger` over SSH and it can record images, take a look at the docs [here](https://docs.modalai.com/voxl-logger/).

Thomas Patton

## Reply by riteshsharma · 2024-02-09 22:43:48 UTC (in reply to Guest)

@thomas Yes, I went through the document but could not find a way to use SSH. Can you provide an example?

## Reply by Guest · 2024-02-09 22:45:55 UTC (in reply to riteshsharma)

@rsr4z 

Here's the doc on WiFi setup including SSH https://docs.modalai.com/voxl-2-wifi-setup/ .

Thomas Patton

## Reply by riteshsharma · 2024-02-09 22:51:46 UTC (in reply to Guest)

@thomas Hi Thomas, thank you for sharing the links. I am still unable to use voxl-logger command to send files to my computer directly. I know you can use '-d' with voxl-logger to save files on the host but what if I want to send files directly to my computer.  I already have host connected to internet and is accessible by my computer using the IP address.

## Reply by Guest · 2024-02-09 23:07:51 UTC (in reply to riteshsharma)

@rsr4z 

Yeah I don't think you can have the files write to host. I would just get them written on-device (I think dest is `/data/voxl-logger`) and then use `scp` to pull them back over SSH as:

```
scp username@remote_host:/path/to/remote/file /path/to/local/destination
```

Hope this helps!

Thomas Patton

## Reply by riteshsharma · 2024-02-12 22:28:28 UTC (in reply to Guest)

@thomas Before I try out, I would like to know if It is advisable to modify voxl-logger command to create socket connection with the client machine to send data from host to client? Dev team suggestion will be appreciated.

## Reply by Guest · 2024-02-12 23:24:37 UTC (in reply to riteshsharma)

@rsr4z 

I mean you can certainly try to do so, we've never tried on our end so I'd be curious to know if it works. 

Keep me posted!

Thomas

## Reply by Alex Kushleyev (ModalAI staff) · 2024-02-13 02:30:13 UTC (in reply to riteshsharma)

@rsr4z , voxl logger will create different directories and files for different data that it will be logging, so using a single socket for this will now work.

If you REALLY want to have the log files saved directly to your PC and your network connectivity has the bandwidth to do it, then you can potentially map your desktop as a network drive (using sshfs or something like that). Then you can save your logs to the network drive. However, you should be aware of the following potential issues:
* ssh is encrypted, so encryption of data will take some additional cpu usage on VOXL (proportional to the amount of data)
* network-mapped drives are not always reliable, especially if you connection is not reliable, but there are sshfs flags you can try to automatically reconnect, etc.. 
* if there is not enough bandwidth to save the data over your network connection, voxl-logger can get occasionally blocked and will drop packets on the MPA side

Another option you can consider is saving the logs on voxl, and then using periodic `rsync` to get the data to your PC. `rsync` works over ssh as well. I just did a quick search and this came up (i did not try it):
```
fswatch -o /src | xargs -n1 -I{} rsync -a /src /dest
```

(https://stackoverflow.com/questions/12460279/how-to-keep-two-folders-automatically-synchronized)

you would need to copy your voxl2's key onto your desktop so that you don't need to enter your password every time..

Finally, if you did not want to write to the VOXL2's drive at all, you could save the logs to tempfs (/dev/shm) and then `rsync` from there to your PC and have `rsync` delete the files after syncing in order to avoid filling up your RAM, but you have to be careful and not delete files that are still being written by the logger..

Hopefully this gives you a few options to think about..
