How to transfer data from Raspberry Pi to server using SFTP or other protocol

0

0

I want to ask, how to transfer hardware data (CPU, RAM, DISK stats) from Raspberry Pi to online web server using SFTP. I am new in Linux and I have no idea how to do it. I've already had a program in Python which gives me important data, but now I need to send them to web.

KarlJohanson

Posted 2015-10-04T19:56:50.900

Reputation: 11

You mean in real time? – Cristian Ciupitu – 2015-10-04T19:47:48.213

Do you have a display or x in general? Or just command line? – h0ch5tr4355 – 2015-10-04T19:59:17.033

Depending on how much you know about databases a mysql add-in and connect to mysql database on your destination server. – cybernard – 2015-10-04T20:31:30.990

There are honestly about a dozen different ways to do this. SFTP, SCP, sending data to a remote MySQL server, JSON data, etc… Need some more specifics. – JakeGould – 2015-10-05T07:06:46.847

I want to use ncFTP software for that. I am able to send file from terminal, but I need a script, which will be sending that file every 30 seconds. Here you can find out ncFTP: http://www.ncftp.com/ncftp/doc/ncftp.html Give me please some examples or similar code for that.

– KarlJohanson – 2015-10-10T17:14:26.520

Answers

0

In your Python code, collect the data you want to a string.

And then upload the string to a file over SFTP protocol. Use Paramiko library for that.

See Upload a file-like object with Paramiko?

Martin Prikryl

Posted 2015-10-04T19:56:50.900

Reputation: 13 764