Zombie process is an inactive computer process.
A zombie process or defunct process is a process that has completed execution but still has an entry in the process table, allowing the process that started it to read its exit status.
* A process can be sleeping in kernel code. Usually that's because of faulty hardware or a badly written driver- or maybe a little of both. A device that isn't set to the interrupt the driver thinks it is can cause this, for example- the driver is waiting for something its never going to get. The process doesn't ignore your signal- it just never gets it.
A zombie process doesn't react to signals because it's not really a process at all- it's just what's left over after it died. What's supposed to happen is that its parent process was to issue a "wait()" to collect the information about its exit. If the parent doesn't (programming error or just bad programming), you get a zombie. The zombie will go away if its parent dies- it will be "adopted" by init which will do the wait()- so if you see one hanging about, check its parent; if it is init, it will be gone soon, if not the only recourse is to kill the parent..which you may or may not want to do.
Finally, a process that is being traced (by a debugger, for example) won't react to the KILL either.
So how do I find out zombie process?
# top
or
# ps aux | awk '{ print $8 " " $2 }' | grep -w Z
How do I kill zombie process?
You cannot kill zombies, as they are already dead. But if you have too many zombies then kill parent process or restart service.
You can kill zombie process using PID obtained from any one of the above command. For example kill zombie proces having PID 4104:
# kill -9 4104
The /etc/init.d directory contains the scripts executed by init at boot time and when the init state (or "runlevel") is changed.
These scripts are referenced by symbolic links in the /etc/rcn.d directories. When changing runlevels, init looks in the directory /etc/rcn.d for the scripts it should execute, where n is the runlevel that is being changed to, or S for the boot-up scripts.
The names of the links all have the form Smmscript or Kmmscript where mm is a two-digit number and script is the name of the script (this should be the same as the name of the actual script in /etc/init.d).
When init changes runlevel first the targets of the links whose names start with a K are executed, each with the single argument stop, followed by the scripts prefixed with an S, each with the single argument start. (The links are those in the /etc/rcn.d directory corresponding to the new runlevel.) The K links are responsible for killing services and the S link for starting services upon entering the runlevel.
For example, if we are changing from runlevel 2 to runlevel 3, init will first execute all of the K prefixed scripts it finds in /etc/rc3.d, and then all of the S prefixed scripts in that directory. The links starting with K will cause the referred-to file to be executed with an argument of stop, and the S links with an argument of start.
The two-digit number mm is used to determine the order in which to run the scripts: low-numbered links have their scripts run first. For example, the K20 scripts will be executed before the K30 scripts. This is used when a certain service must be started before another. For example, the name server bind might need to be started before the news server inn so that inn can set up its access lists. In this case, the script that starts bind would have a lower number than the script that starts inn so that it runs first:
/etc/rc2.d/S17bind
/etc/rc2.d/S70inn
The two runlevels 0 (halt) and 6 (reboot) are slightly different. In these runlevels, the links with an S prefix are still called after those with a K prefix, but they too are called with the single argument stop.
Also, if the script name ends in .sh, the script will be sourced in runlevel S rather than being run in a forked subprocess, but will be explicitly run by sh in all other runlevels.
Basics
Note :
Arrays initialization described below will works only in bash shell.
sh
use execute command as
bash
In Shell Scripting arrays are relatively easy to construct.
Example:
-----------------------------------------
#!/bin/bash
array=(red green blue yellow magenta)
len=${#array[*]}
echo "The array has $len members. They are:"
i=0
while [ $i -lt $len ]; do
echo "$i: ${array[$i]}"
let i++
done
------------------------------------------
Run this example:
$ ./myscript.sh
The array has 5 members. They are:
0: red
1: green
2: blue
3: yellow
4: magenta
Now, before you decide this is a silly, rather useless example, replace one line of the script and run it again:
array=(`ls`)
See what difference this makes (and think of all the kinds of lists you might create for this line).
Another example
------------------
#!/bin/bash
names=( Jaggu Teena Amma Sai )
for name in ${names[@]}
do
echo $name
# other stuff on $name
done
------------------
How to put a shell script in crontab to execute for every 5 minitues
0,5,10,15,20,25,30,35,40,45,50,55 * * * * bash /opt/kbabu/checklogs.sh > /opt/kbabu/errors_cron.log
Example to check logs using arrays
--------------------
#!/bin/bash
file=( "/opt/kbabu/log" "/opt/kbabu/log2" )
len=${#file[*]}
i=0;
while [ $i -lt $len ]
do
echo "file name : ${file[$i]}"
echo "checking log at time : `date`"
echo "`cat ${file[$i]} | grep Error`"
echo "`cat ${file[$i]} | grep ERROR`"
echo "`cat ${file[$i]} | grep Warning`"
echo "`cat ${file[$i]} | grep WARNING`"
i=`expr $i + 1`
done
--------------------
C:\mysql-5.0.16-win32\bin\mysqld.exe
C:\mysql-5.0.16-win32\bin\mysql -u root
How to log in to mysql ?
mysql -u root mysql
Then set a password (changing "NewPw", of course):
update user set Password=password('NewPw') where User='root';
flush privileges;
Creating a Database ?
create database database01;
All that really does is create a new subdirectory in your MYSQLHOME\data directory.
How to connect to DB?
use database01
How to create a new Table ?
create table table01 (field01 integer, field02 char(10));
How to see the existing tables ?
show tables;
How to see the table structure like desc in Oracle ?
show columns from table01;
How to insert data into a table ?
1)insert into table01 (field01, field02) values (1, 'first');
2)insert into table01 (field01,field02,field03,field04,field05) values
-> (2, 'second', 'another', '1999-10-23', '10:30:00');
Select commands in mysql ?
1) select * from table01;
Altering a table ?
1)alter table table01 add column field03 char(20);
2)alter table table01 add column field04 date, add column field05 time;
How to eneter a sql statement in multiple lines ?
create table table33
-> (field01
-> integer,
-> field02
-> char(30));
Updating a table data ?
update table01 set field04=19991022, field05=062218 where field01=1;
Deleting a record ?
delete from table01 where field01=3;
To come out of mysql prompt ?
quit
If below links are not working to download the files ..please drop me a mail so that I can send those docs through mail.
see my mail id the contact page
Networking Essentials
NMS EMS basics
EMS.pdf
snmp.pdf
snmp_overview.pdf
The CS Curriculum Search will help you find teaching materials that have been published to the web by faculty from CS departments around the world. You can refine your search to display just lectures, assignments or reference materials for a set of courses.
Searching for only courses that have been published to the web from the Google home page is not easy. Google recently launched a CS Curriculum Search to fix this and it can be found
http://code.google.com/edu/curriculumsearch/
Popular Posts
-
The best solution to know about these init levels is to understand the " man init " command output on Unix. There are basically 8...
-
How to Unlock BSNL 3G data card to use it with Airtel and Vodafone Model no : LW272 ? How to unlock BSNL 3G data card( Model no : LW272 )us...
-
How to transfer bike registration from one State to other (Karnataka to Andhra)?? Most of us having two wheelers purchased and registered in...
-
Latest Post on ETV D3 Old Post on ETV D1 D2 link ETV Dhee 3 - D3 - Enjoy maadi ETV Dhee feedback link - Direct ETV site use this...
-
ఓం శ్రీ స్వామియే శరణం ఆయ్యప్ప!! Related posts : Trip to Sabarimala - Part 1 Trip to Sabarimala - Part 2 Ayappa Deeksha required things...
Popular posts
- Airtel and vodafone GPRS settings for pocket PC phones
- Andhra 2 America
- Ayyappa Deeksha required things
- Blogs I watch !
- Captions for your bike
- DB2 FAQs
- Deepavali Vs The Goddes of sleep
- ETV - Dhee D2 D3
- Evolution of smoking in India Women
- How to make credit card payments?
- init 0, init 1, init 2 ..
- Java-J2EE interview preparation
- mCheck Application jar or jad download
- My SQL FAQs
- My Travelogues
- Old is blod - New is italic
- Online pay methids for credit cards
- Oracle FAQs
- Pilgrimages
- Smoking in Indian Women
- Technology Vs Humans
- Twitter feeds for all Telugu stars on single page.
- Unix best practices
- Unix FAQs