• DevOps
    Case Study

    How we built a resilient multi-account, multi-cloud solution for a Health Tech service provider!

    READ CASESTUDY
    icon

    24/7 DevOps as a Service

    Round-the-clock DevOps for uninterrupted efficiency.

    icon

    Infrastructure as a Code

    Crafting infrastructure with ingenious code.

    icon

    CI/CD Pipeline

    Automated CI/CD pipeline for seamless deployments.

    icon

    DevSecOps

    Integrated security in continuous DevOps practices.

    icon

    Hire DevOps Engineers

    Level up your team with DevOps visionaries.

    icon

    Consulting Services

    Navigate success with expert DevOps consulting.

  • TechOps
    Case Study

    How we built a scalable Odoo solution for a Travel Tech service provider!

    READ CASESTUDY

    WEB HOSTING SUPPORT

    icon

    HelpDesk Support

    Highly skilled 24/7 HelpDesk Support

    icon

    Product Support

    Boost your product support with our expertise.

    MANAGED SERVICES

    icon

    Server Management

    Don’t let server issues slow you down. Let us manage them for you.

    icon

    Server Monitoring

    Safeguard your server health with our comprehensive monitoring solutions.

    STAFF AUGMENTATION

    icon

    Hire an Admin

    Transform your business operations with our expert administrative support.

    icon

    Hire a Team

    Augment your workforce with highly skilled professionals from our diverse talent pool.

  • CloudOps
    Case Study

    How we helped a Private Deemed University in India, save US $3500/m on hosting charges!

    READ CASESTUDY
    icon

    AWS Well Architected Review

    Round-the-clock for uninterrupted efficiency

    icon

    Optimize

    Efficient CloudOps mastery for seamless cloud management

    icon

    Manage

    Automated CI/CD pipeline for seamless deployments

    icon

    Migrate

    Upgrade the journey, Migrate & Modernize seamlessly

    icon

    Modernize

    Simplify compliance complexities with our dedicated services

    icon

    FinOps as a Service

    FinOps as a Service

  • SecOps
    Case Study

    How we built a scalable Odoo solution for TravelTech service provider!

    READ CASESTUDY
    icon

    VAPT

    Vulnerability Assessment and Penetration Testing

    icon

    Source Code Review

    Ensuring source code security ans safe practices to reduce risks

    icon

    Security Consultation

    On demand services for improving server security

    icon

    System Hardening

    Reduced vulnerability and proactive protection

    icon

    Managed SoC

    Monitors and maintains system security. Quick response on incidents.

    icon

    Compliance as a Service

    Regulatory compliance, reduced risk

  • Insights
    Case Study

    How we helped a Private Deemed University in India, save US $3,500/m on hosting charges!

    READ CASESTUDY
    icon

    Blog

    Explore our latest articles and insights

    icon

    Case Studies

    Read about our client success stories

    icon

    Flipbook

    Explore our latest Flipbook

    icon

    Events

    Join us at upcoming events and conferences

    icon

    Webinars

    Watch our educational webinar series

  • Our Story
  • Contact Us

Interested to collaborate?

Get in touch with us!

Ready to elevate your business with certified cloud expertise? Contact us today to learn how our team can help you leverage cloud technology to drive growth, streamline operations, and enhance security.

  • AWSAWS
  • Azure CloudAzure Cloud
  • Google CloudGoogle Cloud
  • Akamai CloudAkamai Cloud
  • OVHOVH
  • Digital OceanDigital Ocean
  • HetznerHetzner
  • Kubernetes Consultancy Services
  • K8s & Cloud native Solutions
  • 24/7 Infrastructure Monitoring
  • DevOps as a Service
  • Cloud CI/CD Solutions
  • White Labeled MSP Support
  • Our story
  • Life@SupportSages
  • Insights
  • Careers
  • Events
  • Contact Us

Connect with us!


LinkedInFacebookXInstagramYouTube

aws partneraws advanced partner
SupportSages

Copyright © 2008 – 2026 SupportSages Pvt Ltd. All Rights Reserved.
Privacy PolicyLegal TermsData ProtectionCookie Policy

Chapter 12 All about a process running in linux

Vipin R.N

  • 10 min read
Chapter 12 All about a process running in linux

Generating audio, please wait...

In server monitoring service we have come across the term Process many times and we are here explaining what is mean by a process in Linux systems

Program Vs Process

  • A program is an executable file, while a process is a program in execution. A program is a set of instructions written down to do something, while a process is the result of executing a program.
  • Process Vs Thread

A process and a thread is almost the same, and the only worthwhile difference between a thread and a process is that threads share the same address space completely and hence require less creation time. Processes are independent execution units that contain their own state information, use their own address spaces, and only interact with each other via inter-process communication mechanisms. A thread is a coding construct that doesn’t affect the architecture of an application. A single process might contains multiple threads; all threads within a process share the same state and same memory space, and can communicate with each other directly, because they share the same variables.

  • User process is a process run by a human user
  • A service or a daemon process which can be time based or event based usually triggered by root or the system itself while on bootup and infact a never ending process which triggers other processes.
  • PID – Process ID – The id of a process, each process running on a system is assigned itś own process ID.
  • PPID – Parent Process ID – PID of the process that created the child process. pstree shows the relation b/w parent process and other process, starting from init.
  • Job ID – Job ID is unique to a shell instance. Can be displayed using the command “jobs”. A process when hit a “Ctrl+Z” shows the job id, when it says Stopped .The command jobs shows background processes, both stopped and running. The process having a + symbol toward the right of job id means that process will be responding to fg without options (without job id being passed as argument) and the – sign to any process, if any indicates that it is that process which inherits the + sign after the process having + sign is done with.
  • bg %job_id or bg PID will let the process with job_id to run again.

