Making a list just because :).. Here are some of the things I install on a windows machine as soon as I get it
- Network
- Utilities
- SysAdmin
- Cloud
Whats on your workstation?
Making a list just because :).. Here are some of the things I install on a windows machine as soon as I get it
Whats on your workstation?
If you are every looking to match strings as a whole word instead of literal strings using a regular express, Word Boundaries are your friend
For example if you are looking to match a string of 10 numbers in a log file, you can use
[code]grep -i ‘\b[0-9]\{10,\}\b’ –color -H -n FILE_NAME_TO_SEARCH [/code]
The \b is the option that tells grep to look for a word character.
More information about the option is available at http://www.regular-expressions.info/wordboundaries.html
Use the following option to check out how network (NFS) shares are performing on your sever
[code]iostat -n 2[/code]
The -n option tells iostat to just show the network shares
2 tells iostat to refresh the stats every 2 seconds
Want your terminal to look like this?
In addition to the coolness, factor it also helps you do (monitor) multiple things at a time. In this screenshot
You can achieve this by using the nifty screen utility. Screen allows you to multiplex between multiple consoles. So you can open one terminal and have multiple consoles on it. The commands for using screen are a bit hard to get used to. Here are the shortcuts I used to achieve the screen above
[code]c[/code]
[code] Shift + s [/code]
[code]Shift + a[/code]
As you might have figured out by now, “ctrl + a” puts you into screen command mode. You can get a list of all available options by executing
[code]ctrl +a[/code]
[code]?[/code]
Here’s a quick reference guide that has more details http://aperiodic.net/screen/quick_reference
Have fun multitasking 🙂
I was listening to this week’s edition of Steve Gibson’s Security Now podcast and Steve talked about a unique way of using DNS. His spintrite application uses DNS to check for the latest version of the application. Most applications use http to check version information. This might pose a problem in environments with proxy servers. DNS traffic on the other hand is generally allowed in most environments. He says his application does a DNS lookup for something like application.version.grc.com and the “IP” address that is returned denotes the major and minor versions of the code. And depending on the response, the application will prompt with a “need to update” message.
Brilliant!!!
Here’s a more technical post way back from 2006 by Jan-Piet Mens on the same subject
http://jpmens.net/pages/checking-current-application-or-data-versions-using-dns/
It looks like I was able to accomplish writing the application that I wanted to on the App Engine in 2 days!! at least in it’s basic form. After some help from Google, I updated the application I created yesterday (http://samurai-apps.appspot.com/) to display the User Agent string being sent by the client.
The code has been updated to github at https://github.com/kudithipudi/google-app-engine/
Lessons from day 2?
Next, I will try to pretty it up a bit.
Isn’t it amazing that I was able to create a simple app in a matter of 2 days and host it on an “infinitely” scalable platform without even taking our my credit card.
Following up on my public resolution for his month..I started playing with Google App engine. I think a lot has been written about what it is and how it works, but in a nutshell, think of it as an environment to deploy your applications and not have to worry about underlying system capacity. It provides support for Java, Python and more recently Google’s own Go programming languages.
I chose Python, since I have been meaning to dabble in it for a while now. So without further adieu, here is a link to my first application on Google App Engine
http://samurai-apps.appspot.com/
And obviously it has to be hello world :).
How did I get here?
Pretty simple eh.. 🙂
Now the challenge is to program something more useful than print hellworld :).
Continuing on my project/month theme.. here is what I want to accomplish in May 2012
Why am I doing this? I understand the IaaS area pretty well, but am not well versed in the PaaS arena. Hoping this adventure will teach me some new things. And yes, I do plan on documenting my journey :).
Wish me luck 🙂
Phew.. that was a long title :). Was running into an issue with the setup shown in the picture below
When we try to access the web site using https, the html content being served back was showing the app server name as the reference, rather than the web site.
So in this example, let’s say the web address was kudithipudi.org and the app server was app-server-kudithipudi, the HTML content was showing https://app-server-kudithipudi:8080 as the source.
Here’s how, we fixed it.
Edit the server.xml file found in $JBOSS_HOME/server/$JBOSS_PROFILE/deploy/jboss-web.deployer and update the HTTPS connector to use the web address (kudithipudi.org) as the proxyName.
BEFORE
[code]<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="250" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/opt/jboss/jboss-as/server/kudithipudi/conf/ssl/kudithipudi.keystore"
keystorePass="xxxxxx" />
[/code]
AFTER
[code]<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="250" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
proxyName="kudithipudi.org" proxyPort="443"
keystoreFile="/opt/jboss/jboss-as/server/kudithipudi/conf/ssl/kudithipudi.keystore"
keystorePass="xxxxxx" />
[/code]
For my own notes.. if you are using grep to parse through the contents of a file and want to see the preceding or proceeding content than the line that matched your query, you can use the following options
preceding content [code]grep -B NUMBER_OF_LINES_TO_DISPLAY query filename[/code]
for example, if I was searching for kudithipudi in a file names access.log and want to see 2 lines prior to the match, I would use [code]grep -B 2 kudithipudi access.log[/code]
proceeding content[code]grep -A NUMBER_OF_LINES_TO_DISPLAY query filename[/code]
for example, if I was searching for kudithipudi in a file names access.log and want to see 2 lines after the match, I would use [code]grep -A 2 kudithipudi access.log[/code]
preceding and proceeding content[code]grep -C NUMBER_OF_LINES_TO_DISPLAY query filename[/code]
for example, if I was searching for kudithipudi in a file names access.log and want to see 2 lines before and after the match, I would use [code]grep -C 2 kudithipudi access.log[/code]