show remote shares on a system:
showmount -e <nas host name or ip>
Install NFS on Ubuntu (client and server)
https://vitux.com/install-nfs-server-and-client-on-ubuntu/
--30--
showmount -e <nas host name or ip>
kpartx
, you can mount each partition individually by specifying an offset
in the mount
command.fdisk
:$ fdisk -u -l rpi_image280914
Disk rpi_image280914: 16.0 GB, 16012804096 bytes
255 heads, 63 sectors/track, 1946 cylinders, total 31275008 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000cdac7
Device Boot Start End Blocks Id System
rpi_image280914p1 * 2048 514047 256000 c W95 FAT32 (LBA)
rpi_image280914p2 540672 31242239 15350784 83 Linux
Take the Start
sector of the partition you want and multiply that value by the Units
size. So if you want the second partition you'll get 540672 * 512 = 276824064
.mkdir rpi_partition2
sudo mount -o loop,offset=276824064 rpi_image280914 rpi_partition2/
Once you are done doing what you want with the partition data:sudo umount rpi_partition2/
rm -r rpi_partition2/
mjpg-streamer
. Before we can install this we'll need to install a few dependencies first.sudo apt-get update
sudo apt-get install libjpeg8-dev imagemagick libv4l-dev uvcdynctrl git cmake -y
After installing the dependencies, run the following commands to install mjpg-streamer.git clone https://github.com/jacksonliam/mjpg-streamer.git
cd mjpg-streamer/mjpg-streamer-experimental
make USE_LIBV4L2=true clean all
sudo make install
sudo usermod -aG video pi
sudo modprobe bcm2835-v4l2
cd ../../
rm -rf mjpg-streamer
Start the camera livestream by running the following command.mjpg_streamer -i 'input_uvc.so --device /dev/video0 --fps 30 --resolution VGA --quality 65' -o 'output_http.so'
If you followed all above instructions and everything went ok, you should now be able to see the stream when browsing to http://your-raspberry-pi.local:8080?action=stream
. After you verified the stream is working, cancel by running ctrl+c
and move on to the next section.#!/usr/bin/env python
import tornado.ioloop
import tornado.web
import os
class MainHandler(tornado.web.RequestHandler):
def getCPUtemperature( self ):
res = os.popen('vcgencmd measure_temp').readline()
return(res.replace("temp=","").replace("'C\n",""))
def get(self):
self.write( "Temperature: %s" % ( self.getCPUtemperature() ) )
application = tornado.web.Application([
(r"/", MainHandler),
])
if __name__ == "__main__":
application.listen(8888)
tornado.ioloop.IOLoop.instance().start()
using RRD tool
http://lazydroid.com/2013/05/raspberry-pi-monitoring-cpu-temperature-with-rrdtool/
vcgencmd measure_temp
Monitor loopwatch -n 1 vcgencmd measure_temp
--30--