Monday, January 28, 2019
Is there anybody out there?
Tuesday, May 19, 2015
Hello!
Let’s assume you have a complex performance issue on a couple of linux servers. Usually you may try using iostat to try to catch the issue when it’s happening and see which performance item is creating the bottleneck.
To catch the performance issue I’ll recommend to use iostat to send the info to a file and then process it. You can try something like this:
rightnow=$(date +%Y%m%d%H%M%S)
thishost=$(hostname)
sudo iostat -c -d -x -t -m 1 1200 > iostat.out.$thishost.$rightnow
egrep "^[sd].*" iostat.out.$thishost.$rightnow > iostat.out.$thishost.$rightnow.csv
head iostat.out.$thishost.$rightnow | grep "D" >head.csv
{ cat head.csv ; cat iostat.out.$thishost.$rightnow.csv ; } > iostat.out.$thishost.$rightnow.txt
sed 's/ \{1,\}/;/g' iostat.out.$thishost.$rightnow.txt >iostat.out.$thishost.$rightnow.csv
Now you have a file that can be opened using R.
I’ll give you a couple of examples that can be quite useful for analysis. This will assume you have two files: each one from a different host.
´´´ R
xx <- read.table(“/temp/wegalihs01.csv”, header=TRUE, sep=”;”, quote=”\”“, na.strings = “NA”, as.is = TRUE)
yy <- read.table(“/temp/wegalihs02.csv”, header=TRUE, sep=”;”, quote=”\”“, na.strings = “NA”, as.is = TRUE)
await1 <- xxawait < 1000 & xx$Device. == “dm-8”]
await1 <- await1[rep(1:length(await1))]
plot(as.vector(time(await1)), as.vector(await1), type = “l”)
await2 <- yyawait < 1000 & yy$Device. == “dm-8”]
await2 <- await2[rep(1:length(await2))]
plot(as.vector(time(await2)), as.vector(await2), type = “l”)
times1 <- ts(await1,freq=60*1)
times2 <- ts(await2,freq=60*1)
plot(stl(times, “periodic”))
par(mfrow=c(1,1))
plot(stl(times1, “periodic”)$”time.series”[,”trend”], col=”red”)
par(new=TRUE)
plot(stl(times2, “periodic”)$”time.series”[,”trend”], col=”blue”)
Check Reads & Writes
await1 <- xxDevice. == “dm-8”]
await1 <- await1[rep(1:length(await1))]
plot(as.vector(time(await1)), as.vector(await1), type = “l”)
await2 <- xxDevice. == “dm-8”]
await2 <- await2[rep(1:length(await2))]
plot(as.vector(time(await2)), as.vector(await2), type = “l”)
times1 <- ts(await1,freq=60*1)
times2 <- ts(await2,freq=60*1)
plot(stl(times, “periodic”))
par(mfrow=c(2,2))
plot(stl(times1, “periodic”)”time.series”[,”trend”], col=”blue”)
´´´
Monday, December 15, 2014
More bluemix!
- Always check the logs/staging_task.log. You can find interesting stuff when the Bluemix controller try to instantiate your app. There are a few things that are not quite well documented and may save your life. One example is on my next tip.
- Add a start script into your package.json. Even when the application will start if you set up the manifest.yml, the Bluemix Controller needs this info to be able to instrument your app, which leads to my next tip. In the meantime, here you have a sample package.json with a start script:
{
"name": "sample",
"version": "0.1.0",
"description": "sample",
"main": "sample",
"scripts": {
"test": "echo \"Error: no test specified! Configure in package.json\" && exit 1",
"start": "node app.js"
},
"dependencies": {
"express": "3.4.7",
"jade": "1.1.4",
"log4js": "^0.6.21",
},
"author": "",
"license": "BSD",
"readmeFilename": "README.md",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-env": "^0.4.2",
"grunt-git": "^0.3.2",
"grunt-shell": "^1.1.1",
"js-yaml": "^3.2.3"
}
}
- Using the IBM Monitoring and Analytics for Bluemix Add-On is free, so I highly recommend to use it. It may help you a lot to find some issues in your apps.
Thursday, October 2, 2014
Best practices to run GNU Octave in a Windows box
So, usually you will run this on a Linux box but if you're like me, who has a preference for Windows desktops, you may have a few issues running it. So here is a small recipe that may help:
Install Cygwin (you have to install this lovely piece of software even if you don't want to run Octave)
Choose at lease the following packages:
- octave (and all the packages that you think you will want to use)
- xorg-server
- xinit
- xterm
and let Cygwin setup to select all the dependencies for you.
After you've installed this you can open a Cygwin terminal and then run:
# X
# export DISPLAY=:0.0
# xterm
# octave (inside xterm)
# sombrero(51) (inside octave)
This previous commands will:
- Run the XServer
- Let every X application to run on the local XServer that you've just started, you can add this into your ~/.bash_profile
- Open a new terminal inside this XServer
- Start Octave
- Execute a beauty graph inside the XServer window
Enjoy you maths!
Monday, July 14, 2014
Using Android Studio with the Samsung Galaxy S4
- Install the corresponding Samsung USB Driver. You can click here to get it from the official Samsung Page.
- Activate the hidden developer options on you S4 (or any Android 4.2+). Check this link for more info but basically you have to:
- Go to Settings & About Device and scroll down to the Build Number.
- Now, tap on your "Build Number" 7 (seven) times, and you should see a toast notification pop up saying "Developer mode has been enabled."
- Back out of the About Device menu and you'll see Dev options back where it belongs, so you can turn on USB debugging and whatever else you want to.
Sunday, May 4, 2014
BlueMix + Android Development + IBM Mobile Data - First Steps
Notice: I'm using the sample code found here as a start
While doing this I've found a couple of issues so here is a quick list of tips & tricks:
Issues with Application Id
At this point in time, properties.json is having precedence over the more specific code:IBMBaaS.initializeSDK(context, "95569b05-5f16-421a-a9e4-xxxxxxx");
So bear this in mind and check that your properties.json has the appropriate information.
More info here
Issues with "strange" URLs being called
The IBMBaas API will call https://mobile.ng.bluemix.net/data/helo as part of its normal operation. I think you may be interested in this info as it is not yet document.Issues regarding "cannot find symbol variable IBMBaaS" or some other
Not sure who is at fault here but I've had several issues with the ADT not being able to resolve symbols associated with the IBM libraries. Copying the libraries again nor restarting the ADT didn't work neither. I've found that calling Gradle to clean up the project solved the issues most of the times, so you may try that first before recreating the project.More to come...
Friday, March 21, 2014
Trying Bluemix! - First steps
I've just tried to give it a shot and this is my recommended approach to make a sample run and have an understanding of some of the basics to create a larger app:
First of all you'll need CloudFoundry tools, which oyu can get from: http://docs.cloudfoundry.org/devguide/installcf/install-go-cli.html
Once you have this installed you can follow this sample here: http://www.ibm.com/developerworks/cloud/library/cl-bluemix-nodejs-app/
But you'll need to make some changes as that document has a couple of things that has changed since it was published:
git clone https://github.com/ibmjstart/bluemix-node-mysql-upload.git
cd bluemix-node-mysql-upload\app
"\Program Files (x86)\CloudFoundry\cf.exe" create-service mysql 100 mysql-node-upload
move manifest.yml.v5 manifest.yml
---
applications: #Reference http://docs.cloudfoundry.com/docs/using/deploying-apps/manifest.html
- name: whatevername #Application Name. Unique to the user's Space
memory: 256M #The maximum memory to allocate to each application instance
instances: 1 #The number of instances of the application to start
--- url: pcolazurdo-test-${random-word}.${target-base} #deprecated, kept for temporary compatibility
host: whatevername #Hostname for app routing. Unique to domain
--- domain: ${target-base} #Bluemix Parent Domain Name
path: . #Path to the application to be pushed
command: node app.js #The command to use to start the application
"\Program Files (x86)\CloudFoundry\cf.exe" push runtime-name
After this you have to go to the console and assign the Mysql service to the Application Runtime and restart the Runtime
Tuesday, September 3, 2013
Playing with Vagrant - Fixing issues with Virtual Box
cd ~/.vagrant.d/boxes/BoxName/virtualbox openssl sha1 *.vmdk *.ovf > box.mfMore info at: https://github.com/mitchellh/vagrant/issues/1850
Hope it helps
Friday, April 5, 2013
Playing with Ruby on Windows --- Fixing SSL issues when running bundle install
"Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/gems/mime-types-1.22.gem)
An error occured while installing mime-types (1.22), and Bundler cannot continue. Make sure that `gem install mime-types -v '1.22'` succeeds before bundling."
Where the gem name maybe different, it will be helpful to have a look at this solution:
cacert.pem file from http://curl.haxx.se/ca/cacert.pem. Save this file to C:\dev\cacert.pem or whatever directory you can use for this.SSL_CERT_FILE. To set this in your current command prompt session, type:set SSL_CERT_FILE=C:\dev\cacert.pem
More info at: https://gist.github.com/fnichol/867550
It worked like a charm for me!
Hope it helps
Monday, April 4, 2011
Humans: "The most remarkable species of all"
more info at: bbc.oc.uk/humanplanet
Friday, July 16, 2010
Prog Rock History Documentary from the BBC
Grab it here!
Part 1: http://www.youtube.com/watch?v=Rt6uWZpIiMY
Part 2: http://www.youtube.com/watch?v=lZ8zYI6ZQGI
Part 3: http://www.youtube.com/watch?v=Sqgg-QAMAzQ
Part 4: http://www.youtube.com/watch?v=vVwMczOsIPs
Part 5: http://www.youtube.com/watch?v=IlznYUVe4Dw
Part 6: http://www.youtube.com/watch?v=lyOqgUZumI4
Part 7: http://www.youtube.com/watch?v=r_71Et0CWfc
Part 8: http://www.youtube.com/watch?v=hpk1wFYwcyo
Part 9: http://www.youtube.com/watch?v=PncE95EBulc
Thursday, May 27, 2010
Some information about what motivates us
Sunday, April 4, 2010
About: Something new about how we should take care interpreting the fossil records
I'm pretty much amused about the amount of new information regarding evolution, creationism, the particle of God and so on that pop up into some of my "feeds" (lots directly from my contacts) so it seems like it should be an interesting topic to me, but it gets more and more unappealing, maybe because the "disinformation" the "sci media" creates all around. To anyone interesting on these topics I'll recommend two books, one from 1925 by G.K. Chesterton called The Everlasting Man (you can find it online), which doesn´t address the topic itself but I think it can shed some lights about some of the ideas behind this "disinformation". The second one is much more modern, it's written by Francis S. Collins noted for his landmark discoveries of disease genes and his leadership of the Human Genome Project (HGP) and is called The Language of God. I know these are not the usual books that you'll be pointed to when researching these topics and that´s why I'm doing it here.
Getting back to the initial intent for this post here is the link to the article I've cited first. It sounded earth shattering to me at least in my very first reading. It's interesting seeing how new discoveries can change much of the assumptions we have now. I'd love to see how this gets addressed in the near future, how the changes this and lot of other research papers get used in refining old theories and creating new ones (better than the old ones I hope) and how this is addressed by the scientific community.
Thursday, January 7, 2010
Great Corporate Values
I think there are a couple of themes running inside this "Corporate Culture Manifesto" that seems to make that much sense:
- Maximum profitability might be sacrificed to the development of employee potential.
- My worst fear is that we would become a "professionally managed" company with our eye only on the bottom line.
- A key point to remember is that the company is a means, not an end.
- Each of your co-workers, our customers, our suppliers, and anyone else you deal with is a person, just like you.
- Bring yourself to your work!
Hope this helps to inspire those managers around here
Saturday, October 24, 2009
Interesting Article about Digital Socialization
Friday, April 17, 2009
Another interesting video
Wednesday, April 15, 2009
What is it a mashup?
Monday, January 12, 2009
Interesting Article: Work on Stuff that Matters
See'ya soon
Pablo
Tuesday, December 23, 2008
And there were shepherds…
Imagine it’s the night shift; you’re a security guard walking the perimeter of the factory that you and your co-workers have been entrusted with. What would it take for you all to down flashlights, abandon your posts and walk three miles into town to the office block on the high street?
The news that there’s a baby in the bottom drawer of a desk on the second floor of the block?
Would that be enough? Or would it take a host of angels singing in the sky and telling you that not only had a baby been born, but the baby was the saviour of the world? And by the way you’ll find him in the bottom drawer of a desk in a second floor office.
I like the shepherds. They’re ordinary folk, looked down on by most people, doing a job most people didn’t want to do, sleeping out on hillsides, looking after dumb animals for not much money. When it comes to it, though, they have their priorities right. They down staffs and scuttle off to check out whether there is indeed a baby in an unlikely crib. And they tell others. I suspect their lives were never quite the same again.
Except, of course, on the surface nothing had changed – the hills were still there, no longer alive with the sound of music; the sheep were there, still dumb, still vulnerable to wolves, and their wages were still low and their prospects unaltered. Except. Except for the fact that everything had changed. Hope had illuminated the horizons of their heart as surely as light filled the night sky. There is a God. He has not forgotten us. He is alive. He has intervened. He has a plan. And it changes how I see all of life, even if most of my life does not change.
And this is such good news.
(from Mark Green@LICC )
Wednesday, September 17, 2008
Church of England Apology to Darwin and Michael Reiss forced resignation from Royal Society
Regarding Darwin story:
- Official Statement: Good religion needs good science
- Michael Reiss' Online Speech (please have a read at this before all the other)
- Royal Society accepts that Michael Reiss has been badly treated.
- "An invisible sky fairy"