Skip to main content

Linux Signal Basics

Linux Signal

This topic i choose for reading purpose because if you need to know reason then you must know the application and its signal in the Operation System.

First the signals described in the original POSIX.1 standard.

or death of controlling process
SIGINT2TermInterrupt from keyboard
SIGQUIT3CoreQuit from keyboard
SIGILL4CoreIllegal Instruction
SIGABRT6CoreAbort signal from abort
SIGFPE8CoreFloating point exception
SIGKILL9TermKill signal
SIGSEGV11CoreInvalid memory reference
SIGPIPE13TermBroken pipe: write to pipe with no readers
SIGALRM14TermTimer signal from alarm
SIGTERM15TermTermination signal
SIGUSR130,10,16TermUser-defined signal 1
SIGUSR231,12,17TermUser-defined signal 2
SIGCHLD20,17,18IgnChild stopped or terminated
Continue if stopped
SIGSTOP17,19,23StopStop process
SIGTSTP18,20,24StopStop typed at tty
SIGTTIN21,21,26Stoptty input for background process
SIGTTOU22,22,27Stoptty output for background process
The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.

Difference between kill and pkill command
kill -signal pid
You have to know the pid before kill the process.
pkill -signal process
You can kill process using process name or pid.
You can get pid using pgrep command.
Difference betwen kill and kill -9
The kill and pkill command without any signal passes the signal 15. It terminates the process the normal way.
Some of the processes can ignore the signal 15 and won't terminate. So in those case we need to use signal 9 option. We can use signal 9 with kill and pkill.
kill -9 pid
pkill -9 process


Popular posts from this blog

Port forward of KVM Guest Virtual Machine through Host Machine using IPTABLE/FIREWALL in Linux System

Port forward of KVM Guest Virtual Machine through Host Machine using IPTABLE/FIREWALL in Linux System
There is a lot of method given in Internet for KVM guest machine port forwarding but I always look for the simple solution that can work in any Linux System.

I have issue during the port forward by IPTABLE/FIREWALL as it disable the Internet access within KVM guest machine.
If I look for Internet access within KVM guest machine then system disable port forwarding.

I have implement the simple solution in CentOS 6.5 x86_64 with can work in both situation as follows:

Step 1: Restart libvirtd service, so that it will modify your firewall rules as per KVM requirement.
# service libvirtd restart
Step 2: You need to add two rules in IPTABLE for NAT and FILTER
# iptables-save > iptable_save_default_libvirtd
# cp iptable_save_default_libvirtd iptable_modifed_libvirtd
# vim  iptable_modifed_libvirtd

Add line after *nat for SSH access

 -A PREROUTING -i eth0 -p tcp -m tcp --dport 222 -j DNA…

AMD Graphic Driver (Radeon 6400 series) Install on Linux CentOS-6.2 x86_64 bit

Add-on in Dell vostro 3350 laptop for AMD Catalyst™
driver Radeon HD 6400 series graphic card in CentOS 6.2 x86_64 Linux
Step1: Update the CentOS with following packages
# yum install kernel-devel kernel-headers gcc gcc-c++

Now download the driver from the amd site

Step2: Now install AMD Graphic driver

Step3: check log file
#vim /usr/share/ati/fglrx-install.log

there will be an error like this

"ERROR: Module drm is in use by i915,drm_kms_helper"
"You must change your working directory to /lib/modules/fglrx
and then call ./ in order to install the built module."

You can ignore these lines happily if they don’t contain any error message. You don’t really need to execute the command mentioned in those lines.

Step4: Blacklist radeon and radeonhd kernel modules

Add these lines to /etc/modprobe.d/blacklist.conf.

blacklist radeon
blacklist radeo…

Yum command for download list of packages

Some time we need the download the software but not to install.
Also we have a list of software from repository in a text file but need to download by the yum.
To solve this kind of problem we need some trick of Linux,
download the package yum-downloadonly plugin
create a text file with rpm name.
now parse it to yum command
#yum install $(cat rpm-list.txt)

to download only the packages
#yum install <package name> --downloadonly --downloaddir=/home/user/

combine command
# yum install  $(cat rpm-list.txt) --downloadonly --downloaddir=/home/user

create a list from yum.log
#cp /var/log/yum.log /home/user/yum.log

select the package name only
# awk '{print $5}' /home/user/yum.log > rpm-list.txt

view the list
# cat rpm-list.txt

 to query about a package
# repoquery --list <package name>

to take information about package
#yum info <package name>

to show the list of packages
# yum list

to find a package for yum list
# yum list | grep <package name>