Categories
bash Linux Solaris

core dump checking script.

I was testing a program which crashing every now and then. It is very difficult in such scenarios to keep looking for the core file or keep checking for the running process. So I wrote this simple script that can check for core file in the particular path and keep running until it finds one. You can hack this script to send a mail once the core is found. This is a very simple script. And this should work on solaris too..

#!/bin/bash –

#===============================================================================

#

# FILE: check_core.sh

#

# USAGE: ./check_core.sh

#

# DESCRIPTION: Script to check for core dumps

#

# OPTIONS: —

# REQUIREMENTS: —

# BUGS: —

# NOTES: —

# AUTHOR: Amit Agarwal (AKA), amit.agarwal@amit-agarwal.co.in

# COMPANY: Individual

# VERSION: 1.0

# CREATED: 12/14/2009 10:19:51 AM IST

# REVISION: —

#===============================================================================

path=/home/amit/

app_name=wine

app_pid=

[ -z $app_name ] || echo $app_name , pid_app=$(ps -u `whoami` -f|grep $app_name |grep -v grep)

[ -z $app_pid ] || echo $app_pid , pid_pid=$(ps -eaf|grep $app_pid |grep -v grep)

if [ -z $pid_app ]

then

while (true)

do

cd $path

if [ -f core ]

then

echo \”Core found\”

exit

else

echo \”continue\”

sleep 5

fi

done

fi

\"Reblog
Categories
Linux

10 Keyboard Techniques To Create Cool Symbols

\"Thumbnail\"All of us use the keyboard to create symbols daily. Look at the thumbnail. That’s a simple symbol created with just four keys.

Symbols existed even before the alphabets. Over the years they have been part of folklore, myths and legends. Some have stayed on as indelible marks. Some, like the swastika, are better forgotten. Symbols have remained potent. If you doubt their visual power, then look no further than logos. People shell out millions for a three-pointed star on a sleek hood or a prancing horse. Puzzled? The first one is the Mercedes logo and the latter is Ferrari’s.

In this post we will take a look at some symbols or images that we can reproduce using just the keyboard. The superset of creating images using letters/symbols on the keyboard goes by the name of ASCII (American Standard Code for Information Interchange) art. You need two things to draw ASCII art anywhere online…a keyboard and lots of patience.

How Do We Create Cool Symbols Using The Keys On Our Keyboard?

Text art/ ASCII art can be drawn using any text editor, online or offline. The simplest is Notepad on Windows or TextEdit for Mac. More advanced word processors have features which are more adept at selection and alignment functions like Overtype and Insert.

Can text art be learned and are there any special techniques to create cool figures?

The answer to the first is yes, it’s fairly easy to learn. There are some basics of course that need to be kept in mind. The rest as they say is practice.

Some basic techniques for keyboard symbols are :

  1. Use a fixed width (Courier, Monaco, and Fixedsys) font, to draw your symbols because every type of computer has them. Also called as a monospaced font, they are fonts whose letters each occupy the same amount of space and thus they are also easier to align with one another.
  2. Experts speak about noticing the difference between serif (with a short line at the end of the character) and sans serif (without the line at the end) fonts for text art. The display may differ from one computer to the next depending on the default type of font. One advice usually is to use the vertical bar (|) instead of the capital I (I) to draw vertical lines with the sans serif font.
  3. Draw in the Overtype mode on your word processor. This makes it easier to put in another character without re-aligning the neighboring ones.
  4. Use the Space key instead of the Tab key.
  5. Draw a rough sketch of the figure on paper and then put in place keyboard symbols and letters that bests approximate the angles and curves of your figure. For instance, o or @ for eyes, for hair etc. The most common symbols used in ASCII art are: / | – _ ( )
  6. Start small with simple symbols or figures. Example – a rose or a face.\"keyboard
  7. Begin from a simple area of the figure which has a shape that’s easy to type in.
  8. Go for close approximation rather than pinpoint accuracy…after all, accuracy is more suited for line art.
  9. Correct your mistakes early because leaving them for later will mar the precision and placement of symbols.
  10. Free your imagination!

Read more at : http://feedproxy.google.com/~r/Makeuseof/~3/F3o92_GVtP0/

\"Reblog
Categories
Uncategorized

[Movie Review]RANN- predictable from Puttu

IdealisticHarshvardhan mallik( B) and his son Jay(Sudeep), find their channel loosing out on popularity ratings for a rival channel smartly run by his X-employee Mohnish Behl. Jay is provoked and hence in an attempt to rebuild and regain the foothold,he plans a sting operationwith aspiring PM Manoj Pandey(Paresh Rawal) and his Co-Bro industrialistRajat Kapoor. Everybody gets their share,but end up gobbling the truth. How is that revealed and what are theirrepurcussions forms the rest.

Frankly this aint a media centric movie, it is just a common thing among all the characters. It doesn\’t give an insight or per se the background processing of how print media sell news and grab people\’s attention. Okay we even despise this fact, since movies are not meant to educate, but to entertain. Then in that case Rann aint such a bad movie. Infact its a movie wherein conflicting characters are caught in different situations and the way they react to it. Though predictable for most part, it keeps youinterested because of RGV\’s styleof framing.

For example, a scene where Paresh Rawal bursts into different gigglesby looking at her grandmotherwhile negotiating with Mohnish Behl, is endearing to watch.

In another scene, involving him he delivers following line to display his ferociousness “Kuch to vajay hogi ki hum Manoj pandey hain”..

Sudeep as Jay has mighty role, but he hams it up at one point and alleviates at another. Watch him in that scene where he tries to convince Bof the sting operation.

Paresh rawal (last seen in Daud), as usual is a irresistable to watch indhoti clad goonda..

Rajpal yadav as wannabe CD perfectlydescribes the nuts runningbehind breaking news.

Riteish deshmukh(Parag shastry, find out what his role is) an ardent fan of Harshvardhan mallik, plays a straight faced journalist with little effect.

Mohnish behl looks unreal andovercooks himself.

Big B is mechanical throughout,other than the the final act. Watch him closely in that terrifically rendered confession cum monologue at the end, u see trembling hands.

Dont expect a complete parda-fash or revelation of how media mis-use,glorify and magnify the news. The film explains the effect that media has on the ppl involved in a capsulic way,including us – the couch potatoes, but never explains the effect on media itself.And that is an irony.

As mentioned above its not “Not-watchable” kinda of movie in its entirety, but give it a shot if u have an appetite for RGV\’s trademark narration and and his team\’s technical brilliance.

The review is done by Prashant Prahlad Abkari, who is a collegue and good friend of mine.

\"Reblog