<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>pgrep &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/pgrep/</link>
	<description>Feed of posts on WordPress.com tagged "pgrep"</description>
	<pubDate>Sun, 29 Nov 2009 06:50:18 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Easy user process termination in Solaris and Linux]]></title>
<link>http://aitatech.wordpress.com/2009/07/02/easy-user-process-termination-in-solaris-and-linux/</link>
<pubDate>Thu, 02 Jul 2009 14:35:19 +0000</pubDate>
<dc:creator>elakatanish</dc:creator>
<guid>http://aitatech.wordpress.com/2009/07/02/easy-user-process-termination-in-solaris-and-linux/</guid>
<description><![CDATA[Does anyone know how to determine a user process through a single command in Solaris and Linux ? (Ia]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Does anyone know how to determine a user process through a single command in Solaris and Linux ? (Iam not speaking about ps command)</p>
<p>Here is the command</p>
<p><strong># pgrep -l -u &#60;username&#62;</strong></p>
<p>eg: <strong># pgrep -l -u test</strong></p>
<p>This will display the PIDs and Process names</p>
<p>Eureka..</p>
<p>After this  you can kill the process  with its id</p>
<p><strong># kill &#60;PID value&#62;</strong></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ferramentas que auxiliam na monitoração de processos]]></title>
<link>http://ivanix.wordpress.com/2009/01/17/ferramentas-que-auxiliam-na-monitoracao-de-processos/</link>
<pubDate>Sat, 17 Jan 2009 16:38:27 +0000</pubDate>
<dc:creator>Nix</dc:creator>
<guid>http://ivanix.wordpress.com/2009/01/17/ferramentas-que-auxiliam-na-monitoracao-de-processos/</guid>
<description><![CDATA[Em dois posts, comentei sobre os comandos ps, kill, fg, bg, nice, renice&#8230; Nesse post, quero fa]]></description>
<content:encoded><![CDATA[Em dois posts, comentei sobre os comandos ps, kill, fg, bg, nice, renice&#8230; Nesse post, quero fa]]></content:encoded>
</item>
<item>
<title><![CDATA[Gerenciando processos no Linux]]></title>
<link>http://ivanix.wordpress.com/2009/01/01/gerenciando-processos-no-linux/</link>
<pubDate>Fri, 02 Jan 2009 01:41:39 +0000</pubDate>
<dc:creator>Nix</dc:creator>
<guid>http://ivanix.wordpress.com/2009/01/01/gerenciando-processos-no-linux/</guid>
<description><![CDATA[Processo é definido como porções de programas ou programa inteiro em funcionamento na memória do com]]></description>
<content:encoded><![CDATA[Processo é definido como porções de programas ou programa inteiro em funcionamento na memória do com]]></content:encoded>
</item>
<item>
<title><![CDATA[Linux Command 12 -  ps, ptree, pgrep, pidof, pkill, kill, killall]]></title>
<link>http://linuxfrombeginning.wordpress.com/2008/09/28/linux-command-12-ps-ptree-pgrep-pidof-pkill-kill-killall/</link>
<pubDate>Sun, 28 Sep 2008 17:28:52 +0000</pubDate>
<dc:creator>linuxlibrary</dc:creator>
<guid>http://linuxfrombeginning.wordpress.com/2008/09/28/linux-command-12-ps-ptree-pgrep-pidof-pkill-kill-killall/</guid>
<description><![CDATA[1) ps = report process status ps : typing ps alone would list the current running processes ps -u us]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>1) <strong>ps </strong>= report process status</p>
<p><strong>ps </strong>: typing ps alone would list the current running               processes</p>
<p><strong>ps -u username</strong> : to search processes run by a certain user</p>
<p><strong>ps ag : </strong>to get information about all running process</p>
<p><strong>ps aux</strong> : to display the owner of the processes along with the processes</p>
<p><strong>ps ax &#124; grep  processname</strong> : to see if a particular process is running or not</p>
<p><span style="color:#ffffff;">.</span></p>
<p>2) <strong>ptree </strong>: to display a tree of processeses</p>
<p><strong>pstree -p &#124; less</strong> : also display the pid of the process</p>
<p><span style="color:#ffffff;">.</span></p>
<p>3) <strong>pgrep</strong> : look up or signal processes based on name and other attributes</p>
<p><strong>pgrep sshd</strong> : to list the processes called sshd</p>
<p><strong>pgrep -u root sshd</strong> : will only list the processes called sshd AND owned by root</p>
<p><strong>pgrep -u root,daemon</strong> : will list the processes owned by root OR daemon</p>
<p><span style="color:#ffffff;">.</span></p>
<p>4) <strong>pidof </strong>&#8211; find the process ID of a running program</p>
<p><strong>pidof emacs</strong> &#8211; list the process id for emacs</p>
<p>pgrep and pidof is much the same except that grep is more powerful it has more options (check man pages for both)</p>
<p><span style="color:#ffffff;">.</span></p>
<p>5) <strong>pkill </strong>= kill all processes matching the search text</p>
<p><strong>pkill sshd </strong>: kill all sshd processes</p>
<p><strong>pkill -9 –u userlogin</strong> : kill a process owned by a particular user</p>
<p><span style="color:#ffffff;">.</span></p>
<p>6) <strong>kill </strong>= Send a signal to terminate one or more process IDs</p>
<p><strong>kill 2345</strong> : terminate process 2345 (to list process id use ps)</p>
<p><strong>kill -9 2345</strong> : if kill 2345 doesnt work, use kill -9 2345 to force it</p>
<p><span style="color:#ffffff;">.</span></p>
<p>7) <strong>killall </strong>= kill all processes by name</p>
<p><strong>killall nautilus</strong></p>
<p>Unlike the kill command, it is not necessary to first try to find the PID(s) for nautilus. And if there are multiple instances of nautilus running, all will be terminated immediately.</p>
<p>killall is similar to pkill</p>
<pre><strong><strong>
</strong></strong></pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Comandos para GNU/Linux poco conocidos]]></title>
<link>http://solognu.wordpress.com/2008/06/29/comandos-para-gnulinux-poco-conocidos/</link>
<pubDate>Sun, 29 Jun 2008 16:14:44 +0000</pubDate>
<dc:creator>sosias</dc:creator>
<guid>http://solognu.wordpress.com/2008/06/29/comandos-para-gnulinux-poco-conocidos/</guid>
<description><![CDATA[De atoztoa en ATOzTOA Encontrar rápidamente el PID con pgrep pgrep busca en los procesos ejecutados ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>De atoztoa en <a title="Linux Commands I Hardly Knew" href="http://atoztoa.blogspot.com/2008/06/linux-commands-i-hardly-knew.html" target="_blank">ATOzTOA</a></strong></p>
<p><strong>Encontrar rápidamente el PID con pgrep</strong></p>
<p><strong>pgrep</strong> busca en los procesos ejecutados actualmente enumerando los identificadores de procesos que coincide con el criterio de búsqueda.</p>
<p>pgrep ssh<br />
-Da como resultado todos los PID asociados con el proceso ssh.</p>
<p><strong>Ejecutar el último comando</strong></p>
<p><strong>!!</strong><br />
Ejecuta el último comando que has usado en la línea de comandos.</p>
<p>¿No se usa la tecla flecha arriba para eso?</p>
<p>El comando !! es muy útil cuando te olvidas de empezar un comando con sudo:</p>
<p>apt-get update<br />
sudo !!</p>
<p><strong>Ejecutar el último comando que empieza con&#8230;</strong></p>
<p>Si quieres ejecutar el último comando del historial que empieza por S puedes usar el siguiente comando:</p>
<p><strong>!s</strong><br />
<em>-Ejecuta el último comando del historial que empiece con s.</em></p>
<p><strong>Último argumento</strong></p>
<p>Puedes usar el último argumento del comando anterior con $_</p>
<p><em>por lo que sólo tendrás que escribir una ruta larga una vez:</em><br />
cp assignment.htm /home/phill/reports/2008/<br />
cd $_<br />
<em>para ir directamente a la carpeta</em></p>
<p>Puedes usarlo como te guste. Pero siempre el <strong>último argumento</strong> del comando anterior.</p>
<p>Al igual que con $_ para obtener el último argumento, puedes pulsar <strong>ALT+</strong> para pegar de forma instantánea en la posición del cursor.</p>
<p><strong>Ejecutar un comando repetidamente y mostrar su salida</strong></p>
<p><strong>watch</strong> ejecuta un comando periódicamente, mostrando su salida. Te permite monitorizar la salida del programa cada cierto tiempo. Por defecto, el programa se ejecuta cada dos segundos. Watch es muy similar a tail.</p>
<p>watch -d ls -l<br />
<em>-Monitoriza el directorio actual en busca de cambios y los resalta si el cambio ocurre.</em></p>
<p><strong>Guardar archivos rápidamente en VI/VIM</strong></p>
<p>Puedes usar <strong>:wp</strong> y más fácil aun <strong> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_mad.gif' alt=':x' class='wp-smiley' /> </strong></p>
<p><strong>Salir inmediatamente del terminal</strong></p>
<p>Para salir rápidamente de la sesión del terminal basta con presionar <strong>CTRL+D</strong></p>
<p><strong>Ir al último directorio donde estabas</strong></p>
<p><strong>cd -</strong><br />
te lleva al último directorio donde estabas</p>
<p><strong>Crear directorios padres de forma inteligente</strong></p>
<p><strong>mkdir -p /home/adam/make/all/of/these/directories/</strong> crea todos los directorios, incluso si no existen. No necesitas hacer mkdir make ; cd make ; mkdir all ; cd all ; mkdir of ; cd of …</p>
<p><strong>Borrar una línea completa</strong></p>
<p>Si has escrito una larga línea que no necesitas ejecutar, borra la línea con: <strong>CTRL+U,K</strong>. Eso no es fácil. CTRL+U borra todo lo que este a la izquierda del cursor y CTRL+K lo de la derecha. Como alternativa, se puede usar <strong>CTRL+C</strong> que descarta el actual comando escrito, y da una nueva línea. <strong>CTRL+L</strong> limpia la pantalla.</p>
<p><strong>Establecer la fecha y hora de un archivo </strong></p>
<p><strong>touch -c -t 0801010800 filename.c</strong> pone la fecha y hora del archivo a 2008-01-01 a 8:00. El formato es (YYMMDDhhmm)</p>
<p><strong>Editar un comando</strong></p>
<p><strong>fc</strong> abre el último comando de tu historial shell en el editor por defecto. Se puede especificar un editor. Le puedes indicar el número de línea del historial del comando o las primeras letras del comando más reciente.<br />
fc -e kate wget<br />
<em>- abre kate con el último comando del historial que empieza por wget. Cuando lo edites, guardes y cierres kate, el comando será ejecutado.</em></p>
<p><strong>Signo &#38;</strong></p>
<p>Al terminar un comando con el signo <strong>&#38;</strong> se ejecuta el comando con un nuevo PID, dejando libre la línea de comandos. Útil para correr comandos en segundo plano.</p>
<p><strong>Reiniciar su sesión de comandos</strong></p>
<p>En lugar de matar y volver a comenzar su sesión de terminal, simplemente escribe el comando <strong>reset</strong>. Se restablecerá el terminal a su valor por defecto, borra la pantalla, y todo será como lo era antes.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[New tools: pkill and pgrep]]></title>
<link>http://administratosphere.wordpress.com/2008/03/21/new-tools-pkill-and-pgrep/</link>
<pubDate>Fri, 21 Mar 2008 22:04:04 +0000</pubDate>
<dc:creator>ddouthitt</dc:creator>
<guid>http://administratosphere.wordpress.com/2008/03/21/new-tools-pkill-and-pgrep/</guid>
<description><![CDATA[In Solaris 9, two new utilities were added: pkill and pgrep. These tools are perhaps old news to Sol]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In Solaris 9, two new utilities were added: pkill and pgrep.  These tools are perhaps old news to Solaris admins.  However, these utilities were then quietly added to Linux in short order, and now show up in HP-UX 11i v3 and perhaps others.  What do these tools do?</p>
<p>First of all, pkill is just a wrapper for pgrep.  Well, what does pgrep do?  It searches the current processes for a match based on arguments that you give to it.</p>
<p>The most common use would be to search for a command.  The pgrep utility will then return each process ID, one per line.  The pkill utility will send the default kill signal to each pid.  The pgrep utility can search based on a large array of factors, including userid, groupid, virtual size, effective user ids, command name, full command string, and more.</p>
<p>Here&#8217;s an example:</p>
<p><code># pgrep cache<br />
13<br />
12<br />
14<br />
15<br />
33<br />
49<br />
22006<br />
21950<br />
21973<br />
21976<br />
#</code></p>
<p>When combined with scripting, these commands can be quite useful. Consider this ksh snippet:</p>
<p><code>for i in $(pgrep cache) ; do<br />
&#160;&#160;// do some commands here<br />
done</code></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Checking For Duplicated Processes In Korn Shell]]></title>
<link>http://nanotaboada.wordpress.com/2008/02/20/checking-for-duplicated-processes-in-korn-shell/</link>
<pubDate>Wed, 20 Feb 2008 13:55:26 +0000</pubDate>
<dc:creator>Nano Taboada</dc:creator>
<guid>http://nanotaboada.wordpress.com/2008/02/20/checking-for-duplicated-processes-in-korn-shell/</guid>
<description><![CDATA[A couple of days ago I was needing to solve an issue with our EAI framework. The implementation of s]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>A couple of days ago I was needing to solve an issue with our <acronym title="Enterprise Application Integration">EAI</acronym> framework. The implementation of such framework could be basically described as instances of Java programs running under Solaris, but there&#8217;s a particular instance that should be running just once. So I wrote this tiny shell script to avoid launching that program twice:<br />
<code><strong><br />
#!/bin/ksh<br />
#<br />
theProcess=<em>someProcess</em><br />
if [ $(pgrep -u $USER -f $theProcess &#124; wc -l) -gt 0 ] then<br />
    echo "There is an instance of "$theProcess" already running."<br />
else<em> runTheProcess</em><br />
fi<br />
</strong></code><br />
<em>someProcess</em> could be any <a href="http://en.wikipedia.org/wiki/Regular_expression" title="Regular expression">regex</a> that matches the process description,<br />
<em>runTheProcess</em> is whatever command that executes the process.<br />
Okay, that&#8217;s all, I hope you&#8217;ve found it informative and thanks for reading!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[the big bash commands list....]]></title>
<link>http://readthisaloud.wordpress.com/2007/12/05/the-big-fuck-off-bash-commands-list/</link>
<pubDate>Wed, 05 Dec 2007 22:20:30 +0000</pubDate>
<dc:creator>Rock &#39;n Snap</dc:creator>
<guid>http://readthisaloud.wordpress.com/2007/12/05/the-big-fuck-off-bash-commands-list/</guid>
<description><![CDATA[Yes, this is my first attempt of creating a list of useful, everyday bash commands &#8211; as I find]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Yes, this is my first attempt of creating a list of useful, everyday bash commands &#8211; as I find myself constantly in the situation looking for a specific bash command. If you&#8217;re unlucky, googleing the right command (especially if you don&#8217;t know what it&#8217;s called) can cost you several minutes if not hours.</p>
<p>So this will save me and hopefully you as well, the next time plenty of time. If you think there&#8217;s an important command still missing, which is more than likely, <u><strong>feel free to leave a comment with the command</strong></u> and a short explanation what it does.</p>
<p>Very special thanks to Bernd for the idea and his input! Thank you!</p>
<p><!--more--></p>
<p><strong>Basics:</strong></p>
<p><code>cp test.txt /home/user/Desktop</code> copies a txt file called test to the user&#8217;s Desktop</p>
<p><code>mv /home/test.txt /home/user/Desktop/</code>                            moves a txt file called test from the user&#8217;s home directory to the Desktop</p>
<p><code>sudo chmod -R 755 *</code> changes the user rights recursively for the owner to read, write and execute &#8211; for group and world to read and execute. (this command requires root rights «sudo»)</p>
<p><code>sudo chmod -R u+w /home/user/data</code> changes the user rights for the owner recursively to write and read of the directory /home/user/data</p>
<p><code>echo $USER</code> prints the currently being used user name</p>
<p><code>sudo chown -R $USER.users ~/.kde/share/apps/kmail/mail</code> changes the user ownership of the directory  ~/.kde/share/apps/kmail/mail to the currently being used user name</p>
<p><code>ls -la ~/.kde/share/apps/</code> lists the content of a directory e.g ~/kde/share/apps/</p>
<p><code>ls &#124; wc -l</code> counts the files in a directory</p>
<p><code>cp test.txt{.bkp}</code> copies text.txt to text.txt.bkp (creates a backup)</p>
<p><code>uname -a or uname -a &#124; awk '{print $3}'</code> lists your current kernel version number (awk &#8216;{print $3} prints only the kernel version, without its description)</p>
<p><strong>Going deep: </strong></p>
<p><code>perl -pi.bak -e 's/search/replace/' *.php</code> replaces in all .php files the word &#8220;search&#8221; with &#8220;replace&#8221; and creates a backup file .bak e.g. index.php to index.php.bak</p>
<p><code>grep --color ;</code> displays the search result in colour</p>
<p><code>grep -r  searches /home/</code> searches recursively in /home/</p>
<p><code>pgrep firefox</code> displays the process ID number of firefox or any application. useful to «kill» a process</p>
<p><code>sudo kill -9 pid</code> pid = processID number &#8230;.. kill -9 kills the process (requires root rights)</p>
<p><code>sudo /etc/init.d/networking restart</code> restarts the networking service</p>
<p><strong>Mounting:</strong></p>
<p><code>sudo mkdir hda1</code> creates a directory called &#8220;hda1&#8243;</p>
<p><code>sudo mount /dev/hda1 /mnt/hda1</code> mounts the harddisk hda1 into the directory /mnt/hda1</p>
<p><code>sudo umount /dev/sdb5</code> unmounts a device «sdb5» (in this case usb device)</p>
<p><code>sudo mount -t ntfs-3g /dev/hda5 /mnt/windows -o locale=de_DE.utf8</code> mounts a NTFS formatted harddisk read and writeable into /mnt/windows (this implies that the packages «ntfs-3g» &#38; «ntfs-config» are installed)</p>
<p><code>sudo mount -t vfat /dev/hda1 /mnt/windows_c</code> mounts a FAT formatted harddisk read and writeable into /mnt/windows_c</p>
<p><code>sudo blkid</code> shows UUID number of a device</p>
<p><code>mount</code> lists mounted devices</p>
<p><code>lsusb</code> lists usb devices</p>
<p><code>sudo fdisk -l</code> lists all mounted and unmounted harddisks or partitions</p>
<p><code>fuser -v /mount/point</code> displays why a device can&#8217;t be unmounted and which process/user uses the device</p>
<p><strong>Misc:</strong></p>
<p><code>update-alternatives --config editor</code> let&#8217;s you change the standard terminal editor (e.g from vim to nano)</p>
<p><code>ls -la /etc/alternatives/javac</code> lists all java compilers</p>
<p><code>java -version</code> displays the currently installed java version</p>
<p><code>msgfmt test.po -o test.mo</code> compiles a language translation file (po) into a binary .mo file &#8230;. -o stands for output</p>
<p><code>sudo aptitude install language-pack-gnome-de</code> installs a package from a repository (e.g. german gnome language pack)</p>
<p><code>sudo aptitude install tree</code> installs a package called «tree»</p>
<p><code>tree -d  -i (-i removes the 'tree')</code> lists directories and subdirectories&#8230;<br />
<code>tree -d -i &#62; dir.txt</code> lists directories and subdirectories and saves the content into dir.txt</p>
<p><code>aptitude show ktorrent</code> shows information on ktorrent and lists where it&#8217;s available (which repository)</p>
<p>MPLAYER:<br />
<code>mplayer -dumpstream "mms://a1505.v16544e.c16544.g.vm.akamaistream.net/7/1505/16544/v001/roomediaco1.download.akamai.com/16544/wm.roomedia/streamingVX/17056/1386/laptop_300.wmv?clipId=1386_computing_0030&#38;channel=Netevents+TV&#38;category=netevents+tv&#38;site=vnudotnet%2fcomputing" -dumpfile laptop.wmv</code> downloads a stream and saves it as «laptop.wmv»</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Signals: the rest of the story...]]></title>
<link>http://administratosphere.wordpress.com/2007/11/08/signals-the-rest-of-the-story/</link>
<pubDate>Thu, 08 Nov 2007 10:07:42 +0000</pubDate>
<dc:creator>ddouthitt</dc:creator>
<guid>http://administratosphere.wordpress.com/2007/11/08/signals-the-rest-of-the-story/</guid>
<description><![CDATA[Most administrators (and UNIX users) will probably know about the kill command &#8211; and will know]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Most administrators (and UNIX users) will probably know about the kill command &#8211; and will know not to use kill -9 without first trying the kill command by itself.  You may also be aware that kill (by itself) sends a SIGTERM signal to the process, and that signal 9 is the SIGKILL signal.</p>
<p>There are many other signals; they are usually available with the kill -l command.  OpenBSD returns this output:</p>
<p><code># kill -l<br />
1    HUP Hangup   17   STOP Suspended (signal)<br />
2    INT Interrupt       18   TSTP Suspended<br />
3   QUIT Quit       19   CONT Continued<br />
4    ILL Illegal instruction       20   CHLD Child exited<br />
5   TRAP Trace/BPT trap       21   TTIN Stopped (tty input)<br />
6   ABRT Abort trap       22   TTOU Stopped (tty output)<br />
7    EMT EMT trap       23     IO I/O possible<br />
8    FPE Floating point exception       24   XCPU Cputime limit exceeded<br />
9   KILL Killed       25   XFSZ Filesize limit exceeded<br />
10    BUS Bus error       26 VTALRM Virtual timer expired<br />
11   SEGV Segmentation fault       27   PROF Profiling timer expired<br />
12    SYS Bad system call       28  WINCH Window size changes<br />
13   PIPE Broken pipe       29   INFO Information request<br />
14   ALRM Alarm clock       30   USR1 User defined signal 1<br />
15   TERM Terminated       31   USR2 User defined signal 2<br />
16    URG Urgent I/O condition<br />
#</code></p>
<p>However, the output is not always so helpful, though it always reports on the available signals.  HP-UX reports thusly:</p>
<p><code># kill -l<br />
1) HUP<br />
2) INT<br />
3) QUIT<br />
4) ILL<br />
5) TRAP<br />
6) ABRT<br />
7) EMT<br />
 <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> FPE<br />
