grafana service doesn’t auto start with the system

When installing grafana and influxDB. I encountered the folowing issue

The service of grafana and influxDB where not starting .

I checked using rcconf that my service where enabled , and they where !

I then tried sysv-rc-conf and my service where correctly configured !

the services had absolutely no issue starting when called manually and started fine !


this line was telling me that the service startup was disabled !

after seaching a bit on the web ,the solution to this issue is using systemctl to enables the services.

InfluxDB insert multiples values at once using curl

If you have to insert multiples values in an influxdb database. You can use curl and insert the values one at the time.

But there is a better way like in this example

Let’s say you want to insert your tree loadaverage values in you influxdb database.

First put them into variables using these 3 lines.

Then using this curl line, insert them all at once in your influxdb database

Orange PI Zero Plus – A simple and, powerfull SBC

if you follow what’s new in the SBC world. You must know Xunglong Orange pi, they are a Chinese manufacturer known for making very cheap sbc’s based on Allwinner chip’s.

One of their most interesting sbc’s was the orange pi zero. It was small, powerful, and was ideal for a small headless server. (still available)

It was extremely cheap: less than 10€ but was plagued with some issues like very poor wifi stability, and poor software support from the manufacturer and, only 100mbps on the Ethernet port.

 

Now Xunlong has come up with an improved version of this board.

  • The wifi chip is now a well supported Realtek RTL8189FTV
  • The Ethernet port is now capable of 1Gb/s transfer rate
  • The cpu is improved with an Allwinner H5
  • The layout stay exactly the same so case are compatible.

I’ve already ordered one of these boards. At 16,02€ including shipping

It’s available at Aliexpress

OrangePI : Install OpenRTSP on a ARM device

One of my project with my OrangePI is to setup the device as a basic IP security camera server ,

the OrangePI zero , will connect to RTSP flux of the IP camera , and dump the stream on to an external disk , where it will be kept for 7 days before getting automaticly deleted
At a latter date i will run a motion detection program on these files and send a mail if motion is detected on a specific part of the frame.

after a little research , i found that a lot of people are using a program called openRTSP to record their RTSP stream to disk

But , after connecting on my OrangePi zero and trying to look for the program i found out that it’s not part of the default installation of armbian stable.

I tried to install the package using apt install openRTSP

I went to google and searched , openRTSP package ,and found out , on the debian website that openRTSP is part of the livemedia-utils package,

I went back to my SSH session and typed apt-get install livemedia-utils

There is no man pages associated with the program , you have to rely on the developer website to understand all the different options . The documentation is available here : http://www.live555.com/openRTSP/  or here if the website is down.
but as usual , in the officials repositories you only get dated version

you might want to compile the source code to have the last version available:

as root

Go to /usr/src: cd /usr/src
Get the live555 liveMedia source code: wget http://www.live555.com/liveMedia/public/live555-latest.tar.gz
Unpack it: tar -xzf live555-latest.tar.gz
Go into the  unpacked directory: cd live
Generate the make files: ./genMakefiles linux
Build the code: make
Install the latest version: make install

The NanoPI NEO Plus 2

the guys at Frendly elec Just created a very interesting board witch check a lots of mark in the things I look for in a SBC,

  • First : a good CPU
    the Allwinner H5 , is a powerful enough CPU that you might need to cool if you wish to use it at it’s full potential
  • Lots of RAM , 1GB DDR3
    the main issue i have with the OrangePI zero is that there is only 512 MB of ram in the biggest version. for a  lot of usages , it’s not enough.
    1GB should be plenty
  • integrated flash memory
    the problem with µSD card is that they degrade overtime , and after a year or two , you will see problem with you card unless you take special precaution to limit writes to the SD card.
    With eMMC the life of the memory should be longer.
  • Wifi b/g/n with a well supported chipset : the AP6212
  • Some GPIO’s
  • GIGABIT ethernet ,  a must have !

the price is 24.99$ at http://www.friendlyarm.com

Libre Computer Board a nice 4K capable SBC

Kickstarter spawned a very interesting board ,
it’s called Le Potato from the company Libre Computer Board

this board is designed to offer exactly the same layout as the RPI3 , but absolutely destroy it in term of performance

‘the powerful cpu and the large amount of ram enable usages forbidden by the low power of the RPI3.

  • A powerful web server
  • A NAS
  • A fast VPN gateway
  • A local media server
  • A torrent downloader
  • A media encoder
  • A IP camera storage server
  • Or a lightweight desktop computer

 

The cpu is a Quad 64-bit ARM Cortex-A53 CPU + ARM Mali-450 GPU it will need a active CPU cooling , which is provided in the 65$ option.

The specs given by the manufacturer are

HDMI 2.0
4 USB 2.0 Type A
RJ45 100Mb Fast Ethernet
CVBS
Infrared Receiver
S/PDIF Header
UART Header
I2S + ADC Header
40 Pin Header for PWM, I2C, I2S, SPI, GPIO
eMMC Daughter Board Connector with the option for a 64GB emmc in the 99$ reward
MicroSD Card Slot with UHS Support

 

In some multiusers cases the 100 mbps ethernet port might limit the usage as a NAS. But in most cases, it should be fine as a NAS for 1 or 2 simultaneous users
But the hdmi 2 port is great if you think using it as a media machine connected to a TV for example
The lack of wifi connectivity is disappointing. And one of the 4 USB ports will be reserved for a Wi-Fi adapter
They justify this decision because of a lengthy certification process.
The maker plan on releasing a Wi-Fi + Bluetooth mezzanine in the future witch will address the lack of radio connectivity

Bash script to clean movies name


The issue when you download movies online, is that most of the time the file name is going to be complete trash , filled with useless info like the team that made the rip or the website from where the movie was downloaded.
This is very annoying when you sort by name and the website made the idiotic decision to put their name in front of the actual film name.

for example here a typical movie name
[ Torrent9.info ] Dont.Think.Twice.2016.FRENCH.WEBRip.XviD-NEWCiNE.avi
the actual useful data that i wish to keep is Dont.Think.Twice.2016.avi

for this purpose i’ve developped a small bash script that will list all the files in a chosen directory then , if necessary , will rename the file.

this is not a very efficient script
but it’s fulfill it’s purpose and very rarely encounter a filename that he is unable to clean.

BASH:check if a number is even or odd


In a bash script you might need to check if a var is even or odd , 

in my case im going to use a if to make that check

You can use this simple code to make that check and display the result.

the result will be : 

BASH : Make a SQL query from bash

MySQL is a very convenient way to store data .
To use stored MySQL data in a BASH script you can use this simple command

this will display the result in you terminal without ASCII decorations.
if you need to use that data for something , you can store it in a var