A few process related commands with options:

ps command (process status) will display snapshot information of all active processes.

To display all the processes running in the system

Use “ps aux”, as shown below.


You can also use “ps -ef | more”, to get a similar output

Use ¨pstree¨ to get output like this:

  • Nice Value:It is used to run a program with modified scheduling priority . Nicenesses range from -20 (most favorable scheduling) to 19 (least favorable). Nice is to start a process with a priority like nice -n 10 mp3blaster
  • Renice – renice is to change the priority of an existing process like : renice 10 PID
  • kill – terminate a process
    The command kill sends the specified signal to the specified process or process group. If no signal is specified, the TERM signal is sent.
  • kill – kill %job_id or kill PID / man 7 signal
  • kill -15 PID – cleaner or soft killing of process – SIGTERM
  • kill -9 PID – hard kill – SIGKILL
  • kill -19 PID – Stop the process – STOP
  • kill -18 PID – resume the stopped process – SIGCONT
  • kill -2 PID – equivalent to Ctrl + C – SIGINT
  • kill -1 PID – Hangup – SIGHUP
  • kill -3 PID – end process & core dump
  • killall

More information regarding ‘kill’ can be found at the man page

[root@localhost ~]# man kill


Top – Display Linux tasks

The top program provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel.

top – Sort by CPU -> P

Sort by MEM -> M

Sort by PID -> N

Kill by PID -> k

Renice by PID -> r

List by user -> u

Active processes or non idle process -> i

  • nohup – will stop a process from being killed even if you logs off the system before it completes. It ignores the hangup and quit signals.
  • pgrep – process grep.

pgrep looks through the currently running processes and lists the process IDs which matches the selection criteria to stdout. All the criteria have to match.

For example, pgrep -u root sshd

  • pidof – find the process ID of a running program. finds the process id’s (pids) of the named programs. It prints those id’s on the standard output. An example is given below


 

  • PPID – Parent Process ID

The process parent PID, the creator of the process.

  • STAT – Process Status

These functions return information about the specified file. You do not need any access right to the file to get this information but you need search rights to all directories named in the path to the file.

TTY – Controlling Terminal

It print the file name of the terminal connected to standard input .

[root@localhost ~]# tty

/dev/pts/5

  • PRI – Priority number.

Lower the number, higher the priority, from +19 to -20. The priority numbers available for the system is from +39 to -60, while -20 to -60 is reserved for kernel threads. A normal user can have priorities from 0 to +20, and negative values as well as reducing the values are allowed only to root.

NI – Dynamic priority value , ranges from +19 to -20

TIME – total CPU time used

Process Status (STAT) Codes can be of any of these.

D uninterruptible sleep (usually IO) – cannot be terminated at the moment.

R runnable (on run queue) – can be run

S sleeping – waiting for an external event

T traced or stopped – is suspended.

Z a defunct (“zombie”) process – has terminated itself.

X Extinct – is dead

Setting limits on the number of processes that can run.

The command “ulimit” is used to limit the number of processes users can run along with available system resources. All processes which will be started from the shell (bash in many cases), will have the same resource limits. To set the limits for daemons which are running at boot time add ulimit

command to boot scripts. See apache startup script.

/etc/security/limits.conf

For example:

[root@localhost ~]#ulimit -S -m 1000000
[root@localhost ~]# ulimit -S -v 500000

With this value set, the system will kill any process that tries to take up more resources than you have set as a limit.

For Linux server monitoring service, do contact our server monitoring team with your requirements

  • General
  • Howtos
  • Linux
  • Special Offers
  • Training
  • Troubleshooting
Chapter 12 All about a process running in linux

“Suspended Page ” defaced in cPanel Server

“Suspended Page ” defaced in cPanel Server
  • cPanel
  • Linux
  • Troubleshooting
logo

APC Cache Activation and disable XCache

APC Cache Activation and disable XCache
  • Apache
  • cPanel
  • Linux
logo

Blacklisted ? Switch your Mail Server IP

Blacklisted ? Switch your Mail Server IP
  • cPanel
  • Linux
  • Webmail
logo

Configuraing local php variables in Php -FCGI set up

Configuraing local php variables in Php -FCGI  set up
  • Howtos
  • Troubleshooting
logo

Posts by Vipin R.N

Vipin is a no-nonsense, disciplined guy who ensures that everything is carried out with the highest level of perfection. Apart from his great coding skills, he is quite interested in advanced server administration, issue analysis, documentation and training. In-depth knowledge in international politics, ammunition and automobiles makes this hard core Manchester United fan, one of the most referenced personalities in the entire team.