9) KILL<br />
10) BUS<br />
11) SEGV<br />
12) SYS<br />
13) PIPE<br />
14) ALRM<br />
15) TERM<br />
16) USR1<br />
17) USR2<br />
18) CHLD<br />
19) PWR<br />
20) VTALRM<br />
21) PROF<br />
22) IO<br />
23) WINCH<br />
24) STOP<br />
25) TSTP<br />
26) CONT<br />
27) TTIN<br />
28) TTOU<br />
29) URG<br />
30) LOST<br />
31) RESERVED<br />
32) The specified trap syntax is not correct.<br />
33) XCPU<br />
34) XFSZ<br />
35) The specified trap syntax is not correct.<br />
36) The specified trap syntax is not correct.<br />
37) RTMIN<br />
38) RTMIN+1<br />
39) RTMIN+2<br />
40) RTMIN+3<br />
41) RTMAX-3<br />
42) RTMAX-2<br />
43) RTMAX-1<br />
44) RTMAX</code></p>
<p>You may also note that higher numbered signals tend to vary more.</p>
<p>There are several signals to note.  One not commonly used is SIGCHLD: when you have a zombie process, note the parent of the zombie process and send it a SIGCHLD signal: kill -CHLD <em>ppid</em> . This will, in a proper situation, cause that program to reap its children and cause the zombie to disappear.  Whether it actually works or not &#8211; you just have to try it.</p>
<p>Another signal not often used is the STOP signal.  If there is a unimportant process hogging the processing power of the machine, it can be &#8220;stopped&#8221; (that is, frozen) and left in its place: kill -STOP <em>pid</em> .  Then later, the process can be continued with the command: kill -CONT <em>pid .</em> The process will continue as if it had never stopped.</p>
<p>Another way that the STOP signal can be &#8220;sent&#8221; is with the shell&#8217;s job control mechanism.  Using the korn shell, a ^Z (ctrl-z) sent to a process sends the process a SIGSTOP and returns you to the shell.  The fg shell command puts the command in the foreground and sends it a SIGCONT.  The bg is the same but continues the program in the background.  Thus, when a long running process is started in the foreground, and you get tired of waiting &#8211; send it a ^z and use bg to put it into the background.</p>
<p>Another way to send signals is by using the pkill command.  This is a newer command, apparently introduced in Solaris 7, and now found in HP-UX, OpenBSD, Linux, and probably others.  The command pkill is like kill, but allows searching for processes by their attributes (such as userid, terminal, group, state, or even a regular expression) and sends the signal to all that match. Being a newer command, it is best to check the man page for exact syntax.</p>
<p>Yet another signal: EXIT.  This is not actually a signal, but is treated by one by some shells (including the Korn Shell).  This uses signal 0, and is recognized by the shell&#8217;s <em>trap </em>command.  Thus, using a <em>trap </em>command with a signal 0 permits the shell to execute things when it exits (such as file cleanup).</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
