DevTech101

DevTech101

Month: January 2017

Java sockets – system monitoring / server – parallel stats capturing

While capturing local system stats I needed a way to run parallel captures The code below is still a work in progress how to can/will be done, more on that is explained below. For example: I am trying to capture CPU, Mem every second, but at the same I am also capturing my db response …

Java sockets – system monitoring / server – parallel stats capturing Read More »

Java sockets – system monitoring / server publisher process

This is part two – on how to capture and publish Solaris client performance stats. To read part one please click here. This program will retrieve the last system stats from the local SQLite DB and make it available over a socket or http connection for remote fetching. Once the program is running, just telnet …

Java sockets – system monitoring / server publisher process Read More »

Java sockets – system monitoring / server capture process

Monitoring remote Solaris client’s by using Java sockets. The below configuration shows how to configure a host (Solaris or Linux), to expose local performance states in JSON using Java sockets, the stats are then collected by a remote system to crunch (graph/chart) the data. The full capture pipeline process is outline below. Note: If losing …

Java sockets – system monitoring / server capture process Read More »

Git auto complete and color coding

First lets get the auto completed code curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash Now add to your .bashrc or .bash_profile if [ -f ~/.git-completion.bash ]; then . ~/.git-completion.bash fi To enable Git color coding git config color.ui git config –global color.ui true

Java – How to create a jar file from multiple packages

How to create a runnable jar file from multiple java packages. The below example has two packages mypkg1 & mypkg2 with the below directory structure As you can see below I have 3 java files and two packages # pwd /tmp/prog # du -a 4 ./mypkg1/One.java 4 ./mypkg1/Two.java 16 ./mypkg1 4 ./mypkg2/Res.java 8 ./mypkg2 Example …

Java – How to create a jar file from multiple packages Read More »

Java solution for – Error: Could not find or load main class

For example java package mypkg1 contains the main but I am still getting the error Error: Could not find or load main class One Full example below. mypkg1/One.java package mypkg1; import mypkg2.Res; public class One { public static void main(String[] args) { Two two = new Two(); Res res = new Res(); System.out.println(two.Two(2, 2)); System.out.println(res.Res(4, …

Java solution for – Error: Could not find or load main class Read More »

Pulseaudio (PCM) Gnome 3 issues

Solution for no sound # https://bugzilla.redhat.com/show_bug.cgi?id=1206764 /root/.pulse/client.conf autospawn = yes # OK, I guess we can consider that a regression in autostart behavior, I’ll re-add # Add /usr/bin/pulseaudio –start “$@” # to /usr/bin/start-pulseaudio-x11 script You can start (or restart with pkill pulseaudio) /usr/bin/amd64/pulseaudio –start –log-target=syslog Note: All settings are in /etc/pulse/default.pa Helpful links PulseAudio Examples

Amazon fire HD 8 (Root) / remove / disable fire launcher

Below are notes on how to root your fire Amazon HD 8 (and what I have used successfully). then disabling ota and the fire launcher. I was lucky that my device was only updated to 5.3.2 and not 5.3.2.1, which can’t be rolled back and is/was unrootable at the time of this writeup. Most of …

Amazon fire HD 8 (Root) / remove / disable fire launcher Read More »

JME3 and Blender howto

JME beginners howto Full walkthrue http://www.gamefromscratch.com/post/2015/08/31/A-Closer-Look-at-jMonkeyEngine.aspx JME3 howto https://docs.jmonkeyengine.org/beginner/hello_simpleapplication.html Terrain map howto https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_terrain.html Blender howto Blender Beginner Tutorial – Part 2: Moving, Rotating Blendor compile for Solaris (was not able to get it working) https://wiki.blender.org/index.php/Dev:2.4/Doc/Building_Blender/Solaris Free blender 3d models https://www.blender-models.com/model-downloads/buildings/ OpenRTS Engine https://github.com/methusalah/OpenRTS jme3 help series # JME31 Sneak Peek Install # 140621 GitHub First …

JME3 and Blender howto Read More »

Solaris OpenGL (lwjgl-2.x) library and install

Note this works with version 2.x, version 3.x does not included the Solaris lib’s First Download the lwjgl library from sourceforge link below http://sourceforge.net/project/showfiles.php?group_id=58488&package_id=54362&release_id=670417 To test the OpenGL run the below. java -cp jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar -Djava.library.path=native/solaris org.lwjgl.test.WindowCreationTest Now lets test JME3 Download from git the jme (try with stable version) git clone https://github.com/jMonkeyEngine/jmonkeyengine.git Now lets compile …

Solaris OpenGL (lwjgl-2.x) library and install Read More »