Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Save the Children

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 71 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       checkproc  [-v]  [-L]  [-k]  [-p  pid_file] [-c root] [-z]

       checkproc [-v] [-k] [-n] name_of_kernel_thread

       pidofproc [-k] basename_of_executable


       checkproc checks for running processes that use the speci­
       fied executable.

       checkproc does not use the pid to verify a process but the
       full path of the corresponding program which  is  used  to
       identify  the executable (see proc(5)).  Only if the inode
       number (/proc/<pid>/exe) and the full name are unavailable
       (/proc/<pid>/cmdline)  or  if  the  executable changes its
       zeroth   argument,   checkproc   uses   the   base    name
       (/proc/<pid>/stat)  to  identify the running program. Note
       that if the option -n for  kernel  thread  is  given  only
       (/proc/<pid>/stat) is used.  For this case a existing sym­
       bolic link (/proc/<pid>/exe) indicates that the  <pid>  is
       not a kernel thread.

       Extended  functionality  is  provided  by  the -p pid_file
       option (former option -f changed due to the LSB specifica­
       tion).   If  this  option is specified, checkproc tries to
       check the pid read from this file instead of  the  default
       (/var/run/<basename>.pid).  The pid read from this file is
       compared against the pids of the processes that  uses  the
       specified  binary.   Note that the behaviour is changed by
       the option -k.  With this option, the pid  read  from  the
       pid  file is the only used pid (see killproc(8)).  Without
       this option, the pid read from the pid  file  is  used  to
       search  the process table for a process with an executable
       that matches the specified pathname.  In  order  to  avoid
       confusion  with stale pid files, a not up-to-date pid will
       be ignored (see startproc(8)).

       The option -v makes checkproc print out verbose  messages.
       The  same  happens if pidofproc LSB variant is used.  This
       version also accepts also the base name  only  of  a  exe­
       cutable.   Note  that this disables the comparision of the
       inodes of the executable and the information found  within
       the proc table (see proc(5)).


       /full/path/to/executable or name_of_kernel_thread
              Specifies  the executable which processes should be
              found, or alternatively, if the  option  Or  alter­

       -L     This option causes symlinks to be followed, as  the
              like-named  option  in  ls(1).   Note: for the file
              name the original  name  of  the  program  is  used
              instead of the name of the symbolic link.

       -p pid_file
              Former  option -f changed due to the LSB specifica­
              tion.)  Use an alternate pid file  instead  of  the
              default /var/run/<basename>.pid.

       -c root
              Change  root  directory  to root for services which
              have been started with this option by startproc(8).

       -n     This  option  indicates that a kernel thread should
              be checked.  In this case not the  executable  with
              its  full path name is required but the name of the
              kernel thread.

       -q     This option is ignored.

       -v     Verbose output.

       -z     This option causes checkproc to see processes  even
              if  they  are  in  the  zombie state.  Without this
              option zombies are handled as not existent  because
              such  a  process isn't alive but listed in the pro­
              cess table and waits on its parent process.


       checkproc /usr/sbin/sendmail

              returns all pids of running sendmail processes.

       checkproc -p /var/myrun/lpd.pid /usr/sbin/lpd

              returns the command line or  the  basename  of  the
              process pid found in /var/run/lpd.pid.


       The exit codes have the following LSB conform conditions:

              0    Process is running
              1    No process but pid file found
              3    No process and no pid file found
            101    Wrong syntax on command line
            102    Other errors

       If  the  option  -k is used checkproc uses exit codes like
       startproc(8) and killproc(8) do.

       of the shell executable file is not identical to  that  of
       the script file) may not be identified by a filename path.


       /proc/ path to the proc file system (see proc(5)).

              path to the SuSE boot concept script base directory
              as required by the Linux Standard  Base  Specifica­
              tion (LSB) (see init.d(7)).


       startproc(8), killproc(8), insserv(8), init.d(7), kill(1),
       skill(1), killall(8), killall5(8), signal(7), proc(5).


       1994-2000 Werner Fink, 1996-2000 SuSE GmbH Nuernberg, Ger­


       Werner Fink <werner@suse.de>

Version 1.16               Nov 10, 2000              CHECKPROC(8)



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
The Linux Tutorial welcomes your suggestions and ideas.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.09 Seconds