Capturing Solaris 11.4 (12) Analytics By Using Remote Administration Daemon (RAD) – Part 5

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

Capturing Your Own Solaris 11.4 (12) Analytics By Using Remote Administration Daemon (RAD) – Part 5 Note: The full code is available in a GitHub repository. to play with the code, feel free to clone the Solaris Analytics Publisher Repository. This is part 5 out of a series of articles on how to use Oracle […]

Read More

Kubernetes CoreOS Ignition Configuration Generator – Part 6

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Kubernetes CoreOS Ignition Configuration Generator Written in Python. In the previous post I went through how to Configuring Kubernetes Træfik Ingress Controller, DNS, Dashboard. below are examples to use a small Python script I have written to automate most of the Kubernetes deployment process. Note: Get going in minutes with a full Kubernetes cluster by […]

Read More

Python remote backup script

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

#!/bin/python import os import sys import time import datetime import subprocess import smtplib from email.mime.text import MIMEText def mysqlBackup(): mysql_host = ‘localhost’ mysql_user = ‘root’ mysql_user_passwd = ‘password’ backup_path = ‘/mystuff/mysql_backup/’ dblist = [‘wordpress’] datetime = time.strftime(‘%m%d%Y-%H%M%S’) for db in dblist: backupdate = backup_path + db + “_” + datetime logger(“creating backup folder – ” […]

Read More

Example Of Capturing IOStat With Python

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

The below Example captures IOStat output with Python #!/bin/python import subprocess import csv io_c = subprocess.Popen([‘iostat’, ‘-xnsMr’, ‘1’, ‘2’], stdout=subprocess.PIPE, shell=False, stderr=subprocess.PIPE) stdout = io_c.communicate()[0] lc = len(stdout.split(‘\n’)) it_lc = lc / 2 + 2 reader = csv.reader(stdout.split(‘\n’)[it_lc:], delimiter=’,’) for row in reader: if any(row): #print row print row[0],row[1],row[2],row[3],row[7],row[8],row[9],row[10] Output would look like 0.0 0.0 […]

Read More

Capturing Your Own Solaris 11.4 (12) Analytics / Sstore – Part 2

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Capturing Solaris 11.4/(12) analytical data Note: There is an updated process for Solaris 11.4+, please check out part 5 – Enhanced method on how to capture analytics in Solaris 11.4+ Note: The full code is available in a GitHub repository. to play with the code, feel free to just clone the Solaris Analytics Publisher repository. […]

Read More

How To Create a Python Socket Server

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Create the Python Socket Server #!/bin/python import socket host = ‘10.10.10.10’ port = 50000 backlog = 5 size = 1024 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((host,port)) s.listen(backlog) while 1: client, address = s.accept() data = “Return data\n” client.send(data) client.close() Create the client connection #!/bin/python import socket host = ‘10.10.10.10’ port = 50000 backlog = 5 size […]

Read More

Oracle BDA iPython, Notebook and Jupytar Configuration

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

How to install iPython/Notebook on an Oracle BDA Install the below packages pip install ibackports.ssl_match_hostname-3.5.0.1.tar.gz ipython-1.2.1.tar.gz pyzmq-15.2.0.zip tornado-3.2.1.tar.gz add parcels in CDH GUI parcel address Remote Parcel Repository URLs https://repo.continuum.io/pkgs/misc/parcels/ donwload, distrubite, activate System startup script /usr/local/notebook/bin/start_notebook.sh #!/bin/bash export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/rh/python27/root/usr/lib64 export PATH=/opt/rh/python27/root/usr/bin:$PATH # Notebook export PYSPARK_DRIVER_PYTHON=ipython export PYSPARK_DRIVER_PYTHON_OPTS=”notebook –NotebookApp.open_browser=False –NotebookApp.ip=’*’ –NotebookApp.port=8880″ # Jupyter #export PYSPARK_DRIVER_PYTHON=/opt/cloudera/parcels/Anaconda/bin/jupyter […]

Read More